Orderflow Auction System
Last updated
Last updated
The Curvance orderflow auction system integrates on-chain and off-chain components to enable efficient liquidations with dynamic liquidation sizes and penalty rates.
Dynamic Liquidation Penalties: Adjustable between min and max values.
Transient Storage: Ensures penalties reset after auction transactions.
Atlas Integration: Permissionless MEV capture framework.
Oracle Integration: Curvance's pricing uses a dual-oracle system to prioritize risk mitigation, enhancing reliability and security.
Liquidation Buffer: 10 basis point margin ensuring Atlas transactions get priority for liquidations.
Efficient Batch Liquidations: Support for processing multiple liquidations in a single transaction.
The architecture consists of two primary layers:
Off-Chain Layer:
Price feed monitoring services detect significant changes.
Atlas auction system coordinates liquidator bidding.
Solver bid collection and ranking mechanism.
On-Chain Layer:
Market Manager handles liquidation execution.
Dynamic Penalty System manages incentive rates.
Atlas Buffer System provides priority access to liquidations.
These components work together to process liquidations with optimal penalty rates while maximizing value capture and minimizing bad debt risk.
Oracle Update & Operation Collection: Price feed updates create liquidation opportunities. Liquidators generate signed UserOps containing bid amounts and execution instructions.
Auction & Bundling: Fastlane (auctioneer) receives bids from liquidators in the form of signed AA (Account Abstraction) operations. The auctioneer then selects highest bidding operations and bundles them into a single atomic transaction with itself as tx.origin
.
Transaction Execution: The bundled transaction executes on the Atlas Entrypoint contract, which:
Performs pre-execution balance checks.
Calls each liquidator's operation in descending bid order.
Verifies bid payment through post-execution balance checks.
Continues to the next highest bidder if a liquidator fails to pay.
DApp Control: The protocol maintains control through specificSequencingActive
toggle and whitelist management of approved bundlers.
This mechanism maximizes MEV capture while ensuring liquidations always complete in a timely manner.
The journey from price change to liquidation execution follows these steps:
A price feed detects a significant change affecting position health.
Fastlane initiates an auction for liquidation rights.
Liquidators submit bids with penalty preferences and value offers.
Bids are ranked according to the system's ordering rules.
An Atlas transaction is constructed with winning bids.
Upon successful execution, auction value is distributed to stakeholders.
This auction typically completes within milliseconds off-chain before submitting the transaction.
The Atlas buffer system provides priority access to liquidations:
Buffer Mechanism: A 10 basis point (0.1%) buffer gives Atlas transactions priority for liquidations.
Implementation: When Atlas transactions are detected via transient storage, liquidation health checks apply the buffer.
Benefits:
Captures liquidations from interest accrual.
Handles LST (Liquid Staking Token) yield accumulation.
Compensates for network latency.
The dynamic penalty mechanism operates as follows:
Liquidators submit bids indicating their preferred penalty and close factor rate.
During Atlas transaction execution, the DAppControl calls setAtlasParameters()
.
The Market Manager stores this value in transient storage.
Liquidation executes using the dynamic penalty value.
Upon transaction completion, the penalty automatically resets to default.
This design ensures that penalties remain active only during the specific liquidation transaction, preventing any persistent state changes.
The system includes an effective fallback process for scenarios when Atlas is temporarily unavailable:
When Atlas is down, the system automatically falls back into using the base liquidation incentive and close factor values.
Regular liquidations proceed without the 10 bps advantage.
The fallback occurs seamlessly without delays.
Price feeds continue to function through a secondary oracle service.
The dynamic penalty system uses transient storage (tstore
/tload
) to ensure penalties only exist within the context of Atlas transactions.
The liquidation penalty value follows a simple state machine:
Default Penalty: Base incentive rate configured by governance.
Dynamic Penalty: Temporary value set during Atlas transaction.
Reset to Default: Automatic transition upon transaction completion.
The system uses transient storage to ensure dynamic penalties cannot persist beyond their intended scope.
The system enforces that only specific collateral can be liquidated during Atlas transactions:
The system supports efficient multi-liquidation processing:
Bulk Processing: Can handle multiple liquidations in a single transaction.
Cached Pricing: Retrieves asset prices once per transaction rather than per liquidation.
Consolidated Transfers: Aggregates debt repayments into a single transfer.
Gas Optimization: Significantly reduces gas costs during liquidation cascades.
This design allows for processing thousands of liquidations in a single transaction, improving efficiency during market stress.
The Atlas auction system is the core mechanism for capturing liquidation MEV in Curvance. When a liquidation opportunity arises, the system conducts a brief (typically 300ms) auction before submitting an on-chain transaction.
Each liquidation bid consists of these key elements:
Solver Address: The liquidator's smart contract that will execute the liquidation.
Execution Data: Calldata specifying which account to liquidate and method parameters.
Penalty Bid: The liquidation penalty rate the liquidator is willing to accept.
Close Factor Bid: The percentage of debt the liquidator wants to liquidate.
OEV Bid Amount: Payment offered to the protocol and other stakeholders.
Signature: Cryptographic verification of the bid's authenticity.
The auction system automatically classifies bids into two distinct categories:
Minimum Penalty Bids:
Uses the protocol-defined minimum penalty (e.g., 5%).
Must include a positive OEV payment amount.
Typically used during normal market conditions.
Higher Penalty Bids:
Specifies a penalty above the minimum (e.g., 6-20%).
No OEV payment required.
Used during high volatility or significant slippage.
The auction employs a specialized ranking system with these core rules:
Primary Ranking by Penalty Tier:
Minimum penalty bids compete exclusively against other minimum penalty bids.
Higher penalty bids compete based on the penalty rate offered.
Secondary Ranking Rules:
For minimum penalty bids: Higher OEV payment receives priority.
For higher penalty bids: Lower penalty rate receives priority.
Tertiary Sorting: When OEV payments or penalty rates are identical, bids are ordered by timestamp.
Example 1: Minimum Penalty Competition
Consider these bids at the minimum 5% penalty:
LiquidatorA
5%
10 ETH
10:00:01
LiquidatorB
5%
8 ETH
10:00:00
LiquidatorC
5%
12 ETH
10:00:02
Ranking order: LiquidatorC → LiquidatorA → LiquidatorB (sorted by highest OEV payment).
Example 2: Higher Penalty Competition
Consider these bids with penalties above minimum:
LiquidatorA
7%
0
10:00:01
LiquidatorB
8%
0
10:00:00
LiquidatorC
6%
0
10:00:02
Ranking order: LiquidatorC → LiquidatorA → LiquidatorB (sorted by lowest penalty).
Example 3: Mixed Competition
When both minimum and higher penalty bids exist:
LiquidatorA
5%
10 ETH
10:00:01
LiquidatorB
7%
0
10:00:00
LiquidatorC
5%
12 ETH
10:00:02
Ranking will attempt LiquidatorC first (highest OEV at min penalty), then LiquidatorA (second highest OEV at min penalty), then LiquidatorB (lowest penalty among higher penalty bids).
The Atlas transaction processes these bids sequentially:
The highest-ranked bid's solver contract is called first.
If execution succeeds, the transaction completes and value is distributed.
If execution fails, the next-ranked bid is attempted.
This continues until either a liquidation succeeds.
When a bid succeeds, the value is distributed according to the protocol's configured rules:
As specified in the DAppControl contract, the allocateValue hook distributes the OEV payment between:
The bundler (who submits the transaction).
Oracle (price feed provider).
Fastlane (Operations Relay infrastructure).
The Curvance treasury.
The exact distribution percentages are configured by Curvance governance.
OEV bids are only present when a solver wins with a penalty bid equal to the minimum penalty.
No OEV payment is included or distributed.
All excess value from the higher penalty accrues to the liquidator.
No value distribution to protocol or infrastructure stakeholders occurs.
This dual economic model aligns incentives effectively: during normal market conditions, the protocol captures value through OEV payments, while during stressed market conditions, liquidators retain more value to offset increased risk and ensure liquidations complete successfully.
Push vs. Pull Model:
Atlas OEV requires a push-based oracle model where price updates trigger on-chain events.
Each price update can initiate liquidation opportunities.
Transaction Sequencing:
When an oracle update transaction lands on-chain, it may trigger liquidations.
Atlas integrates with the oracle update process to capture OEV (Optimal Extractable Value).
Oracle Compatibility:
Designed to work with any push-based oracle.
RedStone push feeds are the primary integration target.
Support for LST (Liquid Staking Token) redemption rate oracles.
The system employs two distinct storage layers:
Permanent Storage:
Penalty ranges (min, max, default values).
Account health statuses.
System configuration parameters.
Transient Storage:
Dynamic penalty values during Atlas transactions.
Close factor values.
Collateral unlock status.
Values automatically reset after transaction completion.
This separation ensures critical data persists while dynamic values remain ephemeral.
Resources:
Atlas Docs: