code-423n4 / 2022-09-nouns-builder-findings

10 stars 6 forks source link

Upgraded Q -> M from 357 [1664289665374] #728

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Judge has assessed an item in Issue #357 as Medium risk. The relevant finding follows:

GalloDaSballo commented 1 year ago

_addFounders allow founders to own all tokens

The _addFounders method allows setting the founders percent ownership to 100%, which then makes minting tokens impossible because it hangs on an infinite loop.

To fix that and reject the contract creation with 100% funders ownership, this line should be changed to

if ((totalOwnership += uint8(founderPct)) >= 100) revert INVALID_FOUNDER_OWNERSHIP(); That is, use a >= comparison instead of >

GalloDaSballo commented 1 year ago

Dup of #347