Skip to content
DoS Audit finding Intermediate

Lack of USDT support due to use of transfer

The zapping proxy sends leftover input tokens to the treasury using the ERC20 transfer function, which does not return a boolean. For tokens such as USDT that do not return a value, the call reverts, so users cannot perform market actions with USDT whenever a leftover balance exists.

0xFlare Follow with 0xShoonya, 0xSolus and 28 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-08-usg-tangent-judging/issues/127

Found by

0xFlare, 0xShoonya, 0xSolus, 0xpetern, 0xxAristos, Audinarey, BAdal-Sharma-09, ChaosSR, Cybrid, Elroi, ExtraCaterpillar, JuggerNaut, Obsidian, Sa1ntRobi, VCeb, X0sauce, Yaneca_b, algiz, axelot, covey0x07, glitch-Hunter, heavyw8t, khaye26, merlin, mgf15, molaratai, redtrama, tobi0x18, wickie, yoooo, zh1x1an1221

Vulnerability Details

In READMe, it is stated that any token can be used to zap into output tokens that can be use to supply to market for any zapping actions (zapDeposit, zapRepayAndWithdraw, zapRepay, zapLeverage).

It is observed that any leftover tokenIn supplied by the user in exchange for the tokenOut of choice will be send to the protocol's treasury.

Solidity
        ...
        if (msg.value == 0) {
            balanceTokenInLeft = tokenIn.balanceOf(address(this));
            if (0 != balanceTokenInLeft) {
@>                tokenIn.transfer(controlTower.feeTreasury(), balanceTokenInLeft);
            }

However for tokens like USDT, This means it is unable to support USDT due to the use of transfer, as these function do not return a boolean value. This means in the event that there are leftover amounts of USDT during calls to ZappingProxy.zapProxy, the call will consistently fail.

This results in consistent DOS for users who attempt to conduct Market actions using USDT.

Root Cause

Use of transfer function prevent USDT usage.

Mitigation

Use safeTransfer from SafeERC20 library.

LOC

https://github.com/sherlock-audit/2025-08-usg-tangent/blob/main/tangent-contracts/src/USG/Utilities/ZappingProxy.sol#L66

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/Tangent-labs/tangent-contracts/pull/114

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

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 plain transfer function on an arbitrary ERC20 token and assumes it returns a boolean, which tokens like USDT do not do.

Impact

Users cannot perform zap-based market actions with USDT whenever a leftover input balance exists, causing a consistent denial of service for that token.

What the attacker needed

Leftover tokenIn balance after zap; token is USDT or similar

The fix

The issue was fixed by switching to safeTransfer from the SafeERC20 library, 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, behave slightly differently from the standard token rules: when you ask them to move funds, they do not answer back with a yes/no value. The code here expects that answer, so the transaction fails. As a result, anyone trying to use USDT for these actions hits an error whenever there is a small leftover amount.

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 0xFlare

View all

2 more disclosed reports, best first.

More from USG - Tangent

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.