Skip to content

feat: Integrate Liquidity Party #296

@timolson

Description

@timolson
Image

Introduction

Liquidity Party is a new multi-asset AMM currently in beta on the Sepolia testnet.

Our AMM is based on the paper Logarithmic Market Scoring Rules for Modular Combinatorial Information Aggregation by R. Hanson, 2002. Our implementation, described in the whitepaper, introduces proportional mint/redeem semantics, scales the liquidity parameter with TVL, solves closed forms for asset-to-asset and asset-to-LP swaps, proves maximum error bounds for a stablecoin pair optimization, and reformulates LMSR to be numerically stable within a Q64.64 fixed-point domain.

Tycho Benefits

Single-Hop Rare Pairs

Liquidity Party is naturally a multi-asset pool that can support a large number of assets in a single pool, providing full liquidity on all pair combinations. A 20-asset pool offers 190 pair combinations without any fragmentation of liquidity:

Assets Pairs Swap Gas Mint Gas
2 1 131,000 143,000
2* 1 118,000 143,000
10 45 142,000 412,000
20 190 157,000 749,000
50 1225 199,000 1,760,000
100 4950 269,000 2,684,000

* Stablecoin Pair optimization

A Liquidity Party pool with USDT-USDC-WETH-WBTC-WSOL-POLY-AVAX-BNB-PEPE-WIF-... etc., can offer full liquidity on WSOL/WIF or PEPE/BNB just as easily as USDT/USDC. Tycho solvers and searchers will save money by reducing double-fee two-hop routes into a single swap.

Deeper Liquidity

Compared to constant-product AMM's like Uniswap, LMSR offers deeper liquidity for the small and medium trade sizes common among searchers, solvers, and retail traders, while charging more slippage than constant-product during large market dislocations that are usually toxic flow for LP's. This allows Liquidity Party to charge lower fees and offer deeper liquidity, while also improving protection for LP's against adverse selection.

Image

This comparison illustrates Liquidity Party's lower total cost for small and medium trade sizes, compared to empirical slippages sampled from a Uniswap v4 pool with the same TVL. The area in green shows the trade sizes for which Liquidity Party will offer market-leading swaps.

Integration

We are developing the Tycho DEX adapter in-house and are grateful to the Tycho community for the opportunity to offer our integration. We hope to complete an EVM-based (non-native) adapter for Sepolia in November for your review. We will launch on Ethereum initially, with L2 deployments to follow.

It's a traditional DEX model where each pool is its own contract and ERC20 LP token, deployed and managed by a singleton factory contract.

We do not plan to support asset-to-LP "swap-mint" or LP-to-asset "burn-swap" operations initially, only asset-to-asset swaps. We also have a flash loan facility we would be glad to integrate if Tycho chooses to support flashes.

Our protocol retains fees in each pool until an explicit collection transaction, so the actual pool balances will very slightly exceed the TVL of the LP's.

Our protocol provides the same liquidity as constant-product pools having orders of magnitude more TVL. If you are using a TVL filter, you're going to miss these opportunities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions