Skip to main content

What it is

The Lunya exchange is an AMM built as a port of Uniswap V3 Core to modern Solidity, then extended well beyond it. The core carries ten typed hooks, takes its fee from a plugin instead of an immutable field, and supports three pool types behind one shared interface.
It is a port, not a fork: rewritten for Solidity 0.8.x under Foundry, with a differential test suite verifying the math against Uniswap’s own compiled bytecode. For where this sits against V2, V3, and V4, see Compared to Uniswap.

Three pool types

Every pool type answers the same interface — swap, mint, burn, collect, flash have identical signatures on all three — so integrators never need to know which curve they are holding.
Details in Pools & Fees, including how fees are set and where they go.

What the plugin system enables

Each pool can attach a plugin that reacts to pool events through typed hooks. The default plugin, attached automatically at pool creation, composes five modules:

Dynamic Fees

The swap fee rises with measured price volatility and relaxes when the market calms

Limit Orders

On-chain limit orders, filled inside the swap that crosses them — a fill stays a fill

TWAP Oracle

Time-weighted price observations, as a plugin instead of dead weight in every pool

Security Module

An emergency brake that can pause new activity — but never blocks the way out
Plus a farming proxy that feeds price movements to reward programmes — see Farming.

Beyond swaps

  • Flash loans — every pool can lend its balances within a single transaction
  • Farming — liquidity incentive programmes that never take custody of your position NFT
  • Liquidity Vaults — automated management of concentrated positions for passive LPs

For developers

The exchange keeps Uniswap V3’s events byte-identical — existing subgraphs and indexers work unchanged — while callbacks and pool discovery differ. Integration notes in Uniswap V3 Compatibility.