Product

Overview

View as Markdown

Automated Market Making

A traditional exchange runs an order book, and an order book cannot settle a trade without a matching counterparty. If you want to sell at 2,000 and nobody is bidding there, you wait.

ORDER BOOK100,750100,500100,25099,75099,50099,250100,000 — no sellerbuy BTC✕AMM✔

An AMM (Automated Market Maker) replaces that counterparty with a mathematical formula and a pre-funded pool. Whoever deposits two assets together into that pool is a Liquidity Provider (LP), and earns trading fees in return. Because the formula always quotes a price, the pool becomes the counterparty immediately — there is nothing to wait for.

The most widely adopted pricing approach is x·y=k, which adjusts price automatically to keep the product of the pool's two balances constant. Buy one asset and its balance in the pool falls, so its price rises accordingly.

1,000,0001,200,000833,333+ 200,000− 200,000− 166,667+ 166,667108.3312− 1.67+ 1.67+ 2− 2price of BTC100,000144,00069,4441,000,000 × 101,200,000 × 8.33833,333 × 12= 10,000,000

What Makes Giwater Different

The x·y=k model is built to withstand price moving anywhere from zero to infinity, so LP capital ends up spread evenly across price levels where trading almost never happens.

Giwater — referred to as "the protocol" throughout these pages — lets LPs place capital only within the price range they choose, settling far more trading volume with the same capital, because that capital only works when the range overlaps the current trading price.

On top of this concentrated liquidity model, Giwater adds three things.

  • Asset isolation. All assets are held in a single Vault, but each pool engine keeps its own ledger, so a flaw in one engine cannot reach assets managed by another.
  • Atomic settlement. Every trade either fully succeeds or is fully reverted — there is no partial-success state.
  • Extensibility via hooks. Each pool can attach custom rules such as dynamic fees or trade restrictions, without modifying the protocol core.

Architecture at a Glance

The protocol is organized into three layers:

  • a Vault that holds every asset and performs settlement;
  • a Pool Engine that computes price and liquidity;
  • Hooks that let an individual pool attach its own rules.

Each participant meets a different layer. An LP deposits liquidity into a price range they choose and earns a fee on every settlement. A trader requests a swap, and the Pool Engine traverses liquidity to settle it. A developer adds pool-specific logic through a Hook.

Hookoptional, per poolPool Engineworks out price and liquidity — holds nothingVaultevery asset is held here…

The pages that follow walk through how these layers work together, in order: the pricing and liquidity model in Concentrated Liquidity, how trades settle in Swaps, custody and reconciliation in Settlement, and the extension point in Hooks.

Previous
Home