All About Gnoswap’s CLMM

Gnoswap
7 min readNov 8, 2023

--

TL;DR:

  1. The DEX landscape has grown exponentially over the years, facilitating billions of dollars in volume every day.
  2. Concentrated Liquidity Market Maker (CLMM) supports up to 20,000x higher capital efficiency compared to a regular Automated Market Maker (AMM) and has become the de facto model for DEXs.
  3. Gnoswap is building the first CLMM DEX in Gnolang to augment the DeFi experience on Gno.land by abstracting away the complexities involved in concentrated liquidity.

1. Background

The concept of AMM was conceived by Vitalik in 2017 and pioneered by Uniswap. In its nascent stage, AMMs had experienced a rather stagnant growth. Its low liquidity and poor pricing compared to the order books of centralized exchanges left it unattractive for traders. Despite its downsides, however, it found its niche in the growing demand for a permissionless trading environment paired with high rewards from token incentives.

The pivotal moment for DeFi was in March 2021 when Uniswap announced a new AMM model called Concentrated Liquidity Market Maker as a fundamental solution for enhancing capital efficiency. Fast forward a few years, CLMMs now process billions of dollars in on-chain volume every day. From 2021 to today, Uniswap alone has accounted for 9% of total usage (transactions) and 15% of total revenue (gas fees) on Ethereum. It’s evident that CLMMs play a critical role in the blockchain ecosystem.

Data Source: Artemis

This article will explore the high-level mechanics of CLMMs and how Gnoswap aims to augment that experience on Gno.land.

2. What Are Concentrated Liquidity Market Makers?

The Origin: Automated Market Makers

CLMM originates from AMM. AMM is a type of decentralized exchange that uses a mathematical formula to calculate the exchange rate (the price) between two assets. The exchange rates are determined by the amount of tokens supplied in liquidity pools by Liquidity Providers (LPs). Liquidity pools are contracts that store tokens from which traders can trade against. In return, LPs earn fees from the trades that use their liquidity. Traditional AMMs only allowed LPs to provide liquidity evenly across the full price range (from 0 to ∞) to facilitate trading under any market conditions. In essence, this mechanism resembles filling the entire order book with a single transaction, saving tons of gas fees.

Concentrated Liquidity Market Makers Explained

The traditional AMM’s trait of ensuring the availability of liquidity at any price resulted in a tradeoff of low liquidity around the actual price range in which trades actually occur, which leads to a phenomenon called Lazy Liquidity — a waste of idle capital in unrealistic price ranges.

The solution proposed in concentrated liquidity was to divide the entire price range into intervals and “concentrate” the capital into specific ranges. This simple concept allowed capital efficiency to increase up to 20,000x compared to traditional AMMs.

Here’s an example of how effective concentrated liquidity is compared to traditional AMMs — if the liquidity of $20 million in the USDT-USDC pair on Uniswap V2 were to be concentrated into a range of 0.9999 (-0.01%) ~ 1.0001 (+0.01%), it would have the same effect as depositing $400 billion to a full price range (watch this video for the underlying equation).

For advanced information such as the math and the mechanics behind concentrated liquidity, check out this section in Gnoswap Docs.

3. Gnoswap’s CLMM

The First CLMM on Gno.land

Gnoswap is building the first CLMM on Gno.land by writing the concentrated liquidity contracts in Gnolang from scratch, taking inspiration from Uniswap V3 to leverage its powerful architecture. At the same time, Gnoswap fully leverages the advantages of the Gno Stack: Gnolang and Gno.land. Here are some examples…

From the Gnolang language,

  • Developer-friendliness: Anyone with experience in Go can read, contribute, and build on Gnoswap with ease.
  • Rich Libraries from Go: Gnoswap utilizes a vast suite of functionalities available in Gno.land, removing the need to rely on third-party smart contract libraries.
  • Security: Gnolang emphasizes security from its lowest levels, ensuring the security of smart contracts of Gnoswap when running in production.

From the Gno.land blockchain,

  • Transparency & Simplicity: The underlying code of Gnoswap is verifiable without requiring any off-chain trust assumptions and identifiable with simple, human-readable paths rather than obscure contract addresses.
  • Fast Finality: All swaps on Gnoswap are final once published on the blockchain, thanks to the absolute finality of Tendermint2, a succinct and minimalistic version of Tendermint, whereas swaps on chains with probabilistic finality are subject to rollbacks.
  • Scalability: The GnoVM is planning to implement Goroutines in the future, which will allow Gnoswap to benefit from the scalability of Gno.land’s concurrent transaction processing.

Concentrated Liquidity Made Simple

The user interface of Gnoswap abstracts away the complexities involved in concentrated liquidity to simplify the DeFi experience. Gnoswap provides invaluable data and features for users such as:

  • A visual liquidity distribution for each position which allows users to track their liquidity in real time.
  • A preset price range for inexperienced users who lack the expertise to create a range strategy for their positions manually.
  • The Fee Boost display which helps users understand how much capital efficiency they can achieve with liquidity concentration.

All of the above will help LPs analyze and predict the behavior and returns from their positions in a highly volatile environment where a lack of information can cost them dearly. With this in mind, Gnoswap will satisfy the demands for an intuitive experience from end users.

Towards Maximum Capital Efficiency

Gnoswap allows LPs to achieve maximum capital efficiency by offering maximum customizability for positions and adopting a unique staking mechanism called Warm-up Periods.

  • Customizability: Gnoswap supports four different fee tiers to foster pools with any behavior — from the most stable to the most volatile — while enabling price ranges to be completely configurable.
  • Warm-Up Periods: Gnoswap introduces a unique liquidity staking mechanism called Warm-up Periods. A critical problem in liquidity staking in CLMMs was the conflict between the need for frequent repositioning and unstaking periods. As a solution, Gnoswap allows LPs to instantly unstake their positions and instead applies a linearly decreasing penalty to the rewards of newly staked positions, which eventually matures into a boost. This mechanism ensures that long-term stakers are sufficiently incentivized, while also promoting active concentrated liquidity providers to engage in liquidity staking.

4. Closing

Since the introduction of CLMM, the liquidity on Uniswap V3 for the core pair — ETH/USDC — has become one of the deepest sources of liquidity in the market, as shown in the graph below. The DEX landscape is slowly transitioning into the most attractive place for traders.

Source: Kaiko

However, CLMM involves much more complexity compared to traditional AMMs by requiring a higher level of understanding from LPs due to amplified impermanent losses, possible price range exclusions due to price fluctuations, and frequent repositioning of positions — all of which become a barrier to entry for end users.

Gnoswap aims to minimize these frictions for users by providing a simple, intuitive interface that helps users better manage their liquidity, and a unique incentive mechanism for LPs to mitigate the conflict between liquidity staking and concentrated liquidity to invigorate the DeFi ecosystem on Gno.land — benchmarking Uniswap’s success on Ethereum.

About Gnoswap

Gnoswap is the first CLMM (Concentrated Liquidity Market Maker) DEX built on Gno.land using Gnolang to provide streamlined access to DeFi. The trader-centric interface of Gnoswap delivers valuable insights into the market and simplifies the CLMM experience by abstracting away its complexities. In addition, Gnoswap enables flexibility in liquidity staking via the novel Warm-up Period mechanism to maximize capital efficiency and rewards for liquidity providers.

Links

Twitter | Medium | Telegram

DISCLAIMER: The information provided in this Medium Post pertaining to Gnoswap (“we” or “us”), its crypto-assets, business assets, strategy, and operations, is for general informational purposes only and is not a formal offer to sell or a solicitation of an offer to buy any securities, options, futures, or other derivatives related to securities in any jurisdiction and its content is not prescribed by securities laws. Information contained in this Medium Post should not be relied upon as advice to buy or sell or hold such securities or as an offer to sell such securities. We reserve the right to amend or replace the information contained herein, in part or entirely, at any time, and undertake no obligation to provide the recipient with access to the amended information or to notify the recipient thereof. The information contained in this Medium Post supersedes any prior Medium Post or conversation concerning the same, similar or related information. We shall have no liability whatsoever, under contract, tort, trust or otherwise, to you or any person resulting from the use of the information in this Medium Post by you or any of your representatives or for omissions from the information in this Medium Post.

--

--

Gnoswap

Gnoswap is the first open-source AMM Dex built by Onbloc using #Gnolang to offer a simplified concentrated-LP experience for increased capital efficiency.