Skip to content

Bug in treasury - repeated withdrawals on same proposal possible #23

Description

@nini-faroux

There is an issue with the validateTreasury script whereby a user may use the same proposal to execute the treasury effect multiple times (basically as long as there is enough ADA in the treasury to cover it).

The issue is that the tally UTXO is only referenced in validateTreasury instead of being spent - here.

Probable fix - spend the proposal (tally) UTXO instead of referencing it, and check that it is spent in validateTreasury - so use txInfoInputs instead of txInfoReferenceInputs in the link above.

This change will also require changes to the validateTally script as spending the tally UTXO at this treasury step would mean that the validateTally script will fail, so you will maybe need to introduce a Redeemer and add a new branch for when the tally UTXO is being spent during the treasury disbursal step.

cc @Randy1Burrell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions