
The Idea
Uniswap v4 introduces hooks — programmable smart contracts that can intercept and modify swap behavior at the pool level. This unlocks an entirely new class of hook coins: tokens with custom on-chain mechanics like bonding curves, dynamic fees, rebasing, and more. Geode is the venue for these assets. It provides the infrastructure to launch hook coins, trade them with best-in-class execution, and discover them in one place.The thesis: Hook coins are already weird and interesting because of their on-chain mechanics. Geode makes them launchable, tradeable, discoverable, routable, and better to execute.
The Execution Advantage
Geode’s execution layer is what makes the venue work. Instead of executing each swap individually against an AMM (where MEV bots extract value), Geode collects signed trade intents and settles them in batches at a single uniform clearing price.What This Means in Practice
| Property | Traditional AMM | Geode |
|---|---|---|
| Execution | Sequential, per-transaction | Batch, all-at-once |
| Price | Depends on position in block | Uniform for entire batch |
| MEV | Sandwich attacks are profitable | Batching makes sandwiching impossible |
| Matching | Every trade hits the AMM | Opposing flow crosses internally, free of AMM spread |
| Settlement | Each swap pays full gas | One transaction settles the entire batch |
Architecture
Geode is built as a Uniswap v4 Hook — a smart contract that intercepts swap calls on Uniswap v4 pools and powers both the execution layer and the asset mechanics.Key Components
GeodeHook.sol — The Core Protocol
GeodeHook.sol — The Core Protocol
The main contract (~1,190 lines) implements the Uniswap v4
IHooks interface. It intercepts swaps via beforeSwap, handles direct bonding curve swaps for curve pools via BEFORE_SWAP_RETURNS_DELTA, collects fees for standard pools, and exposes geodeSettleBatch() for batch settlement.Immutables: PoolManager, Permit2, protocol treasury, factory address.State: Per-pool configuration, batch tracking, permanent curve state, surplus balances.ClearingPriceLib.sol — Standard Mode Settlement
ClearingPriceLib.sol — Standard Mode Settlement
Pure library for standard mode pools (with AMM liquidity). Uses the AMM’s spot price as the uniform clearing price, determines which intents fill, and computes internal match amounts and residual routing.For curve pools,
ConstantProductCurveLib handles settlement instead — the clearing price comes from the bonding curve, and residual flow routes through the hook’s reserve.Permit2 — Gasless Token Approvals
Permit2 — Gasless Token Approvals
Intents are signed as Permit2
permitWitnessTransferFrom messages. The user signs once; the settler pulls tokens on their behalf during settlement. No separate approval transaction needed.GeodeFactory.sol — Token Launches
GeodeFactory.sol — Token Launches
Permissionless factory that deploys hook coin ERC20s, mints the full supply to the hook, initializes the v4 pool as an empty shell, and configures the permanent bonding curve. Single-transaction launch with no upfront liquidity required.
Asset Types
Hook Coins (Geocurve)
Geode’s first asset template: bonding curve tokens, inspired by the hook format pioneered by tokens like SATO. The full supply is pre-minted to the hook — buying dispenses tokens from the hook’s reserve, selling absorbs them back. The curve handles primary issuance, while separate secondary pools can emerge to create natural spread dynamics — the divergence between the curve price and secondary market prices becomes the game.Token Created
Deployer calls
GeodeFactory.launch(). A new ERC20 is deployed, full supply goes to the hook, the v4 pool is initialized as an empty shell, and the bonding curve activates.Dual-Path Trading
The curve supports both direct swaps (instant execution via
beforeSwap) and intent-based batch settlement from day one. The hook acts as the market maker via BEFORE_SWAP_RETURNS_DELTA — the v4 pool has no liquidity; the hook handles all pricing.Standard Pools
For any Uniswap v4 pool with existing AMM liquidity. The hook attaches and adds intent-based batch settlement on top.Key Properties
Immutable
No admin keys, no upgradeability, no privileged roles. The protocol is fully immutable once deployed.
Permissionless
Anyone can settle batches. Anyone can launch tokens. No gatekeepers.
On-Chain Only
No off-chain state dependencies. Every function operates from on-chain state. No sequencers, no relayers, no trusted infrastructure.
Uniswap v4 Native
Not a fork or wrapper. A native v4 hook that composes directly with the PoolManager’s flash accounting system.
Dive deeper: Read How It Works for the settlement flow, Geocurve for the bonding curve mechanics, or Economics for the fee model and wash trade resistance.