> For the complete documentation index, see [llms.txt](https://oaisis.gitbook.io/story.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oaisis.gitbook.io/story.fun/dive-deep/dex-trading-and-liquidity.md).

# DEX: Trading & Liquidity

## Concentrated Liquidity

Story.fun has adopted a Uniswap v3 style concentrated liquidity model to greatly enhance capital efficiency and trading experience.

<figure><img src="/files/hBgbOjlSFlN2585qEiux" alt=""><figcaption></figcaption></figure>

### Concept of Concentrated Liquidity

Concentrated liquidity is an innovative approach that allows liquidity providers (LPs) to concentrate capital within specific price ranges:

* **Traditional Model vs. Concentrated Liquidity**:
  * Traditional model (Uniswap v2): Liquidity is evenly distributed across the entire price range from 0 to infinity
  * Concentrated liquidity: Capital is concentrated only in specific price ranges selected by the LP
* **Efficiency Improvements**:
  * Concentrating in a narrow range with the same capital can provide 80-100 times more efficient liquidity
  * Provides less slippage and better trade execution
  * Increased liquidity depth, advantageous for large trades
* **Order Book Similarity**:
  * Concentrated liquidity forms a structure similar to a traditional order book depth chart
  * LPs provide liquidity at various price points, forming a natural order book

### LP Strategies, Range Selection, Yield Optimization

Key elements for optimal strategy as an LP in Story.fun:

* **Range Selection**:
  * Narrow range: High capital efficiency and fee revenue, but increased risk of range exit
  * Wide range: Lower capital efficiency but increased likelihood of staying in range
  * Strategic range setting needed considering price volatility, trading volume, and market directionality
* **Range Orders**:
  * Utilizing concentrated liquidity as a type of limit order that exchanges assets when a certain price is reached
  * Example: Providing token A in a range higher than the current price, automatically exchanging to token B when the price rises
  * Unlike regular limit orders, Range Orders generate fee revenue while being executed
* **Yield Optimization Strategies**:
  * Active position management: Actively adjusting ranges according to market changes
  * Compound strategies: Maintaining multiple positions across several ranges
  * Data-driven range setting: Analyzing historical price volatility and trading patterns
  * Utilizing market directionality: Providing asymmetric liquidity when expecting price increases or decreases
* **Competitive Farming**:
  * Highest rewards for the most productive and competitive liquidity
  * More optimized ranges earn higher rewards
  * Natural alignment between liquidity provider profits and protocol growth
