Non-standard ERC20 Tokens are Not Supported
The SuperVault contract calls the standard ERC20 approve function, which reverts for tokens like USDT that do not return a boolean. This prevents the vault from operating with such tokens, impacting function availability.
Submitted by ych18, also found by MaratCerby, robee, and defsec
When trying to call SuperVault.executeOperation the transaction reverts. This is because the call to asset.approve() in line{97} doesn’t match the expected function signature of approve() on the target contract like in the case of USDT.
This issue exists in any call to approve function when the asset could be any ERC20.
Recommendation : consider using safeApprove of OZ
gzeoneth (judge) decreased severity to Medium and commented:
Judging as Med Risk as function availability could be impacted. Unlike the core protocol,
SuperVaultcan take any token as input and USDT is listed on various lending protocol like AAVE.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The contract calls the standard ERC20 approve function directly, which reverts for tokens whose approve does not return a boolean.
Impact
The vault's executeOperation function reverts for non-standard tokens like USDT, so the vault cannot operate with them, affecting availability.
What the attacker needed
Vault uses a non-standard ERC20 like USDT
The fix
The report recommends using OpenZeppelin's safeApprove, which handles tokens that do not return a boolean.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Some tokens, such as USDT, have an approve function that does not return a value, while the standard expects a true or false. The vault's code assumes the standard behaviour, so when it tries to approve USDT the call fails and the whole transaction is undone. This means the vault cannot be used with those tokens.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.