# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://oaisis.gitbook.io/story.fun/dive-deep/dex-trading-and-liquidity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
