Closed code423n4 closed 2 years ago
kenzo
Some ERC20 tokens only return false and do not revert on failed transfer or transferForm. Yeti mostly handles this, but not in all places.
transfer
transferForm
Wouldn't be able to easily tell if transfer succeeded.
When YetiFinanceTreasury sendsToken to the team wallet, it doesn't check whether the transfer succeeded. (Code ref)
function sendToken(IERC20 _token, address _to, uint _amount) external onlyTeam { _token.transfer(_to, _amount); }
Add a return value to the function and make sure the transfer succeeded.
Duplicate #116
For now, a duplicate of #1
Duplicate of #94
Handle
kenzo
Vulnerability details
Some ERC20 tokens only return false and do not revert on failed
transfer
ortransferForm
. Yeti mostly handles this, but not in all places.Impact
Wouldn't be able to easily tell if transfer succeeded.
Proof of Concept
When YetiFinanceTreasury sendsToken to the team wallet, it doesn't check whether the transfer succeeded. (Code ref)
Recommended Mitigation Steps
Add a return value to the function and make sure the transfer succeeded.