Skip to content
Business logic Audit finding Intermediate

Liquidation will reduce total cds deposited amount, leading to incorrect option fees

0x73696d616f Follow

Originally disclosed on Sherlock

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

Found by

0x73696d616f

Summary

borrowLiquidation::liquidationType1() reduces omniChainData.totalCdsDepositedAmount, so the option fees will be calculated on this reduced total cds depositors, but the normalized deposit of each borrower still amounts to their initial value, overcharging option fees.

Root Cause

In borrowLiquidation:248, the omniChainData.totalCdsDepositedAmount is reduced, but the option fees normalized deposits are not accounted for.

Internal pre-conditions

None.

External pre-conditions

None.

Attack Path

  1. ETH price is 1000 USD / ETH.
  2. Cds depositor deposits 1000 USDa.
  3. Borrower deposits 1 ETH and borrows 800 USDa. Assume no option fees are charged.
  4. Price drops to 800 USD / ETH.

At this point, the total normalized amount of the cds depositor is 1000 (1000 USda divided by 1 rate). 6. Borrower is liquidated and omniChainData.totalCdsDepositedAmount becomes 360 (1000 - (800 + 20 - 180), where 800 is the debt, 20 is the amount to return to abond and 180 is the cds profits). 7. New borrower deposits and pays 50 USD option fees. CDS::calculateCumulativeRate() calculates percentageChange as 50 / 360. The new rate becomes 1 * (1 + 50 / 360) = 1.1389. 8. Borrower withdraws. 9. Cds depositor withdraws, getting from option fees 1000 * 1.1389 - 1000 = 138.9, way more than it should.

Impact

Cds depositor gets much more option fees than it should.

PoC

See above.

Mitigation

Adjust the cumulative rate when reducing the cds deposited amount with option fees or similar.

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

What is known

A high-severity business logic bug in Autonomint Colored Dollar V1. Sherlock made it public on 19 January 2025. Found in the 569 audit contest (finding H-29).

About Business logic

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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

View all

172 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.