The deposit and withdraw functions in the contract Treasury.sol use transferFrom and transfer from the IERC20 interface without checking their return values. This can lead to unexpected failures when handling non-compliant ERC-20 tokens, which either do not return a boolean value or return false instead of reverting on failure.
Usage of transfer and transferFrom without proper checks.
If a token fails to transfer but does not revert, the contract incorrectly assumes the transfer succeeded, leading to incorrect balance tracking and potential fund loss or mismanagement.
This could make the contract incompatible with major tokens, limiting usability
Manual Review
Use SafeTransferLib or SafeERC20 to ensure secure token transfers. Replace transfer with safeTransfer and transferFrom with safeTransferFrom when handling ERC-20 tokens to prevent failures caused by non-standard implementations.
LightChaser Low-60
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.