Table of Contents
Fetching ...

Automated Market Makers for Cross-chain DeFi and Sharded Blockchains

Jon Michael Aanes, Jesper Balman Gravgaard, Peter Bro Miltersen, Kurt Nielsen, Mohsen Pourpouneh

TL;DR

The paper tackles enabling atomic-like sequences of swaps across cross-chain or sharded DeFi AMMs by introducing the lock-swap mechanism, which grants price quotes (locks) across distributed pools and lets traders decide later whether to execute. The central contribution is the retroactive pool, a concrete implementation that preserves asset positivity and product preservation while allowing contingent execution of swaps across multiple pools. It provides a Python prototype and discusses practical restrictions to maintain tractable performance, as well as economic and regulatory implications of lock-swaps in live markets. Overall, this work lays a formal and implementable framework for cross-chain DeFi sequences, bridging the gap between atomic execution and distributed liquidity across shards. Acknowledging the complexities of real-world deployment, it also suggests governance mechanisms (e.g., time-limits, fees, or permissioned routers) to ensure timely resolution of locks and stable market behavior.

Abstract

We consider Uniswap-like automated market makers, and, specifically, constant product liquidity pools, operating on blockchains. An important feature of Uniswap is the ability for a trader to carry out a sequence of asset swaps atomically, without other traders changing the prices along the way. This atomic-execution feature is not immediately available in cross-chain or sharded blockchain settings, where different liquidity pools are distributed across different chains or shards. Our contribution is a description and suggested implementation of a new functionality that might be added to individual liquidity pools, the {\em lock-swap}. The lock-swap enables a trader to get a guarantee for the price associated with a swap but only decide later whether or not to carry out the swap. Applied across several liquidity pools, it guarantees the trader assured prices for all swaps in a swap sequence and lets these prices inform the trader's decision about whether or not to carry out the sequence, thus essentially giving the trader the same benefits an atomic execution of the sequence would have provided him. However, in contrast to an atomic execution, our functionality does not prevent other traders from doing swaps during the time where the sequence is planned and possibly carried out. Nor does it prevent liquidity providers from adding or removing liquidity to and from the liquidity pool in that time period.

Automated Market Makers for Cross-chain DeFi and Sharded Blockchains

TL;DR

The paper tackles enabling atomic-like sequences of swaps across cross-chain or sharded DeFi AMMs by introducing the lock-swap mechanism, which grants price quotes (locks) across distributed pools and lets traders decide later whether to execute. The central contribution is the retroactive pool, a concrete implementation that preserves asset positivity and product preservation while allowing contingent execution of swaps across multiple pools. It provides a Python prototype and discusses practical restrictions to maintain tractable performance, as well as economic and regulatory implications of lock-swaps in live markets. Overall, this work lays a formal and implementable framework for cross-chain DeFi sequences, bridging the gap between atomic execution and distributed liquidity across shards. Acknowledging the complexities of real-world deployment, it also suggests governance mechanisms (e.g., time-limits, fees, or permissioned routers) to ensure timely resolution of locks and stable market behavior.

Abstract

We consider Uniswap-like automated market makers, and, specifically, constant product liquidity pools, operating on blockchains. An important feature of Uniswap is the ability for a trader to carry out a sequence of asset swaps atomically, without other traders changing the prices along the way. This atomic-execution feature is not immediately available in cross-chain or sharded blockchain settings, where different liquidity pools are distributed across different chains or shards. Our contribution is a description and suggested implementation of a new functionality that might be added to individual liquidity pools, the {\em lock-swap}. The lock-swap enables a trader to get a guarantee for the price associated with a swap but only decide later whether or not to carry out the swap. Applied across several liquidity pools, it guarantees the trader assured prices for all swaps in a swap sequence and lets these prices inform the trader's decision about whether or not to carry out the sequence, thus essentially giving the trader the same benefits an atomic execution of the sequence would have provided him. However, in contrast to an atomic execution, our functionality does not prevent other traders from doing swaps during the time where the sequence is planned and possibly carried out. Nor does it prevent liquidity providers from adding or removing liquidity to and from the liquidity pool in that time period.
Paper Structure (9 sections, 5 theorems, 16 equations, 3 figures)

This paper contains 9 sections, 5 theorems, 16 equations, 3 figures.

Key Result

Theorem 1

Product preservation. Consider an $(a^*, b^*) \leftarrow p$. reclaim$(t)$ operation for some liquidity token portion $t$ in a trace of a classical liquidity pool $p$. Per the requirements of the definition of reclaim, let $\Delta a, \Delta b$ be values provided as arguments in the earlier $t \left

Figures (3)

  • Figure 1: Python generator implicitly representing the set of traces $T$ maintained in the pool state of the retroactive pool
  • Figure 2: Python generator implicitly representing the set of traces $T$, no unresolved reclaims
  • Figure 3: Python generator implicitly representing the set of traces $T$, no unresolved provides

Theorems & Definitions (8)

  • Theorem 1
  • Theorem 2
  • proof
  • Theorem 3
  • proof
  • Theorem 4
  • proof
  • Corollary 1