Everybody can call RamNFT::mintRamNFT
which breaks the contract invariant.
There is no check if the msg.sender is the Dussehra
contract, so every user can call RamNFT::mintRamNFT
and mint as many nfts as they wish for their account.
Users can mint their NFT without paying a fee to Dussehra.sol
contract. Moreover, they have a chance to become the Ram
and withdraw their reward from the Dussehra.sol
contract. Actually, their chances of becoming the Ram are increased, because they can mint 2 nfts and then keep calling ChoosingRam::increaseValuesOfParticipants
with their two tokenIds. At the latest as of the 9th call(could happen and earlier) of the function one of their NFT will become the Ram
.
In normal circumstances, if users keep calling ChoosingRam::increaseValuesOfParticipants
they can make the participant's nft the Ram
and that possibility does not exist if the two tokenIds are owned by the same user.
Unit testing
Manual Review
Add a modifier that checks if the msg.sender is the Dussehra
contract and revert if it is not.
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.