Skip to content
DoS Audit finding Beginner

Pool Credit Line May Not Able to Start When _borrowAsset is Non ERC20 Compliant Tokens

The start() function in the LenderPool contract uses IERC20.transfer to send a fee, which will revert for tokens like USDT that do not return a boolean value. This prevents the credit line from starting when such tokens are used as the borrowed asset.

Meta0xNull Follow

Originally disclosed on Code4rena

Submitted by Meta0xNull, also found by Dravee and kenta

IERC20(_borrowAsset).transfer(_to, _fee);

If the USDT token is supported as _borrowAsset, the unsafe version of .transfer(_to, _fee) may revert as there is no return value in the USDT token contract’s transfer() implementation (but the IERC20 interface expects a return value).

Function start() will break when _borrowAsset is USDT or Non ERC20 Compliant Tokens. USDT is one of the most borrowed Asset in DEFI. This may cause losing a lot of potential users.

Proof of Concept

LenderPool.sol#L327

Recommended Mitigation Steps

Use .safeTransfer instead of .transfer

IERC20(_borrowAsset).safeTransfer(_to, _fee);

ritik99 (Sublime) confirmed

saxenism (Sublime) commented:

Shifted from transfer to safeTransfer sublime-finance/sublime-v1#372


The original report as published on Code4rena, by Meta0xNull. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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 uses the standard IERC20.transfer function, which expects a boolean return value, but tokens like USDT do not return a value, causing the call to revert.

Impact

The start() function will break for USDT or other non-ERC20 compliant tokens, potentially losing many potential users.

What the attacker needed

Borrowed asset is USDT or similar token

The fix

The fix is to use safeTransfer instead of transfer, 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, like USDT, do not follow the standard ERC20 rule that requires a transfer function to return a true or false value. The smart contract expects that return value, so when it calls transfer on USDT, the call fails and the whole function stops. This means users cannot start a loan if the borrowed token is USDT.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by Meta0xNull

View all

3 more disclosed reports, best first.

More from Sublime contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.