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

# Uniswap V3 Compatibility

> What carries over from Uniswap V3 for integrators, and what differs

## Short version

The exchange core is a port of Uniswap V3, and **the ABI matches where it costs nothing** — but the protocol is not drop-in: an unmodified V3 router cannot trade against these pools. Integration goes through the exchange's own periphery.

## What is identical

| Surface                                                                                            | Status                                                |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| `swap`, `mint`, `burn`, `collect`, `flash`, `initialize`                                           | Signatures identical to V3                            |
| `Initialize`, `Mint`, `Burn`, `Collect`, `Swap`, `Flash` events                                    | **Identical — subgraphs and indexers work unchanged** |
| `ticks`, `tickBitmap`, `positions`, `liquidity`, `tickSpacing`, `feeGrowthGlobal*`, `protocolFees` | Present and identical                                 |

The identical events are what carry the integration: aggregators discover pools by indexing, and that path works with no changes on their side.

## What differs

| Surface                  | Difference                                                                                                                                                     |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Callbacks                | `lunyaSwapCallback` / `lunyaMintCallback` / `lunyaFlashCallback`, not `uniswapV3*`                                                                             |
| `fee()`                  | Absent — `feeInfo()` returns `(fee, isDynamic)` instead, always a plain read                                                                                   |
| `slot0()`                | Five fields, not V3's seven: `(sqrtPriceX96, tick, fee, feeProtocol0, feeProtocol1)` — same shape on **every** pool type; no observation fields, no `unlocked` |
| Oracle (`observe`, etc.) | Not in the pool — the TWAP is a [plugin](/exchange/plugins#twap-oracle)                                                                                        |
| `createPool`             | Takes `(tokenA, tokenB, poolType)` — no fee parameter, no fee tiers                                                                                            |
| Pool addresses           | CREATE2 from the **deployer** (not the factory), salted by `(token0, token1, poolType)`                                                                        |

## Rules of thumb for integrators

1. **Route through the native periphery** — `SwapRouter` for execution, `Quoter` for pricing, the position manager for liquidity. Do not point V3 periphery at these pools.
2. **Derive pool addresses from the deployer** and read the init code hash from the chain — never hardcode it.
3. **Read prices via `slot0()` or `sqrtPriceX96()`** — both are declared on the shared `ILunyaPool` interface and behave identically on every pool type, so generic code never branches on `poolType`. One caveat: on a tickless (STABLE) pool, `slot0()`'s `tick` is a derived measurement of where the price sits — the pool holds nothing at it, so never mint against a tick read from a STABLE pool.
4. **Reuse your V3 indexing** — event signatures are unchanged by design.
5. **Trust model for oracles** — the TWAP is governance-replaceable per pool; factor that in before using a pool as a price source.

<Note>
  Contract addresses and the full interface reference will be published here at deployment.
</Note>
