If a user has to pay 2x the cost of treat, the NFT is minted to the contract and if the user wants the NFT he has to call resolveTrick
function. This can lead users paying only gas price for the NFT and never calling resolveTrick
function, therefore flooding the contract with NFTs which will be forever there.
The problem lies in these lines of the function trickOrTreat
:
As we can see the NFT is minted to the contract and the user paid partial or no amout of the cost.
Flooding the contract with NFTs
foundry
Mint the NFT in the resolveTrick
function instead.
Remove the following lines from trickOrTreat
function:
And modify function resolveTrick
to call mintTreat
accordingly.
The protocol can work correctly with more than 20000 tokens in it. It is informational.
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.