The AMM Universe in the On-Chain World is a completely different world compared to off-chain due to its limited size and transaction speed naturally presented in the decentralized blockchain world. I’m a firm believer that an on-chain order book doesn’t work due to its complexity involved in making a market. Significant transaction costs for constantly shifting orders, and the speed of matching orders where centralized matching engines can do a way better job then the decentralized counterpart.

Constant Function Market Makers: DeFi’s “Zero to One” Innovation. With Uniswap V3 launched, we are now entering the capital efficiency era in the #DeFi world. Now, let’s talk about the various AMM models on the market; starting with the most intuitive one that has formed the cornerstone of today’s DeFi industry.

On-Chain Spot Market

A constant product market maker, first implemented by Uniswap. This is often simplified in the form of x*y=k, where x and y are the reserves of each asset.

Don’t reinvent the wheel, once said. The AMM model has been so effective that we’ve seen a lot of DEX protocols built based on this formula. Some of the protocols that have implemented this model are Uniswap, Sushiswap, Quickswap, Pangolin, Pancakeswap, Raydium, MDEX, Honeyswap, Spiritswap, Spookyswap, and many more. An innovative yet simple solution for liquidity providers (LPs) to step in passively. By providing an easy way for assets to bootstrap the liquidity, especially the long tail assets.

 

However, due to the nature of the design, LPs will suffer impermanent loss (IL) where we have seen the industry has divided into two segments. 1: IL is a bug rather than a feature, 2: IL is a feature rather than a bug.

 

So Balancer came up with a variation AMM model which allows the pool to consist of multiple tokens. Anywhere between 2 and 8, each token with a different arbitrary share of the pool (from 2% to 98%). This design allows users to experiences different, varying impermanent loss schemes and capital efficiency according to the specific use case.

 

CoFiX on the other hand trying to introduce risk management and computable risk concepts into the AMM world. The design introduces several new components including compensation factors. Compensation factors ensure market makers are sufficiently incentivized to continuing making the market. The design is trying to mimic the centralized world where market makers are compensated by negative fee rebates. This eats away the arbitrage opportunities across different exchanges, trading pairs, and assets. 

 

Curve Finance focuses on stable asset swaps. They felt that the basic constant product market maker does not fit into its specific use case. So they came up with the stableswap invariant in order to provide the best liquidity and the lowest slippage for swapping stable asset like USDT/USDC/DAI.

There are so many protocols that are trying hard to eliminate the IL. However, there is no one size fits all solutions and there are always risks with making a market in the financial world. So IL can not be eliminated but can be shifted or hedged through different ways.

 

Bancor’s V2 introduces single-sided exposure, allowing LPs to contribute and maintain 100% exposure in a single token. By doing so, it introduces a concept called impermanent loss insurance whereby BNT token holders can stake BNT token into the insurance pool to earn rewards and providing impermanent loss insurance to the LPs, essentially shifting the IL risk from LPs to token stakers.

 

Dodo’s Proactive Market Making Algorithm (PMM) design focuses on improving capital efficiency and single-sided LP. AMMs are “Lazy” Algorithms. When a trade occurs, PMM dynamically adjusts the price by encouraging arbitrage trading to minimize price risks and counterparty risks for LPs. This mitigates the notorious issue of impermanent loss inherent to AMMs.

On-Chain Derivatives Market

Entering into the on-chain derivatives space, although I’m still questioning the needs for on-chain derivatives from a user perspective. As market price discovery always happens off-chain in CLOB where the matching engines have done this so efficiently. So this is why traders/liquidity providers wish to be on-chain apart from trading in a decentralized, trustless environment. Of course, you can also argue that these on-chain derivatives protocols can use the protocol to the protocol layer. However, I believe that we have yet to identify the “ones”. Nevertheless, let’s dive into the AMM models for on-chain derivatives protocol, whether you are talking about futures, options, swap.

 

Perpetual Protocol’s Virtual AMM (vAMM) looks interesting, it strips away the role of liquidity providers, so no one can suffer impermeant loss. The underlying design of vAMM uses the same x*y=k constant product formula as Uniswap. As the “virtual” part of vAMM implies, it uses the formula for price discovery purposes and there is no need for LPs to pool assets to provide liquidity. However, the asset prices internally defined by vAMM might be incorrect where this requires arbitrageurs to step in to return the market equilibrium price.

 

Sakeperp’s vAMM+oracle price discovery design improves and limits the cases where the price in the internal book might be very different compared to the rest of the market. If there were LPs, LPs suffer less IL but help with the accuracy of the asset prices on Sakeperp. If there were no LPs, the system uses vAMM for price discovery purposes. So the vAMM+ oracle price discovery design takes off some market-making risks by referring price to vAMM but lets the LPs focus on the price differences between the vAMM price and the oracle price.

 

Capital efficiency is extremely important in the financial market, especially in derivatives trading, Mai Protocol by MCDEX introduces the shared liquidity concept and uses a price function to provide more liquidity near the index price. The V3 AMM function flattens the price curve near the index price. While it improves user experience, capital efficiency is also maximized so that the funds provided by LP could be concentrated to fulfill the trading demand near the index price.

Pendle Protocol on the other hand focuses on enabling the trading of tokenized future yield on an AMM system. It shifts the underlying asset from the asset itself to the interest rate space. However, it enters into a whole new world here where the underlying asset-interest rate faces time decay. The Pendle AMM aims to minimize the time-dependent impermanent loss that arises from the provision of liquidity using tokens with time decay.

I haven’t covered so many other types of AMM models in this piece, which I yet to dive into these. For example, CharmFinance is working on the AMM model for options trading. It leverages the logarithmic market scoring rule (LMSR) model, commonly seen in the prediction market AMMs to let users buy and sell these options when we have a pair of options whose payoffs sum to one in a certain currency.

 

“Algorithm liquidity, the blockchain native approach” @Diane_0320 AMMs are everywhere and eating the DeFi world, excited to see the different design of the AMM models for various specific use cases.

 

This article was written by by 0xminion.eth

TraderJoe: a Snapshot!

What is TraderJoe?  TraderJoe is a DeFi protocol and a DEX on the Avalanche blockchain, major competitor to Pangolin – “We combine DEX services with

Read More »
Scroll to top
en_USEnglish