A malicious user can transfer a custom token to the Treasury.sol
contract located at 2025-02-raac/contracts/core/collectors/Treasury.sol
. By exploiting this, they can trigger an overflow, preventing any further deposits into the contract.
In the deposit function's implementation, a user can submit a malicious token designed to inflate _totalValue
to uint256.max
. Since Solidity version 0.8 and above includes built-in overflow checks, this would cause the transaction to revert, effectively locking the contract and preventing further deposits.
Implementation of deposit function in Treasury.sol
below:
This vulnerability arises because _totalValue
does not have adequate validation against potential overflow scenarios when dealing with malicious tokens.
Medium
Manual Review
Assign total supply to each specific token.
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.