Skip to content
Business logic Audit finding Intermediate

Malicious Actors Can Exploit Incorrect USDa-USDT Price in redeemUSDT Function to Drain Funds

The redeemUSDT function in the CDS contract accepts USDA and USDT prices from the user without validation. An attacker can supply incorrect prices to receive more USDT than entitled, potentially draining the protocol's funds.

0x23r0 Follow with 0x37, 0xAristos and 43 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-11-autonomint-judging/issues/1038

Found by

0x23r0, 0x37, 0xAristos, 0xGondar, 0xNirix, 0xRaz, 0xTamayo, 0xbakeng, 0xloophole, Abhan1041, Audinarey, DDYYWW, EmreAy24, IzuMan, John44, Kirkeelee, LZ_security, LordAlive, OrangeSantra, ParthMandale, PeterSR, RampageAudit, Waydou, dgnnn, dimah7, durov, elolpuer, futureHack, gss1, influenz, itcruiser00, jah, montecristo, newspacexyz, nuthan2x, pashap9990, rahim7x, santiellena, smbv-1923, super_jack, t.aksoy, theweb3mechanic, valuevalk, vatsal, volodya, wellbyt3

Summary

In the redeemUSDT function of the CDS contract, the USDA and USDT prices are supplied by the user without any validation for accuracy. This lack of verification allows an attacker to input fraudulent USDA-USDT prices, enabling them to withdraw more USDT than they are entitled to, which could result in the draining of the protocol's funds.

Root Cause

https://github.com/sherlock-audit/2024-11-autonomint/blob/0d324e04d4c0ca306e1ae4d4c65f0cb9d681751b/Blockchain/Blockchian/contracts/Core_logic/CDS.sol#L506C4-L545C6

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

An attacker can exploit the redeemUSDT function of the CDS contract by providing incorrect USDA and USDT prices as parameters. The function calculates the USDT value based on these user-provided inputs, and since there is no validation of their accuracy, the attacker can manipulate the values. This allows the attacker to receive an inflated amount of USDT, potentially draining the protocol’s funds.

Impact

The attacker can drain the protocol’s funds by providing incorrect USDA and USDT prices, exploiting the lack of price validation in the redeemUSDT function. This allows the attacker to withdraw more USDT than intended, leading to a loss of funds for the protocol.

PoC

No response

Mitigation

The protocol should not rely on user-inputted prices and instead utilize oracle prices for price validation. This would ensure that the USDA and USDT prices used in the redeemUSDT function are accurate and prevent attackers from exploiting incorrect price inputs to drain the protocol’s funds.

The original report as published on Sherlock, by 0x23r0. 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

Impact

The attacker could withdraw more USDT than intended, potentially draining the protocol's funds.

What the attacker needed

None

The fix

The protocol should use oracle prices instead of user-inputted prices for validation.

How it was found

  1. Call the redeemUSDT function with incorrect USDA and USDT price parameters.
  2. The function calculates the USDT value based on these user-provided inputs.
  3. Receive an inflated amount of USDT.

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.

A smart contract lets users swap one token for another, but it trusts the user to say what each token is worth. By lying about the prices, an attacker can get more tokens than they should, taking money from the contract.

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.

More by 0x23r0

View all

23 more disclosed reports, best first.

More from Autonomint Colored Dollar V1

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.