A normal behavior should be to allow only the AirdropSnowman.sol
contract to mint
NFTs under certain conditions.
The actual behavior => anyone can mint NFTs, there is no restriction in the snowman.sol
contract for the mintSnowman()
function.
Likelihood: High
It occurs EVERYTIME the external function mintSnowman()
is called for a specific receiver
.
There no restriction on msg.sender
to call this function nor receiver
to receive the NFTs.
Impact: High
A user can mint as many NFTs as he wants without passing by the AidropSnowman.sol
contract.
A user can mint as many NFTs as he wants without staking/possessing any SNOW token.
1) Do not buy / possess any SNOW token, do not stake any SNOW token.
2) Execute the mintSnowman()
function in snowman.sol
contract to mint an arbitrary number of NFTs to an arbitrary receiver => use the testMintSnowman()
function from TestSnowman.t.sol
defined as follow.
3) Check that the transaction goes through perfectly.
Restrict the mintSnowman()
function to be called only by the airdropSnoman.sol
contract that should implement a good check on receiver.
You can use a Modifier :
The mint function of the Snowman contract is unprotected. Hence, anyone can call it and mint NFTs without necessarily partaking in the airdrop.
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.