Deposits to the treasury can be blocked by an attacker.
The state variable _totalValue of Treasury.sol represents the total amount of all kind of tokens deposited into the treasury. In addition, there is no whitelisting mechanism for deposited tokens. As a result, an attacker can block all legitimate depositing by depositing type(uint256).max amount of a self-made token.
The state variable _totalValue of Treasury.sol represents the total amount of all kind of tokens deposited into the treasury.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/collectors/Treasury.sol#L46-L55
In addition, there is no whitelisting mechanism for deposited tokens. As a result, if an attacker deposits type(uint256).max - _totalValue amount of a self-made ERC20 token, _totalValue will become type(uint256).max.
Then, all subsequent depositing will be blocked due to overflow.
All legitimate depositing can be blocked.
_totalValue should be removed.
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.