In Treasury there is no access control in deposit function and there is no whitelist for tokens. User can use custom token that freezes Treasury's functionality.
The deposit function uses _balances to track the balance of the specific token and _totalValue to track all of the tokens that are in the Treasury.
Attacker can create custom token with total supply of maxiumum value of uint256 and implement it in a way that only whitelisted addresses can transfer the token. Then the attacker has to approve the token and call deposit. _totalValue will be set to maximum value of uint256 so any more tokens can't be deposited.
The tokens can't be transfered since the attacker can whitelist the addresses that are allowed to tranfer tokens.
Tokens can't be removed using withdraw since it uses transfer function.
Attacker can freeze the Treasury preventing deposits and withdrawals leading to loss of funds.
Manual Review, Hardhat
Create whitelist for tokens so that custom tokens can't be used to freeze 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.