Incompatibility of `ERC20::approve` function with USDT tokens on Ethereum Mainnet chain
The protocol uses the standard ERC20 approve function, which expects a boolean return value, but USDT on Ethereum does not return a value, causing transactions to revert. This breaks core functions like entering or migrating a vault, minting yield tokens, and staking tokens when using USDT.
Atharv Follow with Bigsam, KungFuPanda and 11 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/652
Found by
Atharv, Bigsam, KungFuPanda, Ledger_Patrol, Pro_King, X0sauce, bretzel, bube, h2134, harry, mgf15, sebar1018, theweb3mechanic, yoooo
Summary
The ERC-20 standard specifies that approve function should return a bool indicating success. However, some widely-used tokens such as USDT omit the return value. When interacting with such tokens using high-level Solidity calls (ERC20(token).approve), the EVM expects a return value. If none is returned, decoding fails and the transaction reverts.
Root Cause
The AbstractLendingRouter::_enterOrMigrate function, MorphoLendingRouter::_supplyCollateral function, AbstractStakingStrategy::_mintYieldToken and GenericERC4626::_stakeTokens use the ERC20::approve function to approve a given amount of asset/token:
function _enterOrMigrate(
address onBehalf,
address vault,
address asset,
uint256 assetAmount,
bytes memory depositData,
address migrateFrom
) internal returns (uint256 sharesReceived) {
if (migrateFrom != address(0)) {
// Allow the previous lending router to repay the debt from assets held here.
ERC20(asset).checkApprove(migrateFrom, assetAmount);
sharesReceived = ILendingRouter(migrateFrom).balanceOfCollateral(onBehalf, vault);
// Must migrate the entire position
ILendingRouter(migrateFrom).exitPosition(
onBehalf, vault, address(this), sharesReceived, type(uint256).max, bytes("")
);
} else {
@> ERC20(asset).approve(vault, assetAmount);
sharesReceived = IYieldStrategy(vault).mintShares(assetAmount, onBehalf, depositData);
}
_supplyCollateral(onBehalf, vault, asset, sharesReceived);
}
function _supplyCollateral(
address onBehalf,
address vault,
address asset,
uint256 sharesReceived
) internal override {
MarketParams memory m = marketParams(vault, asset);
// Allows the transfer from the lending market to the Morpho contract
IYieldStrategy(vault).allowTransfer(address(MORPHO), sharesReceived, onBehalf);
// We should receive shares in return
@> ERC20(vault).approve(address(MORPHO), sharesReceived);
MORPHO.supplyCollateral(m, sharesReceived, onBehalf, "");
}
function _mintYieldTokens(uint256 assets, address /* receiver */, bytes memory depositData) internal override virtual {
@> ERC20(asset).approve(address(withdrawRequestManager), assets);
withdrawRequestManager.stakeTokens(address(asset), assets, depositData);
}
function _stakeTokens(uint256 amount, bytes memory /* stakeData */) internal override {
@> ERC20(STAKING_TOKEN).approve(address(YIELD_TOKEN), amount);
IERC4626(YIELD_TOKEN).deposit(amount, address(this));
}
According to the README the contract will be deployed on Ethereum Mainnet chain and will use USDT tokens.
The problem is that the ERC20 interface expects the approve function to return a boolean value, but USDT token on Ethereum dosn't have a return value. This means the approve operation of the tokens will always revert.
Also these functions don't set first the allowance to 0. In normal circumstances, the previous allowance should be used and the current allowance should be 0, but if the current allowance is not 0, the approve function will revert again. The approve function of the USDT token expects the allowance to be 0 before setting the new one.
Impact
Users are unable to use properly important functions of the protocol like entering or migrating a vault, minting yield tokens or staking tokens with USDT token on Ethereum mainnet chain, these functions will always revert due to the use of ERC20::approve function. USDT is one of the tokens that the protocol will use, therefore the failure to handle its non-boolean approve return is a critical issue due to breaking core functionality for a supported token.
PoC
The following test shows that the approve function will revert for USDT token on Ethereum Mainnet chain:
function testApproveMainnet() public{
address user = address(0x123);
ethFork = vm.createFork(ETH_RPC_URL);
vm.selectFork(ethFork);
assetUsdtETH = IERC20(usdtETH);
deal(address(assetUsdtETH), user, 100*10**6, true);
vm.startPrank(user);
vm.expectRevert();
assetUsdtETH.approve(address(0x444), 10*10**6);
}
Mitigation
Use OpenZeppelin's SafeERC20::forceApprove function instead of IERC20::approve function.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/notional-finance/notional-v4/pull/11
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
Impact
Users cannot use core functions like entering or migrating a vault, minting yield tokens, or staking tokens with USDT on Ethereum Mainnet, as these functions will always revert.
What the attacker needed
Protocol deployed on Ethereum Mainnet; USDT used as the asset
The fix
The protocol team fixed this issue by using OpenZeppelin's SafeERC20::forceApprove instead of IERC20::approve.
How it was found
- Deploy or use the contract on Ethereum Mainnet with USDT as the asset.
- Call a function that internally uses ERC20(asset).approve, such as entering a vault or staking tokens.
- The approve call reverts because USDT does not return a boolean value.
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, like USDT, do not follow the full ERC20 standard and do not return a success value when you call approve. The protocol's code expects that return value, so when it tries to approve USDT, the transaction fails and reverts. This means users cannot use certain protocol features with USDT.
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.