Insufficient check for presents received with balanceOf(msg.sender) > 0)
allows infinite ERC20 printing from attacker with SantasList::Status.EXTRA_NICE
The absence of a recording mechanism for present receivers and relying only on balanceOf(msg.sender) > 0
allows user with EXTRA_NICE
status to move received tokens to another address and continue to loop through the collectPresent()
function as much as block gas limit allows.
Initially, after Santa user gives EXTRA_NICE status to the user, user is able to pass
requirements and mint fungible and non-fungible tokens
Then to enter collectPresent()
again and get around balanceOf(msg.sender) > 0)
user can transfer NFT to another address.
Foundry tests will look like this:
Full test on GitHub repo fork
Foundry
Introduce a list of persons that already received the present:
Relying on balanceOf > 0 in collectPresent() allows the msg.sender to send their present to another address and then collect again.
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.