Closed sherlock-admin4 closed 4 months ago
2 comment(s) were left on this issue during the judging contest.
WangAudit commented:
sorry but for me it actually looks like intended design; the comment above
proposalThreshold
specifically says that it's about total supply; the only thing that may be valid here is using<
over<=
; but it also looks to be completely intended
karanctf commented:
bps can't be more then 10000 which is 100% 1e18 will make it 0
DenTonylifer
medium
Unable to set the minimum proposal threshold
Summary
Collections with high total supply NFT will not be able to set the minimum proposal threshold.
Vulnerability Detail
The protocol assures that the
proposalThresholdBPS
can be setted at least = 1, which means that at least 1 basis point is enough to reach the minimum proposal threshold:However, collections with at least 20000 NFTs in total supply can’t set proposal threshold = 1. If totalSupply = 20000, with the lowest settings (
ds().proposalThresholdBPS
= 1), it would returns (20000 * 1) / 10000 = 2:And it can’t be lowered more. Moreover, even if proposal threshold = 2, proposal in
proposeBySigs()
function will revert even if votes = 2, not lower thantemp.propThreshold
, which defies logic of protocol's proposal thresholds.All of this breaks the protocol's internal logic and cannot be design choise.
Impact
Collections with at least 20000 NFTs in total supply will not be able to set the minimum proposal threshold to lowest values.
Code Snippet
[https://github.com/sherlock-audit/2024-03-nouns-dao-2/blob/main/nouns-monorepo/packages/nouns-contracts/contracts/governance/NounsDAOProposals.sol#L993]() [https://github.com/sherlock-audit/2024-03-nouns-dao-2/blob/main/nouns-monorepo/packages/nouns-contracts/contracts/governance/NounsDAOProposals.sol#L935]() [https://github.com/sherlock-audit/2024-03-nouns-dao-2/blob/main/nouns-monorepo/packages/nouns-contracts/contracts/governance/NounsDAOAdmin.sol#L189]()
Tool used
Manual Review
Recommendation
Increase division to a more precise value such as 1e18 to allow collections with high total supply NFT to always set any allowed threshold, even 1:
And proposal must not revert if
votes
=propThreshold
, not below threshold: