contracts/core/collectors/Treasury.sol
The deposit function of the Treasury contract allows for transfer of arbitrary tokens in to the contract using the function the caller can provide any token address as argument alongside the amounts of tokens to deposit, after a successful deposit, the totalValue state variable is updated to include the amount of tokens transferred, this introduces a critical vulnerability as a user could execute the deposit function passing in an address that contains any arbitrary logic in it’s transferFrom function, after which the _totalValue state variable can to updated to uint256.max, thereby permanently blocking any further deposits into the contract.
The deposit logic can be permanently bricked making it unusable and totally blocking the transfer of tokens into the treasury contract.
Manual Review
Consider implementing a token whitelist for acceptable tokens that can be transferred into the contract using the deposit function
create a solidity file named MinimalERC20.sol in contracts/mocks/core/tokens
add the code snippet below
add this test script to test/unit/core/collectors/Treasury.test.js
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.