Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETH cannot be locked for specific proposal #56

Closed
code423n4 opened this issue Aug 24, 2022 · 1 comment
Closed

ETH cannot be locked for specific proposal #56

code423n4 opened this issue Aug 24, 2022 · 1 comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) invalid This doesn't seem right

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-08-nounsdao/blob/c1c7c6201d0247f92472419ff657b570f9104565/contracts/governance/NounsDAOLogicV2.sol#L333

Vulnerability details

Impact

A proposal may have a value set that is sent in NounsDAOExecutor when the call is executed. However, the ETH balance of the NounsDAOExecutor is used when doing so. There is no way to lock / reserve ETH for a specific proposal, which can lead to erroneous behavior.

Proof Of Concept

Alice proposes to transfer 1 ETH to contract F. There are a lot of votes in favor of this proposal, so Alice (or the Nouns DAO) decides to deposit 1 ETH into the Executor contract. However, there is also a successful proposal from Bob which transfer 1 ETH to contract D. This proposal already succeeded some weeks ago, but there was not enough ETH to execute it. Now, that the executor contract has 1 ETH, execute can be called on Bob's proposal and Alice's ETH is used for a completely different purpose.

Recommended Mitigation Steps

A relatively simple fix would be to make execute payable and forward the ETH if msg.value is greater than 0. Like that, ETH could be associated with a single proposal only by sending the corresponding amount when executing.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Aug 24, 2022
code423n4 added a commit that referenced this issue Aug 24, 2022
@eladmallel eladmallel added the disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) label Aug 29, 2022
@eladmallel
Copy link
Collaborator

We're ok letting proposal execution fail if the treasury has insufficient funds.

@gzeoneth gzeoneth added the invalid This doesn't seem right label Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants