Batch Auctions: The New Trading Mechanism for DeFi

The Barter System of Executing Trades

Richard Larsson
Coinmonks
Published in
8 min readOct 3, 2023

--

Batch auctions are the latest buzz on the DEX’s scene.

Bringing fair price discovery and aggregated liquidity to the DEXs. And with the MEV getting extracted in hundreds of millions of dollars on Ethereum alone, they present a brilliant solution to the never-ending arms race for speed.

These trading mechanisms aren’t new to the traditional financial world and have recently gained popularity in the context of blockchain-based exchanges.

Protocols like UniswapX, CoW Protocol, 1inch Fusion, etc., already use the mechanism to fulfill trades in real-time, off-chain, and in batches rather than blocks.

I believe batch auctions hold the potential to change DeFi, and this is my attempt at breaking down the concepts in the simplest way possible for you to understand.

How Do DEXs Usually Operate?

Unlike CEXs (Centralized exchanges) that depend on order books, DEXs mostly operate using automated market makers (AMM) and liquidity pools.

These AMMs rely on blockchain services called oracles to gather information from other exchanges and set the prices of traded assets.

The DEXs don’t match buy orders and sell orders. Instead, they use pre-funded pools of assets called liquidity pools. Other users called Liquidity Providers (LPs) fund these pools with relevant tokens and earn a portion of the transaction fees the protocol charges on executing that pair.

The Problem with Liquidity Pools

Ironically, these liquidity pools can suffer from a lack of liquidity, leading to slippage.

DEXs offer fragmented and limited liquidity compared to CEXs.

Slippage causes a buyer to pay above-market prices on their orders. As a result, large traders refrain from executing their trades through DEXs. Traders can also face impermanent loss if the token prices are volatile. In a trading pair, when the price of one token increases or decreases more than the other, the liquidity provider suffers losses.

Front-running or MEV extraction is the biggest issue liquidity pools face.

Transactions in the same block are treated differently in the order miners decide to include them in the block. This means identical trades within the same block can have different prices.

Since this process is arbitrary (or based on greed — the higher the gas fees, the faster your transaction execution), searchers/traders can exploit the ordering mechanism to front-run their transaction and earn profits at the expense of other traders.

Batch Auctions: How They Overcome the LP Issue

A simple solution can overcome the ills of the transaction ordering mechanism within a block– executing transactions in batches at a single price.

It’s called the batch auction mechanism.

Competition on Speed → Competition on Price

Sequential Ordering → Batch Execution

Result:

Elimination of arms race for transaction execution, fairer price discovery, and enhanced liquidity.

What Exactly Are Batch Auctions?

A batch auction is a trading mechanism in which individual orders are grouped together and executed simultaneously at the same uniform clearing price.

Traditionally, batch auctions are performed on single token pairs like orderbooks.

But in blockchain, we see multi-dimensional batch auctions or ring transactions where several orders for multiple tokens are executed in the same batch.

Batch auctions are a particularly beneficial mechanism in initial token offerings (ITOs), liquidations, or buybacks involving fragmented liquidity or less liquid token pairs.

Batch auctions happen both on-chain and off-chain.

The transactions aren’t executed immediately. Instead, they are collected and settled in batches. The transactions are then executed together without concern for the order at a uniform clearing price.

DEXs can benefit from improved price offerings through batch auctions, which combine new economic mechanisms such as Coincidence of Wants (CoW) and Uniform Clearing Prices.

So, what is CoW?

The Ethereum ecosystem has a DEX called CoW Protocol, based on and named after the economic mechanism CoW. Let’s not get confused.

We are talking about the CoW mechanism here.

CoW is an economic phenomenon where two parties each hold an item the other wants and exchange these items directly.

CoW, or Coincidence of wants, runs on the idea of a gigantic barter economy.

Suppose Trader A wants to sell X tokens in exchange for Y tokens. Similarly, Trader B wants to buy X tokens in exchange for Y tokens. Trader A and Trader B can directly trade against each other without the involvement of money in a barter fashion. Or, they may go to P2P markets like the DEXs in discussion.

This is what we know as the coincidence of wants.

When a trader holds a token the other wants, the order can be settled between them directly via a batch auction or ring trades, where multiple trades occur simultaneously.

Let’s study the process in more detail.

How Does a Batch Auction Work?

Batch auctions are tailored for the Coincidence of Wants.

Therefore, traders can get trades executed without the additional step of dealing with money.

Here’s a step-by-step breakdown of how trades get executed through batch auctions.

Source

When submitting a transaction, the user signs a ‘trade intent,’ defining the limit in an off-chain message.

Felix Leupold, Technical Lead at CoW Swap, explains the search intent, “I want to sell token A for token B, and here’s my limit price. But I don’t care exactly how it is executed.”

The intent is handed off to the ‘solvers.’ Solvers stake tokens to participate in the competition. They compete to find the best execution path while the order is being made valid.

Individual trades placed into the API within a 30-second timeframe are aggregated into the same batch.

The solver who finds the optimal trade solution gets the right to execute the batch and earn rewards.

Multi-dimensional Trades Through Ring Trades

Ring trades maximize liquidity on a multi-dimensional orderbook. They share liquidity across all tokens rather than a single token pair.

Let’s understand this with the help of an example trade from CoW Swap.

Suppose there are four users.

Eli wants to trade his ETH for DAI. Edith wants ETH for USDT. Lily wants USDT for her COW tokens. And Chow is looking to find COW tokens for his DAI.

So, how would a batch auction take place in such a case scenario?

Eli sends her ETH to Edith; Edith gives his USDT to Lily, Lily gives her COW to Chow, and Chow, finally, gives his DAI to ELI. This completes a three-party CoW ring trade, fulfilling each person’s want in the same batch.

What does a ring trade afford?

Using the same example, Eli uses Edith, Lily, and Chow as proxies to obtain DAI successfully, even though she doesn’t have COW to give to Chow. A similar proxy situation happens with the other three users.

This is a very simplified example of a ring trade.

Ring trades lower the spread, resulting in efficient and optimized transaction management.

Batching transactions also helps users to get better prices.

How Do Batch Auctions Benefit the Overall DeFi Ecosystem?

Everywhere and anywhere, the aim is to make the systems more efficient and cost-effective.

DeFi is no different.

Beyond AMMs and liquidity protocols, batch auctions are the obvious next step toward budding user-centric, efficiency-driven protocols in DeFi.

On-chain Plus Off-Chain

On-chain transactions are aggregated off-chain in batches and then executed on-chain.

Batch auctions allow on-chain and off-chain transactions to come together under one transaction, bringing the utility of both.

One Price. One Token. One Batch.

If two people trade the same token in the same batch, there will be only one uniform price clearing.

Batch auctions allow fair price discovery.

The concept of transaction ordering is eliminated. Only the most optimal price that benefits the users gets selected.

Maximum Benefit to the Users

Since batch auctions eliminate the validator task of reordering transactions, there’s no race to get ahead in the queue and pay higher gas fees.

The reduced liquidity pool fees and price differential pass on as optimum prices to the users.

Also, because batch auctions mean zero MEV, unfair pricing, and manipulations are eliminated. There are no bots extracting value.

Additionally, the value saved is passed on to the users as it should be.

Since the entire onus of transaction execution is on the protocol, the complexities are reduced, and there is a least learning curve involved.

Lesser Centralization Through MEV

Batch auctions are crucial to protecting Ethereum Core Protocol against the centralization force of negative externalities such as MEV.

The introduction of PoS has accelerated this centralization. Even the Proposer Builder Separation (PBS) isn’t doing any good. Validators may get decentralized, but builders may produce 60–95% of all blocks.

With batch auctions, all these issues can be resolved.

The focus can be shifted from extracting the maximum value and getting the maximum network share to deriving utility for the users.

Batch Auctions: A Tool to Prevent MEV?

There are thousands of tokens in the DeFi space, which makes the market liquidity vastly fragmented.

Market makers like AMMs on DEXs provide liquidity for the expansive spread of tokens. But there’s a catch.

When you want token A for token B, the protocol will find the best on-chain route and give back a transaction. You can use your MetaMask account to submit this transaction to the blockchain for it to get executed.

The transactions occur sequentially in a block, and within the time they are deposited to their execution, the prices may change. As transactions line up to get executed in a block, they may get sandwiched or front-run by MEV bots.

Enter Batch auctions. *MEV leaves the group chat.*

Deployment of batch auctions works in dual ways. The transactions are aggregated in an off-chain orderbook instead of arbitrary ordering and censoring by validators on-chain.

This offsets the centralization risks presented by the validators.

On-chain, transactions are executed in batches at a single price for the same token within the batch. There’s no sequencing or ordering involved. Consequently, MEV bots can roam endlessly for front-running or sandwich opportunities and still find none.

Bartering Efficiency in Trades with Batch Auctions

To protect the DeFi ecosystem from further centralization forces and MEV bots, batch auctions need to be implemented to the maximum of transactions happening in the DeFi ecosystem.

Batch auctions limit arbitrage opportunities, but their benefits outweigh the cons.

Batch auctions can revolutionize existing market economics through stakeholder protection and efficiency in trade execution.

--

--

Richard Larsson
Coinmonks

I share insights on Web3, leadership and entrepreneurship from the perspective of a CTO every week.