Anyone can update the count of MartenitsaTokens for any address in the MartenitsaToken
contract by call updateCountMartenitsaTokensOwner
function.This will result in an impact on the collectReward
function.
Anyone can update the count of MartenitsaTokens for any address in the MartenitsaToken
contract by call updateCountMartenitsaTokensOwner
function.
There are two scenarios:
1、increasing the count of MartenitsaTokens for someone,leading to someone collect more reward
2、decreasing the count of MartenitsaTokens for someone,leading to someone collect less reward
Using scenario 1 as an example, someone having no MartenitsaTokens can collect reward by Manipulating the updateCountMartenitsaTokensOwner function
POC:
add this test function in MartenitsaMarketplace.t.sol,
then run forge test --mt testAnyoneCanCollectReward
High,
Foundry
Make sure to add an Acess Control mechanism to limit who can update the count of MartenitsaTokens in the MartenitsaToken
contract.
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.