Auction AMM
Auction-based AMM that turns arbitrage profit into guaranteed rent for LPs, boosting yields.
Problem Statement
Automated Market Makers (AMMs) are the backbone of decentralized exchanges, but they have a key problem: Liquidity Providers (LPs) lose value whenever external arbitrageurs rebalance the pool. This phenomenon, called Loss vs Rebalancing (LVR), occurs because when market prices move, arbitrageurs trade against the pool to capture the price difference. LP token balances shift unfavorably, and the swap fees often do not fully compensate for this loss, reducing LP profitability and discouraging liquidity provision. Our project, the Auction-Managed AMM (am-AMM), addresses this by introducing a dynamic pool management mechanism via an on-chain auction. In the am-AMM: On-chain auction selects a Pool Manager for short intervals (per block or batch). The manager pays a guaranteed rent (R) to LPs, which replaces traditional swap fees as the LP revenue stream. The manager collects all swap fees and gains zero-fee access for arbitrage, allowing them to capture price discrepancies that would normally leak value to external arbitrageurs. The manager can dynamically set swap fees within a capped range to maximize revenue from retail traders. Because managers bid competitively for the role, rent R is set close to the expected extractable value from arbitrage and fees. This ensures that LPs are always compensated at least as much as they would earn from normal fixed-fee AMMs, and often more. If rent is too low, LPs withdraw liquidity, increasing the expected arbitrage opportunities and driving rent up — creating a self-correcting equilibrium. ---Technical Highlights: Constant-product pool (x * y = k) with dynamic fee override by the manager. Harberger-style on-chain auction for selecting the manager each block. Manager has zero-fee swap privilege, ensuring arbitrage profit is captured for LPs, not external bots. LPs retain full control over liquidity entry/exit, with only a small withdrawal fee to prevent rent gaming. Equilibrium ensures higher liquidity than any fixed-fee AMM pool under similar market conditions. ---Economic Benefits: LPs are insulated from external arbitrage losses. Pools stay closely aligned with market prices, improving trading efficiency. Competitive auction ensures the manager’s profit is bounded while LPs capture most of the pool’s extractable value. ---Optional Advanced Extensions: Private transaction execution to mitigate sandwich attacks. Multi-manager or rotating-manager designs to reduce centralization risk. In short: The am-AMM turns arbitrage MEV into guaranteed LP revenue, creating a market-driven, self-stabilizing mechanism that maximizes LP yield while maintaining pool efficiency and trader fairness.
Solution
Our Auction-Managed AMM (am-AMM) is built on an Ethereum-compatible stack using Solidity and tested with Hardhat. It combines three core components: AMM Pool Contract: Forked from UniswapV2 (x * y = k) with dynamic swap fees. Manager can override fees within a cap and execute zero-fee swaps to capture arbitrage. Fully composable with ERC20 tokens and other smart contracts. Manager Auction Contract: On-chain Harberger-style auction selects a Pool Manager for short intervals. The highest bidder pays rent R to LPs and collects swap fees. Automatic updates allow new bids to replace managers each block. LP Accounting / Rent Distribution: LPs deposit normally and earn rent R per block, instead of direct swap fees. Small withdrawal fee prevents rent gaming. LP entry/exit is fully flexible. Simulation & Testing: Used Python simulator for price shocks and arbitrage scenarios. Verified LPs always earn ≥ baseline revenue, and managers profit only when expected. Tested multiple competing managers and dynamic fee adjustments. Notable Implementation Tricks: Zero-fee swaps implemented via a modifier on pool contract, avoiding full Uniswap rewrite. Continuous on-chain auction optimized for low gas cost, with rent payments batched per block. Off-chain simulations helped tune fee caps and equilibrium rent before deployment. Technologies: Solidity, Hardhat, TypeScript + Ethers.js, Python, Ganache/Anvil, OpenZeppelin libraries. Summary: We merged a Uniswap-style AMM, an on-chain auction, and a rent distribution system to create a pool where arbitrage profits flow to LPs, not external bots, with fully on-chain execution and minimal trust assumptions.
Hackathon
ETHGlobal New Delhi
2025
Contributors
- 18aaddy
6 contributions
- agrawalx
5 contributions
- VeerChaurasia
4 contributions
- dxkx03
1 contributions