Back to Library

Batch Auction

Groups individual orders and executes them simultaneously at a uniform clearing price.

Batch auctions aggregate buy and sell orders over a specified period and execute them simultaneously at a uniform clearing price. This price is determined when the total quantity of buy orders equals the total quantity of sell orders, ensuring market equilibrium. Unlike continuous trading, where orders are matched in real-time, batch auctions consolidate liquidity at discrete intervals. By aggregating orders, batch auctions can minimize the price impact of large individual trades, protect against MEV attacks, improve price discovery, and enhance gas efficiency in blockchain contexts.

The concept of batch auctions originates from market microstructure theory and auction theory in economics and finance. Batch auctions gained relevance onchain in the late 2010s as a potential solution to front-running and MEV issues. One of the early implementations was the Gnosis Protocol, now CoW Protocol, which was launched in 2020. Since then, various DEXs have adopted batch auctions, including dYdX. Besides being used for trading, batched auctions have also been used as a fundraising mechanism with fair price discovery, such as in the case of Gnosis Auctions.

Advantages

  • Reduced Market Impact: Aggregating orders can minimize the price impact of large individual orders, benefiting traders with significant positions.
  • MEV Protection: Can shield users from MEV attacks by removing the time advantage typically front-runners exploit.
  • Improved Price Discovery: Aggregating orders can lead to more accurate and stable pricing, especially in less liquid markets.
  • Cost-effective: Batching multiple trades into a single transaction can significantly reduce user costs.

Limitations & Risks

  • Reduced Immediacy: Batch auctions are periodic, so orders are not executed instantly, which may be unsuitable for time-sensitive trades. If significant market movements occur between batches, this can lead to outdated prices.
  • Potential for Gaming: Sophisticated participants might attempt to manipulate the auction by submitting strategic bids before the cutoff time.
  • Liquidity Concerns: In markets with low trading volume, batch auctions might not have sufficient liquidity to function effectively.

Design Considerations

  • Asset Scope: Define whether the auction supports dual-asset trading pairs (simpler execution) or multi-asset auctions, where multiple assets clear simultaneously, requiring advanced price discovery models. Options for multi-asset trades include coordinated settlement for multi-asset trades and partial fill policies, allowing assets with low liquidity to execute at a subset of orders rather than failing entirely.
  • Auction Frequency: Balance liquidity aggregation and execution speed. Consider dynamic intervals, where batch frequency adjusts based on trading volume or volatility, and event-triggered auctions, where an auction is triggered once a liquidity threshold is met instead of fixed time intervals.
  • Clearing Price: Ensure fair and efficient price determination. Look into pro-rata clearing, where orders are filled proportionally based on demand and supply curves, and solver incentives, rewarding offchain solvers for submitting optimized order matching strategies that maximize executed volume while ensuring fair pricing.
  • Order Types: Enhance trading flexibility with diverse order structures. Consider limit orders, where traders specify minimum/maximum prices, and batch-pegged orders, which adjust bids relative to real-time price feeds to remain competitive within the auction cycle.

Examples

CoW Protocol

Implements batch auctions for decentralized trading, allowing for multi-asset swaps and MEV protection. The protocol collects and aggregates orders off-chain and settles them in batches. These batches are then auctioned off to solvers who offer the most surplus for the orders, ensuring uniform clearing prices and minimizing the risk of MEV extraction.

dYdX

Employs Frequent Batch Auctions (FBA) where orders are grouped together in batches. Each batch undergoes an auction and a single uniform price is chosen to maximize traded volume. Orders whose limit prices cross the uniform price are matched by price priority. If multiple orders share the same price, they participate in trades pro-rata.

Gnosis Auction

Enables projects to conduct Initial DEX Offerings through batch auctions. The project determines the minimum price they are willing to sell their tokens for, and bidders set the maximum price they are willing to pay. At the end of the batch auction, all trades are settled based on where the buying demand and token supply meet. This way both participants get either what they were willing to receive or more.