User can manipulate total value tracking by depositing worthless ERC20 tokens with uint256.max amount, leading to DOS of legitimate deposits.
In the Treasury contract deposit function , the _totalValue
state variable is used to track the total value of all tokens deposited. However, this tracking is vulnerable to manipulation:
An attacker can:
Create a worthless ERC20 token
Deposit amount close to uint256.max
This causes _totalValue to approach uint256.max
Future legitimate deposits will revert due to overflow
DOS on legitimate token deposits due to _totalValue
overflow
Manual Review
Track total value per token instead of aggregating it or remove the _totalValue
if not relevant enough.
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.