Skip to content

Latest commit

 

History

History
81 lines (54 loc) · 4.28 KB

market_making.mdx

File metadata and controls

81 lines (54 loc) · 4.28 KB

import { Callout } from "nextra/components"; import Image from "next/image";

Market Making

Some concepts on this page require familiarity with Uniswap V3's pool mechanics and concentrated liquidity positions. For a brief summarization, please read our [Primer on UniswapV3](/concepts/market_making#primer-on-uniswapv3)

Liquidity Structure

Baseline's market-making strategy consists of three consecutive liquidity ranges positioned in a concentrated liquidity pool:

  • The floor position guarantees the capacity needed to maintain a minimum price of a bToken (the Baseline Value; BLV). It is a very tight liquidity range with enough reserve assets to buy back the circulating bToken supply.
  • The anchor range provides reserve assets from the either BLV, or 22% below the current market price, to the current market price, ensuring liquid trading conditions for the token, regardless of the market environment.
  • The discovery range starts at the current market price and increases from there. It consists solely of unissued bTokens, which are sold as the market price increases. The liquidity surplus obtained from selling bTokens in the discovery range is directed back into the backing.

Liquidity_Structure

Calculating the BLV

The crux of Baseline's market making accounting revolves around two metrics: the system capacity and the token's total floating supply. In Baseline, capacity refers to the total amount of tokens that can be absorbed by the liquidity structure, and floating supply refers to the all the tokens that exist outside of a Baseline liquidity position. To guarantee solvency for all tokens, Baseline ensures that capacity > floating supply each time it deploys liquidity.

To identify the BLV, Baseline finds the highest price it can deploy its liquidity structure that still fulfills the solvency invariant. The protocol does this by incrementally increasing the liquidity at each price level until the capacity can no longer absorb the total floating supply. This ensures that the protocol is always offering buying tokens in the most capital efficient manner, minimizing any unused liquidity in the system.

Liquidity Rebalances: sweep(), slide(), and bump()

Baseline has three rebalancing strategies: sweep(), slide(), and bump(). These market-making strategies help adjust the liquidity profile based on the market conditions of the underlying token.

When the price is trending upward, sweep() is called

Once the price has increased by 2%, the sweep() function is called to rebalance the liquidity.

sweep():

  1. Takes liquidity from the bottom of the anchor range and moves it into the floor, increasing its capacity and likelihood of bumping the floor.
  2. Takes the liquidity surplus and deposits it across the anchor range, building thicker liquidity near actively traded prices.
  3. Increases the capacity of the discovery range, allowing the system to become progressively more liquid.
**Tip:** At high market prices, the sweep() function realizes greater liquidity surpluses, increasing the likelihood of a BLV bump.

When the price is trending downward, slide() is called

As the market price moves downward, the anchor range fills up with bTokens. When the price moves down 2%, slide() is called.

slide():

  1. Moves anchor liquidity closer to the BLV price, increasing the absorbable capacity.
  2. Lowers the barrier for the market price to rise by lowering the liquidity depth of the discovery range.
**Tip:** Liquidity becomes progressively thinner as the market price approaches the BLV, encouraging greater volatility.

bump() is called to raise the BLV

Once enough liquidity surplus has been gathered, bump() attempts to increase the BLV price of the token by calculating whether the protocol can buy back all circulating tokens at a higher price.

**Tip:** When the BLV price increases, holders can access additional borrowing capacity.