Submitted by azephiar, also found by __141345__, 0x52, 0xSmartContract, bin2chen, Ch_301, indijanc, and Tointer
https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/governance/governor/Governor.sol#L475
https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/governance/governor/Governor.sol#L524
Because the following happens:
We can derive that the protocol calculates the quorumVotes taking into account burned tokens and tokens held in the auction contract, which dont have any actual voting power. In other words the actual quorumThresholdBps is equal or higher than the setted quorumThresholdBps.
The worse case scenario that can happen is that the quorum gets so high that a proposal cannot pass even if everybody voted and everybody voted for, potentially locking funds into the contract.
We can define:
This is the case if:
which is the same as
and rearranging in terms of settings.quorumThresholdBps we have:
Knowing that:
Many combinations of values in the ranges described above render this disequation true, note, however, that this describes the workings in a mathematical settings and it doesnt hold true for every case in a real setting because of roundings and approximations.
We can intuitevely notice that when realVotingPower/assumedVotingPower is very low, which is the case of a DAO with few tokens burned, the chances of the disequation being true are slim and when its high the chances of the disequation being true become higher. The opposite is true for settings.quorumThresholdBps.
This might lock funds in DAOs with a lot of unsold auctions who have a low settings.quorumThresholdBps.
At early stages this is mitigated by the fact that for every possible token burned some tokens are minted to the founders, but when the vest expires this mitigation is not in place anymore.
I wrote a test thats expected to revert a proposal.queue() even if all possible votes available are cast in favor.
The test comes with two parameters to set: auctionsToRun and tokensToBidder. The test runs auctionsToRun auctions, of which the first tokensToBidder are bidded upon and the rest are not. Then:
The default parameters are set to auctionsToRun = 130 and tokensToBidder = 10. Also quorumThresholdBps = 1000. This test results in 121 tokens burned and 133 token minted. Its quite an unrealistic scenario, but it can get more real if quorumThresholdBps is setted lower. Keep in mind that this is the case in which everybody shows up to vote and averybody votes for.
The test can be pasted inside Gov.t.sol and then run with:
test -m test_RevertQueueProposalWithEverybodyInFavour
Forge
Either one of this 2 options is viable:
Alex the Entreprenerd (judge) decreased severity to Medium and commented:
iainnash (Nouns Builder) confirmed
