Anyone can donate huge amounts of malicious tokens to the treasury in order to DoS new deposits.
The root causes are identified in:
permissionless deposit()
function
_totalValue
state variable
Code:
An attacker can create a malicious ERC20 contract that reverts on transfer if the from address is the treasury smart contract and then deposit the whole supply to bring _totalValue
close to type(uint256.max)
:
future deposits will revert because _totalValue += amount
will likely overflow
withdraw() cannot be used to remove such malicious token because it will revert on transfer if from is the treasury address
Note that, only on Ethereum Mainnet, is possible to achieve the same outcome by depositing cUSDC with amount = type(uint256).max
, since it will actually transfer the caller's balance.
Manual Review
Remove the _totalValue
state variable
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.