Rhea Finance
  • Introduction
  • RHEA Finance White Paper
  • Genesis
  • Tokenomics
  • Governance
  • Community
  • Team
  • Getting Started
    • Setup Wallet
    • Using the Rainbow Bridge
    • Using the Platform
    • Buy REF Token
    • Staying Safe
  • RHEA Finance
    • Overview
      • Auto Router
      • Multi-chain Router
      • Pooling
      • Staking
      • RHEA V2 & DCL Pools
      • Aggregator Bridge
    • Guides
      • Lending & Borrowing
        • Audits & Risks
        • Supplying
        • Borrowing
        • APY
        • Health Factor
        • LP as Collateral
        • How Lending & Borrowing works
          • Health Factor
          • Interest Rate Model
          • Liquidations
          • Oracle
        • Step by Step Guide
      • Trade
        • Swap
        • Limit Orders
      • Liquidity Management
        • Classic Pools
        • Stable & Rated Pools
        • RHEA v2 Pools
      • Farming
      • Staking
      • Aggregator Bridge
      • RHEA Point System
  • SECURITY
    • Contracts
    • Guardians
    • Oracles
    • Audits
    • Bug Bounty
  • DEVELOPERS
    • CLI Trading
    • CLI Farming
    • RHEA SDK
  • SUPPORT
    • FAQ
    • Help
Powered by GitBook
On this page
  • Introduction
  • Types of DCL Strategy
  • Risks with DCL Pools
  • Depositing Liquidity
  • Claiming Swap Fees
  • Adding More Liquidity
  • Removing Liquidity

Was this helpful?

  1. RHEA Finance
  2. Guides
  3. Liquidity Management

RHEA v2 Pools

Pooling with RHEA v2's Discretized Concentrated Liquidity AMM

PreviousStable & Rated PoolsNextFarming

Last updated 27 days ago

Was this helpful?

Introduction

RHEA v2's Discretized Concentrated Liquidity (DCL) pools are based on . Each DCL Pool is divided into many separate bins, each of which represents a slightly different swap rate between the two tokens in the pool.

When a Liquidity Provider (LP) deposits their assets in a DCL Pool, they select a range of swap rates for which their assets can be used for swapping. In other words, their liquidity is “concentrated” within a specific range of swap rates, which is then distributed among separate, or “discrete”, bins along that range. This differs from the pools in RHEA v1, where liquidity is evenly distributed throughout the curve of the constant product formula (x * y = k).

To determine the swap rate, the exchange uses a virtual constant product curve, derived from the total liquidity in the pool and how it is distributed. When a swap takes place, the exchange identifies which bins to use for the transaction. It treats each bin as if it were a pool, and manages each one separately using a method based on the constant sum formula (x + y = z).

When a swap takes place against a DCL pool, only the LPs with assets placed within bins utilised for the swap will receive a share of the swap fees, in proportion to their share of the liquidity within those bins. This differs from the pools in RHEA v1, where fees are shared among all LPs in proportion to their share of the liquidity within the entire pool. Another way RHEA v2 differs is that a LP’s share of the fees is immediately allocated to them, and are not part of the pool’s liquidity.

Types of DCL Strategy

  • Uniform (Flat) Liquidity: In this model, liquidity is distributed evenly across all price ranges. No matter what the current price is, the liquidity is the same for each price point. This is the simplest form of liquidity distribution and is used by some of the earliest AMMs. It's like spreading a fixed amount of resources across a battlefield evenly, without concentrating forces at any strategic point.

  • Normal (Bell Curve) Liquidity: Here, liquidity is distributed according to a normal distribution, with most of it concentrated around a certain price, which is usually the current or the expected future price of the asset. The further away from this price, the less liquidity is available.

  • Skewed (Asymmetric) Liquidity: In a skewed distribution, liquidity is not evenly distributed and is instead biased towards a certain price direction. A skewed distribution could look like a normal distribution that has been pushed to one side. This is akin to placing more soldiers on one flank of an army in anticipation of the main attack coming from that direction.

Risks with DCL Pools

The more concentrated a LP’s liquidity is (i.e. the smaller the range of swap rates they choose when they deposit), the higher their share of the fees will be when their liquidity is used for a swap, compared to how much they would have received had they spread their liquidity over a wider range. However, there is also increased risk. If the overall swap rate goes outside the bounds they have chosen, their entire position will be converted to the token that is decreasing in value relative to the other.

For example, if a LP deposits USDC.e and NEAR within the range of 2.23572 - 2.730688 USDC.e/NEAR, and the value of NEAR drops below 2.23572 USDC.e, then their entire position will be converted to NEAR. If the value of NEAR goes above 2.730688 USDC.e, then their entire position will be converted to USDC.e.

Depositing Liquidity

To deposit liquidity in a DCL pool, first go to the "V2 Pools" tab on the Pools Page, click on a pool, and then click "Add liquidity".

Choose a minimum and maximum rate that your assets can be used for swaps, and the amounts to deposit. There may be pools with multiple "Fee Tiers" to choose from. The higher the fee, the more you make from swaps that utilize your pool, but your pool is less likely to be selected for swaps than pools with lower fees.

Claiming Swap Fees

With RHEA v2's DCL Pools, your share of the swap fees are immediately allocated to your account, and are not part of the pool’s liquidity. You can “claim” your share of the fees at any time, without removing any liquidity from the pool. However, adding or removing liquidity will automatically transfer any unclaimed tokens to your wallet.

Adding More Liquidity

If you want to add more liquidity to a pool, you will be given two choices. You can add more liquidity to your existing position, or you can create a new position and select a different range to deposit your liquidity in.

Removing Liquidity

After clicking the "Remove" button on the pool page, you will have the option of removing all your liquidity, or only a portion of it. Removing any liquidity will automatically transfer any unclaimed tokens from swap fees to your wallet.

Liquidity Distribution in a DCL Pool
Virtual vs Real Reserves in DL Pools
Price points at which a position is converted into one token. The more concentrated a LP’s liquidity is, the higher the risk that their entire position will be converted to the token whose value is decreasing relative to the other.
DCL Pools are found in the "V2 Pools" tab of the Pools Page.
The "Add Liquidity" button is on each pool's detail page.
The Add Liquidity form for a DCL pool.
Clicking the "Claim" button will transfer your share of the swap fees to your wallet.
You are presented with this form when adding liquidity to a pool that you already have a position in.
You can remove some or all of your liquidity.