Some ERC20 tokens only return false and do not revert on failed transfer or transferForm.
Yeti mostly handles this, but not in all places.
Impact
Lost yield for user.
Proof of Concept
Upon deposit or withdrawal to StabilityPool, Yeti will send the depositer his gains using _sendGainsToDepositor. This function does not check that the ERC20 transfer has not failed (unlike other places which do check.) (Code ref)
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
Lost yield for user.
Proof of Concept
Upon deposit or withdrawal to StabilityPool, Yeti will send the depositer his gains using
_sendGainsToDepositor
. This function does not check that the ERC20 transfer has not failed (unlike other places which do check.) (Code ref)Recommended Mitigation Steps
Check that the return value of
transfer
is empty or true.