The Treasury
contract (contracts/core/collectors/Treasury.sol
) uses IERC20's transfer() and transferFrom(), which won't work for certain tokens like USDT.
The documentation () states that the Treasury
contract has multi-token support. But it won't support all the tokens.
Inside Treasury::deposit
function, IERC20(token).transferFrom()
is being called, and inside Treasury::withdraw
function, IERC20(token).transfer()
is called.
Old ERC20 tokens like USDT don't return bool upon calling these two functions, causing these calls to revert due to incompatibility. So any deposit or withdraw of those tokens would fail.
USDT or other tokens that slightly differ from the latest ERC-20 specs wouldn't be able to be managed by the Treasury contract.
Manual review
Use SafeERC20 library. Here is the full diff which can be applied to Treasury.sol
:
LightChaser Low-60
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.