Missing Update to `omnichain.totalAvailableLiquidationAmount` in `withdrawUser`
0x37 Follow with 0x73696d616f, Cybrid and 2 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2024-11-autonomint-judging/issues/930
Found by
0x37, 0x73696d616f, Cybrid, Waydou, volodya
Summary
In the deposit function we update omnichain.totalAvailableLiquidationAmount based on the enw deposit, however The Withdraw function processes user withdrawals but fails to update the omnichain.totalAvailableLiquidationAmount. This omission creates a discrepancy between the protocol's actual liquidation capacity and the recorded available amount. While the deposit function correctly adjusts this value, the absence of an update during withdrawals leads to an inflated totalAvailableLiquidationAmount, potentially allowing the protocol to overcommit its liquidation resources.
Root Cause
- The
withdrawUserfunction processes user withdrawals without adjusting theomnichain.totalAvailableLiquidationAmountto reflect the reduced CDS pool. - The
depositfunction, in contrast, correctly updates this value when users contribute to the CDS pool.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
- A user withdraws their CDS funds, but the protocol does not update omnichain.totalAvailableLiquidationAmount.
- During liquidation, the protocol calculates user shares based on the inflated value.
- The overestimated
totalAvailableLiquidationAmountcauses some liquidation gains to remain undistributed, locking funds in the protocol.
Impact
- A portion of liquidation gains remains locked in the CDS pool, reducing the funds distributed to eligible users.
- Remaining CDS participants receive a smaller share of the liquidation gains than they are entitled to.
PoC
- State Before Withdrawal:
- omnichain.totalAvailableLiquidationAmount = 1,000,000 USDa.
- User withdraws 200,000 USDa.
- Expected Behavior:
- omnichain.totalAvailableLiquidationAmount is reduced to 800,000 USDa.
- Actual Behavior:
- omnichain.totalAvailableLiquidationAmount remains 1,000,000 USDa.
- During Liquidation:
- Assume liquidation generates 500,000 USDa in gains.
- Share calculation uses the inflated 1,000,000 USDa instead of the actual 800,000 USDa.
- 100,000 USDa of the gains remains locked due to the overestimated pool size.
Mitigation
params.omniChainData.totalAvailableLiquidationAmount -= params.cdsDepositDetails.withdrawedAmount;
I should note there seems to be no update on omnichain, this should be looked at
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-28), also found by 4 other wardens.
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.