Treasury::deposit()
can be DOSed by increasing the _totalValue
to uint256.max
.
This can easily be done with a fake ERC20 token created by an attacker:
Attacker deploys an ERC20 and mints himself uint256.max
tokens. Or enough to top up the _totalValue
to uint256.max
.
Attacker calls Treasury::deposit(maliciousToken, uint256.max)
.
As all tokens share the same _totalValue
state. Any other legit call to deposit will try to increase _totalValue
and it will revert by overflow.
See the code here:
Treasury deposits can be DOSed easily by anyone.
Track _totalValue
token-wise. Like with a mapping that maps token address to its total value in the Treasury
.
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.