Open code423n4 opened 2 years ago
Consistently with #523 the Warden has shown how to cause mint
to revert due to handling of properties and items, in this case by having a property without any.
Because this finding shows a different way to cause a revert, I will file it separately. Because it shows the same type of revert as #523 I'll judge it in the same way as Medium Severity
Lines of code
https://github.com/code-423n4/2022-09-nouns-builder/blob/main/src/token/metadata/MetadataRenderer.sol#L194
Vulnerability details
Impact
If a property without items was added, minting becomes impossible. To enable minting again, an item must be added to the property, which is only possible through a new governance proposal.
Proof of Concept
Consider the following test case:
Recommended Mitigation Steps
Short term, in the addProperties function, ensure that each newly added property has at least one item.
Long term, after adding properties and items in the addProperties function, ensure that next token can be minted and rendered without errors.