Founder minting infinite loop #244
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
duplicate
This issue or pull request already exists
Lines of code
https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/token/Token.sol#L157
https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/token/Token.sol#L179-L190
Vulnerability details
Impact
In the case of founder shares
totalOwnership
reaching 100, e.g. with a single founder owning the entire 100%, the mint function seems stuck in an infinite loop because all token IDs are founder tokens, at least until the founder vesting timestamp is reached.Proof of Concept
I made minor changes to Token to allow my test to include minimal setup, then wrote a short test function sharing it below.
Modifications
initializer
modifier from the constructormetadataRenderer.onMinted
to avoid having to provide a renderer or mock oneThe test
Tools Used
forge test
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: