Trader Joe Presents Liquidity Book: A New AMM Design for DeFi

Published by AVAX on

New features like fungible liquidity bins and Surge Pricing intend to maximize AMM efficiency and minimize slippage.

Trader Joe, a decentralized exchange (DEX) on Avalanche, has launched Liquidity Book, a new design for its automated market maker (AMM) with the goal of improving capital efficiency, reducing slippage, and minimizing the impact of impermanent loss.

The current DEX’s trading algorithm is powered by the popular x*y=k automated market maker (AMM) formula. Since its launch in July 2021, the exchange has facilitated trading volume of more than $88 billion for thousands of active users daily, according to Trader Joe.

While this standard AMM model has been successful for Trader Joe, its team has found inefficiencies that could be improved with a new model without sacrificing the simple user experience it has become known for.

Let’s dive into how Trader Joe is evolving with Liquidity Book:

Liquidity Aims to Be More Efficient, Flexible, and Composable with Liquidity Book

A difference with Liquidity Book is how liquidity is stacked inside liquidity pools. Liquidity providers (LPs) deposit liquidity into discrete price bins, each bin is assigned a specific price and liquidity providers may provide liquidity to multiple bins. A key change is that all liquidity deposited into bins, are given fungible token receipts. By adding liquidity non-fungible token receipts, its architecture differs from existing concentrated liquidity solutions.

LPs using Liquidity Book can earn more fees, while putting less capital at risk. Traders also indirectly benefit from improvements in efficiency by getting better prices and lower slippage on their trades. In traditional x*y=k AMMs, the deposited liquidity is distributed evenly across all price ranges–from zero to infinity. While this means that the liquidity pool always has tokens to buy and sell, it also means that a big part of the liquidity remains unused.

Liquidity Book tries to solve this problem by allowing users to choose at what prices they want to provide liquidity. Liquidity Book provides more flexibility, by letting liquidity providers select any number of bins. Much less liquidity is sitting idle and efficiency improvements can scale up to as much as 20,000x higher.

LPs providing liquidity will be given fungible token receipts, thanks to the discrete bin architecture. Fungible token receipts are more composable, this opens up new possibilities for DeFi integrations with other protocols and products. The more composable the design, the bigger DeFi can grow.

Surge Pricing Compensates Liquidity Providers to Mitigate Impermanent Loss

Existing AMM’s typically have a flat fee for all trades. Liquidity Book introduces a fee structure that has two components, a base fee and a variable fee. The base fee represents the minimum fee rate for all trades, and the variable fee is adjusted to account for volatility. The more volatile the assets are in a Liquidity Pool, the higher the variable fee will be. This feature is what Trader Joe calls Surge Pricing.

Providing liquidity on concentrated liquidity exchanges can come with Impermanent Loss risk, which occurs when the prices of assets in the pool deviate from their initial prices. Impermanent Loss can be viewed as a cost of the price discovery, so it is highest during the most volatile times when the market tries to correctly price assets in the pair. Surge Pricing is a feature that is applied to trades during market volatility and this feature generates additional fees from trades, used to compensate LPs for the Impermanent Loss they experience during market volatility.

Surge Pricing is possible due to the novel mechanism called The Volatility Accumulator (VA). The VA is able to calculate instantaneous volatility for each Liquidity Pool, without relying on any outside oracles by tracking transactions across bins. The count from the Volatility Accumulator dictates the variable fee that is applied by the Surge Pricing feature for trades that are executed on Liquidity Book.

Discretized Bins Make Zero Slippage Swaps Possible

Liquidity Book combines bins into one structure, aggregating liquidity from all of them to form a Liquidity Pool. Individually, bins act as constant sum pools with their own liquidity reserves, as opposed to existing AMM designs that use a constant product formula. This model uses pool reserves to calculate prices, which often result in traders paying more for less tokens.

In Liquidity Book, the price is derived from an active bin and is constant inside it. As a result, if the trade occurs using reserves from the bin being used for a transaction, the trade will execute with zero slippage.

The price impact occurs when a trade requires a bin change, which happens when reserves in the currently active bin are not enough to fulfill the trade. This feature is particularly beneficial for swaps between stablecoins and other pegged assets, as their prices are expected to be equal to each other, most of the time.

The AMM model experienced fantastic developments to date, but there are still some notable drawbacks and areas that need solutions and enhancements. Liquidity Book strives to give traders more efficient trades, and liquidity providers enhanced efficiency, mitigation against impermanent loss, and maximum composability of their liquidity.

Liquidity Book’s new design hopes to unlock active liquidity provisioning, without compromising the needs of key stakeholders. This is an exciting step forward for Avalanche DeFi that will unlock a new wave of composable deployments on-chain.


About Avalanche

Avalanche is the fastest smart contracts platform in the blockchain industry, as measured by time-to-finality, and has the most validators securing its activity of any proof-of-stake protocol. Avalanche is blazingly fast, low cost, and green. Any smart contract-enabled application can outperform its competition by deploying on Avalanche. Don’t believe it? Try Avalanche today.

Website | Whitepapers | Twitter | Discord | GitHub | Documentation | Telegram | Facebook | LinkedIn | Reddit | YouTube

Trader Joe Presents Liquidity Book: A New AMM Design for DeFi was originally published in Avalanche on Medium, where people are continuing the conversation by highlighting and responding to this story.


Categories: Avalabs