Skip to content
Business logic Audit finding Intermediate

wrong amount of `sUSD` is used to open a short position in synthetix

Audinarey Follow with John44, pashap9990 and 1 other

Originally disclosed on Sherlock

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

Found by

Audinarey, John44, pashap9990, valuevalk

Summary

per [OP sUSD](https://optimistic.etherscan.io/token/0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9#readContract) contract, the sUSD` has 18 decimals

In the liquidationType2() the amount variable is the amount of ETH used in the transaction to mint sETH and then exchanged to sUSD

Solidity
File: borrowLiquidation.sol
349:         // Exchange sETH with sUSD
350:         synthetix.exchange( 
351:             0x7345544800000000000000000000000000000000000000000000000000000000,
352:             amount,
353:             0x7355534400000000000000000000000000000000000000000000000000000000
354:         );
355: 
356:         // Calculate the margin
357:         int256 margin = int256((amount * currentEthPrice) / 100);
358:         // Transfer the margin to synthetix
359:         synthetixPerpsV2.transferMargin(margin);
360: 
361:         // Submit an offchain delayed order in synthetix for short position with 1X leverage
362:         synthetixPerpsV2.submitOffchainDelayedOrder(
363:             -int((uint(margin * 1 ether * 1e16) / currentEthPrice)), 
364:             currentEthPrice * 1e16
365:         );

The problem is that, the margin is suppose to be evaluated using the sUSD amount not the value of the amount of the original ETH asset.

Root Cause

No response

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

This can lead to unpredictable results during the liquidation including a DOS since the evaluated margin may be more that the actual amount od sUSD exchanged previously

PoC

No response

Mitigation

Consider using the amount of sUSD received after exchanging sETH to sUSD

The original report as published on Sherlock, by Audinarey. 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 medium-severity business logic bug in Autonomint Colored Dollar V1. Sherlock made it public on 19 January 2025. Found in the 569 audit contest (finding M-36), also found by 3 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.

More by Audinarey

View all

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