Nouns Builder contest - csanuragjain's results

A permissionless, governed protocol to deploy nouns-style DAOs complete with treasury, generative collections, and governance mechanisms.

General Information

Platform: Code4rena

Start Date: 06/09/2022

Pot Size: $90,000 USDC

Total HM: 33

Participants: 168

Period: 9 days

Judge: GalloDaSballo

Total Solo HM: 10

Id: 157

League: ETH

Nouns Builder

Findings Distribution

Researcher Performance

Rank: 27/168

Findings: 2

Award: $790.61

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: rbserver

Also found by: Solimander, csanuragjain

Labels

bug
duplicate
2 (Med Risk)
disagree with severity

Awards

729.7931 USDC - $729.79

External Links

Lines of code

https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/governance/governor/Governor.sol#L441

Vulnerability details

Impact

Defeated proposal will be mark accepted and would be executed due to an incorrect condition.

Proof of Concept

  1. Proposal A was created
  2. proposal.voteEnd has reached and no one voted on this proposal
proposal.forVotes = 0 proposal.againstVotes = 0
  1. As checked with product team, in case of tie proposal should get Defeated

  2. Due to an incorrect condition (missing =), it will instead be Queued for execution, since proposal.forVotes < proposal.againstVotes will be false

function state(bytes32 _proposalId) public view returns (ProposalState) { ... else if (proposal.forVotes < proposal.againstVotes || proposal.forVotes < proposal.quorumVotes) { return ProposalState.Defeated; } ... else { return ProposalState.Queued; } }

Change the condition to include = while comparing votes as shown below

else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < proposal.quorumVotes) { return ProposalState.Defeated; }

#0 - GalloDaSballo

2022-09-19T20:54:18Z

50 / 50, meaning this can happen exclusively on 1 specific vote

User can overwrite other user bids

Contract: https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/auction/Auction.sol#L331

Impact

If admin sets minimumBidIncrement to 0 percent then one User can overwrite other user bids without need to provide extra funds

Proof of Concept

  1. Assume that settings.minBidIncrement is currently set to 0 by Admin
  2. User A creates bid on the auction with amount X
  3. Since settings.minBidIncrement is 0, so User B only needs to provide amount X which will replace User A bid with User B bid

Add a check to make sure settings.minBidIncrement>0

require(settings.minBidIncrement>0, "Incorrect increment");

Auction can be extended to an indefinite amount of time

Contract: https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/auction/Auction.sol#L323

Impact

Auction can be extended to an indefinite amount of time

Proof of Concept

  1. Assume that settings.timeBuffer is currently set to a 1000 days by Admin
  2. User A creates bid on the auction with amount X
  3. Since settings.timeBuffer is 1000 days, so new Auction can only be created post 1000 days

There should be a max cap on timeBuffer

#0 - GalloDaSballo

2022-09-26T21:25:40Z

User can overwrite other user bids

L

Auction can be extended to an indefinite amount of time

L

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax Β© 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter