Skip to content
Business logic Audit finding Intermediate

Unintended Downside Protection Exploitation in Borrowing Withdrawal Mechanism

The borrowing withdrawal logic applies downside protection to a borrower's debt without checking whether the option that provides that protection is still within its 30-day maturity window. A borrower who lets the option expire can still withdraw and repay less debt than intended, causing a loss to the protocol.

0x37 Follow with 0xbakeng, LordAlive and 12 others

Originally disclosed on Sherlock

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

Found by

0x37, 0xbakeng, LordAlive, ParthMandale, PeterSR, futureHack, gss1, influenz, onthehunt, pashap9990, santiellena, valuevalk, volodya, wellbyt3, zatoichi0826

Summary

A significant vulnerability exists in the protocol's downside protection mechanism where borrowers can receive protection benefits during withdrawal even after their options have expired. While the system is designed to provide downside protection for the initial 30-day maturity period in exchange for an option fee, the current implementation fails to properly validate the maturity timeline during withdrawals.

Root Cause

No check implementation is done for checking if the borrower's depositDetail.optionsRenewedTimeStamp time comes under maturity time from the current time (block.timestamp) Even if the borrower has not even renewed options for more than 30 days maturity time then also he will get downside protection from the protocol, and that's the ISSUE as the protocol will have to take loss because user will pay back the protocol less debt amount than intended.

Here Calculation happening for borrower's downside protection (even if he is not in options maturity, because of lack of check):

Solidity
            uint128 downsideProtected = calculateDownsideProtected(
                depositDetail.depositedAmountInETH, params.ethPrice, depositDetail.ethPriceAtDeposit
            );

Next Total Debt Amount to pay back is getting subtracted with that calculated downside protection amount, and user is paying less than indended to protocol. Ultimatly here Protocol will suffer.

Solidity
depositDetail.totalDebtAmountPaid = borrowerDebt - downsideProtected;

Internal pre-conditions

Downside protection is calculated to a positive number when the provided asset in eth price at the time of deposit was more than the price of current eth price. ie. when the collateral price is fallen below.

External pre-conditions

No response

Attack Path

. Borrower initiates a loan position 2. Deliberately waits for an extended period (e.g., one year) without renewing options 3. Executes withdrawal after significant price movements 4. Receives unauthorized downside protection benefits 5. Repays reduced debt amount despite expired protection

Impact

The vulnerability creates a substantial financial risk for the protocol as it allows borrowers to unfairly benefit from expired protection mechanisms. This results in:

  • Unauthorized reduction in debt repayments
  • Protocol financial losses
  • Exploitation of price movements without valid option coverage

PoC

No response

Mitigation

Implement strict validation of option maturity during withdrawal:

  • Add timestamp verification for depositDetail.optionsRenewedTimeStamp
  • Only apply downside protection for positions within valid maturity periods
  • Require full debt repayment for expired options

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

Likely the withdrawal path calculates and subtracts downside protection from the debt without verifying that the borrower's option renewal timestamp is still within the maturity period.

Impact

Borrowers could repay less debt than intended, causing financial loss to the protocol, though this only matters when the collateral price has fallen below the deposit price.

What the attacker needed

An open borrowing position; collateral price below deposit price; option left unrenewed past maturity

The fix

The withdrawal logic should verify the option renewal timestamp and only apply downside protection within a valid maturity period, requiring full repayment once the option has expired.

How it was found

  1. Borrower initiates a loan position
  2. Borrower waits a long time without renewing options
  3. Borrower executes withdrawal after price movements
  4. Borrower receives downside protection and repays a reduced debt

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 borrower can pay a fee for 'downside protection', which reduces what they owe if the collateral price falls, but only for 30 days. The code forgets to check that the 30 days have not passed, so someone can wait a long time and still get the discount. That means the protocol receives less money back than it should.

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

View all

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