The transfer function on ERC20 tokens returns a boolean value if successful. That value is not checked in several places in the Yeti protocol. Yeti has to whitelist, but it's unreasonable to think they can monitor for all implementation changes across all tokens.
Handle
broccolirob
Vulnerability details
The
transfer
function on ERC20 tokens returns a boolean value if successful. That value is not checked in several places in the Yeti protocol. Yeti has to whitelist, but it's unreasonable to think they can monitor for all implementation changes across all tokens.Impact
Internal balances will be inaccurate if transfer's fail.
Proof of Concept
transfer
that returnsfalse
under certain circumstances.Tools Used
Recommended Mitigation Steps
Use OpenZeppelin's SafeERC20, or ensure that the transfer/transferFrom return value is always checked.