Skip to main content

Overview

The Geocurve is Geode’s first asset template: a bonding curve for Uniswap v4 hook coins. Inspired by the hook format pioneered by tokens like SATO, a Geocurve token has a simple mechanic — the full supply is pre-minted to the hook, and the curve dispenses tokens to buyers and absorbs them back from sellers. The curve handles primary issuance; secondary pools create natural spread dynamics. No upfront liquidity, no presales, no hidden allocations. No unsold supply problem, no awkward AMM migration. Just a permanent curve that defines the primary market.
The game: The curve creates primary issuance. Secondary pools on other venues create market trading. The spread between them — the divergence between the curve price and secondary market prices — becomes the game.

How It Works

The Bonding Curve

The Geocurve uses a virtual constant-product formula — the same x × y = k math as Uniswap, but with virtual reserves that anchor the curve:
(Vt - S) × (Ve + E) = Vt × Ve = K
Where:
  • Vt = virtual token reserve (immutable, set at launch, ≥ totalSupply)
  • Ve = virtual ETH reserve (immutable, set at launch)
  • S = cumulative tokens distributed to buyers
  • E = cumulative real ETH raised from sales
  • K = invariant constant (Vt × Ve)

Starting Price

At launch (S = 0, E = 0), the price is simply:
startingPrice = Ve / Vt
For example, with Vt = 1,000,000,000 tokens and Ve = 1 ETH, the starting price is 0.000000001 ETH per token (~0.0000023at0.0000023 at 2,350/ETH).

Price Movement

Buys dispense tokens from the curve. As tokens leave (S increases), the effective token-side reserve shrinks, and the price rises:
priceAfterBuy = (Ve + E + ethIn) / (Vt - S - tokensBought)
Sells absorb tokens back into the curve. As tokens return (S decreases), the price falls:
priceAfterSell = (Ve + E - ethReturned) / (Vt - S + tokensSold)
The curve is fully reversible — tokens can be bought and sold at any time.

Curve Math

ETH Cost to Buy

How much ETH does it cost to buy Δs tokens from the current state?
ethIn = K / (Vt - S - Δs) - (Ve + E)
This comes directly from the constant-product invariant. As Δs approaches (Vt - S), the price approaches infinity — you can never buy the entire virtual supply.

Tokens for ETH

How many tokens do you get for spending ethIn ETH?
Δs = (Vt - S) - K / (Ve + E + ethIn)

ETH Return on Sell

How much ETH do you get back for selling Δs tokens?
ethOut = (Ve + E) - K / (Vt - S + Δs)
Asymptotic pricing: When Vt = totalSupply, the curve price approaches infinity as 100% of tokens are distributed. When Vt > totalSupply, the curve has a finite maximum price at full distribution.

Launch Flow

1

Deploy

The deployer calls GeodeFactory.launch() with:
  • Token name and symbol
  • Total supply (e.g., 1 billion tokens, 18 decimals)
  • Virtual reserves (Vt, Ve) that define the curve shape
The factory deploys a GeodeToken ERC20, mints the entire supply to the hook contract, initializes the v4 pool as an empty shell, and registers the permanent bonding curve. All in one transaction.
2

Dual-Path Trading

The pool enters the Active phase and supports two trading paths immediately:
  • Direct swaps via beforeSwap → the hook computes curve output and returns the full delta
  • Intent-based batch settlement via geodeSettleBatch() → batched intents settle at the curve price
A 0.3% fee applies to direct swaps, split three ways:
  • 1/3 → curve ETH reserve (permanently increases floor price)
  • 1/3 → protocol treasury
  • 1/3 → surplus pool (funds settler gas reimbursement)
Batch settlement charges a separate 0.1% settlement fee per intent.
3

Permanent Primary Market

The curve is the permanent primary market for the token. The floor price rises naturally as the reserve fee accumulates. As the token gains traction, secondary pools can emerge on other Uniswap v4 pools or DEXs — and the spread between the curve price and secondary prices becomes the trading game.

The Spread Game

This is what makes Geocurve tokens interesting beyond simple bonding curves. The curve and secondary markets answer different questions:
Curve (Primary)Secondary Pools
What it reflectsCumulative dispense/absorb demand on the hookBroader market sentiment and trading
Price movementDeterministic: follows x × y = kMarket-driven: order flow, arbitrage, speculation
Floor priceRatchets up via reserve feesNo inherent floor
Liquidity sourceBonding curve reservesLP positions from other market makers
The spread between these two prices creates opportunities:
  • When secondary trades above the curve → arbitrageurs can buy from the curve and sell on secondary
  • When secondary trades below the curve → arbitrageurs can buy on secondary and sell back to the curve
  • This arbitrage loop keeps the two prices loosely tethered, but the spread itself is a feature — it reflects the difference between fundamental demand (curve) and speculative sentiment (secondary)
Why this matters: Unlike traditional launchpad models that graduate into an AMM (creating an awkward translation from virtual curve price to real pool price), the Geocurve stays. The curve IS the primary market. Secondary pools are additive, not a replacement. The spread between them is the game.

Batch Settlement on the Curve

During batch settlement, ConstantProductCurveLib.computeLaunchSettlement() replaces the standard clearing price algorithm. The key differences:
  • Clearing price = current curve spot price (not AMM spot price)
  • Internal matching works the same way — opposing flow crosses at the curve price
  • Residual flow routes to/from the hook’s reserve via the curve (no AMM swap)
  • Net buy residual → hook dispenses tokens, ETH goes to launchEthReserve
  • Net sell residual → hook absorbs tokens, ETH returns from launchEthReserve

Pricing Mechanics

The clearing price for a batch is the pre-trade curve spot price — the price at the current state before any trades execute:
clearingPrice = (Ve + E) / (Vt - S)
This price is used for two purposes:
  1. Slippage checks — each intent’s minAmountOut is evaluated against this price to determine if the intent fills
  2. Internal matching — when buys and sells cross each other, they exchange at this price
However, the actual tokens dispensed or absorbed by the curve are not computed from the clearing price. They are computed using the real constant-product math:
tokensDispensed = (Vt - S) - K / (Ve + E + residualEth)
ethReturned     = (Ve + E) - K / (Vt - S + residualTokens)
This distinction is critical: the clearing price determines distribution among participants, but the curve’s invariant math determines the total tokens entering or leaving the reserve. The invariant K = Vt × Ve is preserved exactly after every batch, regardless of batch size.

Price Impact Socialization

In sequential execution (a standard AMM), each trade moves the price before the next trade executes. Whoever trades first gets the best price, and whoever trades last bears the most impact. This ordering advantage is what MEV bots exploit — they frontrun your trade to capture the price difference. In batch execution, there is no ordering. All participants in a batch receive tokens at the same effective price — their pro-rata share of the total output, proportional to their input. The price impact of the entire batch is socialized equally across all participants.
Alice buys 1 ETH  → gets 10,000 tokens at price P₀
Bob buys 10 ETH   → gets 90,000 tokens at price P₁ (higher)
Carol buys 1 ETH  → gets 8,000 tokens at price P₂ (even higher)

Alice got the best deal. Carol got the worst.
A bot could frontrun Carol for profit.
The total tokens dispensed (108,000) is identical in both cases — constant-product curves are path-independent, meaning the output is the same whether the input arrives as one trade or many. The only difference is how the output is distributed among participants.

Why This Is Fair

The batch model trades ordering fairness for price uniformity:
PropertySequential (AMM)Batch (Geode)
Who gets the best price?Whoever trades firstEveryone gets the same price
MEV/frontrunningProfitable — ordering = valueEliminated — no ordering exists
Price impactConcentrated on later tradersSocialized equally across batch
Total outputSame (path-independent)Same (path-independent)
In sequential execution, price impact is normal market behavior — it’s just concentrated on whoever happens to go last (or whoever gets sandwiched). In batch execution, that same price impact still exists, but it’s distributed evenly. Neither model creates or destroys value — they distribute the same total output differently.
Invariant preservation: The curve constant K = Vt × Ve is preserved exactly after every batch settlement. This has been verified across hundreds of production batches with zero drift. The curve math is provably correct — no value leaks in or out of the reserve regardless of batch composition or size.

GeodeFactory

The factory contract handles the one-transaction launch:
  1. Deploy GeodeToken ERC20 (full supply to hook)
  2. Compute the PoolKey deterministically
  3. Initialize the v4 pool as an empty shell (sqrtPriceAtTick(0))
  4. Call geodeInitializePool() on the hook with curve configuration
  5. Call registerLaunch() to set up permanent curve state tracking

Permissionless

Anyone can launch a token. No whitelisting, no approval process. The deployer pays only gas.

Fair Launch

No presales, no hidden allocations. The entire token supply goes to the bonding curve. Every buyer gets tokens at the current curve price.

Rising Floor Price

1/3 of every direct swap fee goes to the curve’s ETH reserve, permanently increasing the floor price. The curve gets stronger with every trade.

Buyer of Last Resort

The curve always has a bid — tokens can be sold back at any time. The virtual ETH reserve ensures the price never reaches zero, even if every distributed token is sold back.

GeodeToken

The minimal ERC20 deployed by the factory:
  • Full supply minted to the hook contract at deployment
  • Standard ERC20 interface (name, symbol, 18 decimals)
  • Supports burn and transfer-from-hook operations
  • No admin functions, no minting after deployment
Permanent by design: The Geocurve is the primary market. There is no “next phase” — the curve provides primary issuance, price discovery, and a rising floor for the lifetime of the token. Secondary markets emerge naturally and create the spread dynamics that make the game interesting.