contracts/core/collectors/Treasury.sol
The deposit function of the Treasury contract keeps an internal accounting of the total amounts of token deposited into the contract using a mapping of token balances to amounts, this mapping is updated by the amount arguments passed in for a token during deposits, the balance of the token (internal accounting) is updated by adding previous stored sum to the amount value passed the function.
This internal accounting may deviate from the true token balance of the contract in the case of some tokens that deduct fees on transfers or taxes (Weird ERC20) thereby not transferring the exact amount specified by the user.
In cases where the token balance reported by the contract differs from it true balance, this can lead to accounting inconsistencies and potential introduce bugs in other parts of the codebase that rely on these values
Manual Review
Track token balances using the balanceOf method on the token contract rather than rely on internal accounting which may be incorrect.
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.