Analysis of Solana Ecosystem AMM Products: Comparison of CPMM, CLMM, and DLMM

robot
Abstract generation in progress

Overview of AMM Products in the Web3 Industry and Analysis of Implementation in the Solana Ecosystem

In the current Web3 industry landscape, DeFi-related products dominate. Among them, the automated market maker (AMM), as a key component, is an important force driving innovation in Web3 finance. This article will introduce several important AMM implementations in the Solana ecosystem, aiming to provide reference for liquidity providers (LP) in choosing investment strategies.

Solana Ecosystem AMM Research: The Underlying Code Behind High Liquidity

CPMM

Constant Product Market Maker ( CPMM ) is one of the most basic AMM implementations. Taking an AMM based on constant product launched by a trading platform as an example, its core principle is to maintain a fixed product of the supply of two tokens in the pool: X * Y = k.

When users add liquidity to the pool, the CPMM will automatically create a linked account for the user's wallet and issue LP Tokens to prove the user's share in the pool. When extracting liquidity, the corresponding LP Tokens will be destroyed.

The on-chain program of CPMM is developed using Anchor. When users perform token swaps, it will trigger swap-related instructions. Taking the exchange of USDC and TRUMP tokens as an example, the transaction will be conducted through the TRUMP-USDC pool.

In the swap operation, the specific amount of target tokens that can be exchanged is calculated using the constant product formula:

(x + Δx)(y - Δy) = xy

After conversion, obtained:

Δy = (Δx * y) / (x + Δx)

Please note that this calculation does not include transaction fees, which have already been deducted in the preliminary logic.

Solana Ecosystem AMM Research: The Underlying Code Behind High Liquidity

Solana ecosystem AMM research: The underlying code behind high liquidity

CLMM

The centralized liquidity market maker (CLMM) launched by a certain trading platform is similar to a certain DEX V3, where each token pair has multiple fee tiers, allowing the creation of corresponding tiered pools. CLMM inherits concepts such as ticks, multiple fees, and concentrated liquidity.

Unlike CPMM, due to the characteristics of the Solana chain, CLMM does not need to deploy a contract separately for each pool, nor is there a concept of a factory contract.

CLMM allows LPs to select a price range when injecting funds, and the funds are only distributed within that range. LPs can also provide unilateral liquidity, similar to limit orders in traditional finance.

For pools with small fluctuations, LPs tend to choose a smaller range; for pools with significant fluctuations, they choose a larger range to reduce impermanent loss.

Concentrated liquidity can improve capital utilization, but it requires a higher financial awareness from LPs. LPs need to actively manage liquidity; otherwise, they may suffer significant impermanent loss.

Solana Ecosystem AMM Research: The Underlying Code Behind High Liquidity

Solana Ecosystem AMM Research: The Underlying Code Behind High Liquidity

Solana Ecosystem AMM Research: The Underlying Code Behind High Liquidity

DLMM

Dynamic Liquidity Market Maker ( DLMM ) is an AMM product launched by a certain platform, which is a variant of a certain DEX V3 and is similar to CLMM. DLMM introduces the concept of Bin, where the pool starts from the base price, and every small interval is considered as a Bin step.

Transactions within the same Bin enjoy zero slippage, which is beneficial for increasing trading volume and success rate. Theoretically, LPs can earn more trading fees.

In DLMM, the currently activated Bin contains two tokens, while other Bins are distributed on both sides and only contain a single token. Price changes are achieved through the switching of the activated Bin.

When LP provides liquidity, DLMM offers three strategies:

  1. Spot: Suitable for most pools, the simplest liquidity strategy.
  2. Curve: Suitable for pools with small price fluctuations, such as stablecoin pairs.
  3. Bid Ask: Suitable for pools with large price fluctuations, requiring frequent position adjustments.

Solana Ecosystem AMM Research: The Underlying Code Behind High Liquidity

Summary

AMM, as an important component of the Web3 financial sector, promotes the development of decentralized finance through its unique mechanisms. With technological advancements and ecological improvements, AMM is expected to play a greater role in the future, further transforming the landscape of traditional finance.

Solana ecosystem AMM research: the underlying code behind high liquidity

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 9
  • Share
Comment
0/400
Web3ProductManagervip
· 07-10 03:11
just ran some cohort analysis on these AMM models... ngl their retention curves are fascinating
Reply0
MeltdownSurvivalistvip
· 07-09 19:45
No matter how many there are, chasing the market for SOL is all that matters.
View OriginalReply0
MEVHunterNoLossvip
· 07-08 10:48
When will these DEX go live on the Mainnet?
View OriginalReply0
AirdropHunter9000vip
· 07-08 02:13
Just do Solana~
View OriginalReply0
GasFeeDodgervip
· 07-07 05:11
The Sol ecosystem is useless at everything.
View OriginalReply0
RetiredMinervip
· 07-07 05:11
The old coin farmers in the crypto world have been confirmed.
View OriginalReply0
BagHolderTillRetirevip
· 07-07 05:11
Wow, seeing CLMM reminds me of the losses.
View OriginalReply0
PrivateKeyParanoiavip
· 07-07 05:07
Understand a bit of profound things
View OriginalReply0
CryptoComedianvip
· 07-07 04:48
Be Played for Suckers also requires technical content.
View OriginalReply0
View More
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)