Automated Arbitrage Market Makers (A2MM)
- A2MMs are decentralized trading protocols that integrate cost-function pricing and bandit learning to systematically exploit and align market price discrepancies.
- They employ compositional architectures to enable atomic arbitrage across interconnected AMMs, ensuring risk-managed liquidity provision and LP welfare.
- A2MMs enhance blockchain security and efficiency by mitigating frontrunning, reducing swap fees, and maintaining bounded risk with adaptive overround tuning.
Automated Arbitrage Market Makers (A2MMs) are a class of decentralized trading mechanisms and protocols that algorithmically exploit and resolve price discrepancies across markets, integrating adaptive algorithmic pricing, risk management, and arbitrage execution as part of the market design. Foundational literature reflects the evolution of A2MMs from modular cost-function frameworks with online learning, through compositional and cross-venue arbitrage architectures, to contemporary designs focused on ecosystem security, efficiency, and liquidity provider (LP) welfare.
1. Foundations: Cost-Function Market Makers and Bandit Algorithms
A2MMs are rooted in cost-function based automated market makers, where the state-dependent pricing is generated by the gradient of a convex, monotonic, and bounded cost function , with the market position. The price vector is , and trade execution moves the state at total cost . To enable profit extraction while maintaining bounded risk, the “overround” cost function introduces a multiplicative scalar : . The overround determines the aggregate price sum , setting a markup over the fair prices and controlling the risk-reward tradeoff between margin and market depth (Penna et al., 2011).
Since the market maker is uncertain of the demand response at each overround, online learning is integrated through bandit algorithms (e.g. EXP3, CAB). The overround forms the continuous action space (“arms”) and, after each trade, the bandit algorithm observes the incremental change in the market maker’s worst-case profit:
This modular schema yields bounded liability, adaptive profit maximization, and distribution-free (worst-case) regret bounds over profit relative to the best overround in hindsight.
2. Abstract Models and Arbitrage Alignment
A2MMs generalize to arbitrary swap rate functions with structural properties: output-boundedness (), monotonicity, additivity, reversibility, and homogeneity. Composing the operational update rules for deposits, redeems, and swaps, the mechanism ensures deterministic state transitions, non-depletion, preservation of token quantity and net worth, and the liquidity of LP tokens (Bartoletti et al., 2021).
Arbitrage is modeled as a one-shot game: a rational agent selects a swap that maximizes gain, given by
and arbitrage is optimal when the internal marginal price is forced to match the external (oracle) price. The unique optimal trade is such that after , the new internal exchange rate equals the oracle:
These axioms guarantee that arbitrageurs systematically align pool prices to external markets, providing endogenous price oracles while ensuring mathematically tractable incentive properties.
3. Networks, Composition, and Cross-Market Architectures
In fragmented or multi-pool environments, A2MMs rely on closed compositional operators (Engel et al., 2021). Sequential composition yields composite AMMs that chain two or more AMMs such that the output asset from one serves as input for the next—e.g.,
where and are the curves of the component AMMs. Parallel composition allows optimal splitting of order flow across AMMs, with the combined price function
where is set to equalize marginal prices, thus optimally routing trades and arbitrage across pools.
The closure of composition ensures that the composite AMM inherits stability, strict convexity, and unique equilibrium characteristics. Arbitrage opportunities arising in interconnected AMM networks can thus be systematically exploited by A2MMs, guaranteeing price alignment even in high-dimensional, multi-asset markets.
4. On-Chain Execution, Frontrunning Resistance, and MEV Mitigation
A2MMs deployed on blockchain-based DEXs must address adversarial trading phenomena, most notably frontrunning and Miner (or Maximal) Extractable Value (MEV). The A2MM architecture integrates atomic, cross-AMM swap routing and arbitrage (Zhou et al., 2021). Upon receiving a swap request, the protocol:
- Splits the order among multiple AMMs for optimal pricing.
- Immediately executes atomically paired arbitrage trades to synchronize prices across pools.
- Consolidates these operations within a single on-chain transaction, eliminating windows for external frontrunning and reducing network and consensus overhead.
Formulas central to state transitions and routing optimization include:
with optimal order splitting determined via greedy algorithms maximizing global output subject to pool constraints.
Empirical evaluations have shown substantial benefits: freeing 32.8% of block space previously consumed by failed arbitrage transactions; lowering swap fees by up to 90%; and shrinking the stale block rate and back-running flooding, thereby directly bolstering blockchain security and consensus stability.
5. Overround Tuning, Regret Minimization, and Bounded Loss
The interaction between profit margin and market depth in A2MMs is controlled by the overround parameter in the cost function family . Through its bandit learning module, the A2MM adaptively selects the overround offering optimal trade-offs based on observed profit signals. For instance, higher increases per-unit profit but may reduce traded volume, and vice versa. The reward function’s Lipschitz continuity () ensures efficient continuous-armed bandit learning, with sublinear regret to the best fixed strategy even under adversarial flow (Penna et al., 2011).
Bounded-loss is maintained via the convexity and monotonicity of cost functions, with worst-case guarantee that no trade sequence can push the AMM’s liabilities beyond predetermined limits—establishing robust protection for LPs against tail adverse selection events.
6. Simulation Evidence and Real-World Performance
Testing of A2MM algorithms in both i.i.d. and regime-shift scenarios has demonstrated adaptive overround learning and robustness to market shocks. In i.i.d. trader belief models, a fixed overround AMM achieved roughly $2/3$ of the theoretical maximum profit benchmark, while a bandit-market maker secured about $2/5$, albeit with adaptive regret guarantees. Under abrupt market regime changes, the bandit-driven A2MM effectively navigated new regimes, quickly adjusting its overround and maintaining bounded risk and competitive per-period profit measures (Penna et al., 2011).
These results underscore that while adaptivity to uncertain demand imposes some short-term opportunity cost relative to static “clairvoyant” strategies, the adaptive A2MM achieves robust, distribution-free profit guarantees and resilience in volatile or non-stationary markets.
7. Broader Implications and Outlook
The A2MM paradigm, through its synthesis of cost-function market making, online bandit learning, and on-chain atomic arbitrage execution, sets the template for risk-managed, profit-seeking, and equilibrium-enforcing liquidity infrastructures. Its mathematical foundations guarantee:
- Bounded-loss for LPs
- Adaptive, regret-minimizing margin setting in the face of unknown trader demand curves
- Compositional stability in networked or multi-venue settings
- System-level resilience to adversarial trading (MEV/extractive behaviors)
- Endogenous price discovery and oracle minting.
As AMM research matures, ongoing work explores extensions to high-dimensional state spaces, compositional networks, and dynamically robust mechanisms for market shocks. The approach also informs the development of A2MM implementations that formally encode fundamental economic guarantees (stability, arbitrage-incentivization, compositionality) as smart contract invariants, supporting the secure evolution of decentralized markets.