> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exponent.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Technical Concepts

> CLMM-specific concepts — tick system, fee model, YT trading, and key accounts

***

This page covers concepts specific to the Exponent CLMM. For shared protocol concepts, see:

* [Implied APY Pricing](/developers/learn/pricing-and-math) — How PT and YT prices derive from implied APY
* [PT: Principal Token](/developers/learn/emitted-tokens#pt-principal-token) — PT mechanics, backing, and fixed-rate positioning
* [YT: Yield Token](/developers/learn/emitted-tokens#yt-yield-token) — YT mechanics, yield formula, and leveraged exposure
* [Strip & Merge](/developers/guides/strip-and-merge) — The SY → PT + YT and PT + YT → SY operations
* [Maturity](/developers/learn/post-maturity) — Before, at, and after maturity behavior

***

## APY-Based Tick System

Unlike traditional CLMMs where ticks represent price points, the Exponent CLMM uses ticks keyed by **APY scaled by 10^6**. The tick key maps to a spot price via:

$$
\text{spot\_price}(\text{key}) = 1 + \frac{\text{key}}{10^6}
$$

For example, a tick key of `80000` corresponds to 8% APY. Ticks are stored in a red-black tree with a maximum of 1000 active nodes. The `tick_space` parameter determines the minimum distance between tick boundaries.

<Warning>
  Ticks represent APY levels, not price levels. A tick key of `50000` means 5% APY — not a price of 50,000.
</Warning>

***

## Fee Model

The CLMM uses a [time-weighted fee decay model](/developers/learn/pricing-and-math#fee-decay-model) where fees decrease as maturity approaches. The protocol takes a cut of swap fees defined by `treasury_fee_bps`. Remaining fees accrue to LPs via Q64.64 fixed-point fee growth tracking — see the [MarketThree account reference](/developer-clmm/account-references/market) for details.

***

## YT Trading via Flash Swaps

The pool only holds PT and SY — YT cannot be traded directly. Instead, YT trades use **flash swaps**: the pool temporarily lends tokens, the instruction [strips or merges](/developers/guides/strip-and-merge) them, and repayment happens atomically within the same transaction.

**Buy YT:** The pool flash-lends SY to the trader. That SY is stripped into PT + YT. The YT goes to the trader, the PT is sold back through the CLMM for SY, and the proceeds repay the flash loan.

**Sell YT:** The pool flash-lends PT to the trader. That PT is merged with the trader's YT into SY. The SY goes to the trader, a portion is used to buy PT back through the CLMM, and the purchased PT repays the flash loan. The trader keeps the remaining SY.

Because the PT leg of a flash swap is just facilitating the YT trade, fees are charged on the **YT value** rather than the full PT amount — resulting in lower fees for YT trades compared to equivalent PT swaps.

The lower-level `buyYt` and `sellYt` instructions handle the flash swap directly using SY. The SDK's wrapper instructions (`ixWrapperBuyYt`, `ixWrapperSellYt`) add base asset conversion on top, so developers can trade YT from any supported token in a single transaction.

***

## Swap Routing

PT swaps route through active liquidity at the current tick. Two directions are supported: **SY → PT** (buying PT) and **PT → SY** (selling PT). Both exact-in and exact-out variants exist. An optional `priceSpotLimit` parameter provides anti-sandwich protection by aborting the swap if the price moves beyond the specified threshold.

***

## Key Accounts

### MarketThree

The onchain account holding all CLMM state — token mints, escrows, tick configuration, financials, emissions, and status flags. See the [MarketThree Account Reference](/developer-clmm/account-references/market).

### LpPosition

A per-user position account tracking LP balance, fee accruals, and farm emissions within a specific tick range. See the [LpPosition Account Reference](/developer-clmm/account-references/lp-position).

### LpFarm

Manages liquidity mining rewards — up to 3 concurrent emission tokens distributed to LP providers proportionally. See the [LpFarm Account Reference](/developer-clmm/account-references/farm).
