MINT_HORSE()
has a vulnerability where TOTAL_SUPPLY
is not updated during each minting operation.
The vulnerability lies in the MINT_HORSE()
macro. TOTAL_SUPPLY is supposed to be incremented during each minting operation. Instead, It returns 0 because there's no logic to update it.
The impact of this vulnerability is high. The uniqueness of token IDs is a fundamental assumption in ERC721. Notice that _MINT()
takes TOTAL_SUPPLY
as input for tokenId
:
This means that if MINT_HORSE()
is called multiple times, all the new tokens will have the same ID which could lead to unexpected behavior.
Foundry test.
Add logic in MINT_HORSE()
macro to update the supply:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.