Category: Business Logic
The transferFrom function could fail
Medium Impact
Medium Severity
Medium Likelihood
Description
The FeeWrapper4626 vault currently uses the transferFrom function to transfer ERC-20 tokens. However, some nonstandard ERC-20 tokens, such as USDT, do not return a success status from their transferFrom function. This deviation from the standard EIP-20 implementation can lead to unexpected behavior in the protocol.
Impact
Incompatibility with some nonstandard tokens.
Recommendations
We recommend using OpenZeppelin’s SafeERC20↗ versions with the safeTransfer and safeTransferFrom functions that handle the return-value check, as well as non--standard-compliant tokens.
Remediation
This issue has been acknowledged by StakeKit. The issue was fixed with commit . They now handle nonstandard ERC20 tokens using OpenZeppelin’s SafeERC20 Library.