Skip to content
Clearing / Clusters and clearing math

Clusters and clearing math

How a cluster turns many intents into one venue buy, why everyone pays the same price, and what that does and does not change.

One buy against the pool

The venues NoFomo clears against price like a constant-product pool. Call the quote reserve Y (ETH), the token reserve X, and the spot price p₀ = Y / X. A buy of q ETH, after venue fees, returns:

tokensOut = X · q / (Y + q)
average price paid = q / tokensOut = p₀ · (1 + q / Y)
spot price after = p₀ · (1 + q / Y)²

So the buyer's average price sits q / Y above spot, and the spot price moves about twice that. The second number is what a cluster's impact ceiling limits.

Why total cost is path-independent

Split the same demand into two buys, q₁ then q₂. The first leaves the pool at (Y + q₁, X · Y / (Y + q₁)), the second buys against that, and the two outputs add up to:

tokens(q₁) + tokens(q₂ after q₁) = X · (q₁ + q₂) / (Y + q₁ + q₂) = tokens(q₁ + q₂)

Any sequence of buys that adds up to Q ETH gets exactly as many tokens as one buy of Q. The pool doesn't care how demand is chopped up. A cluster therefore can't make the group's tokens cheaper in total. It changes how the cost is shared.

Race versus cluster

In a race of n equal buys of size q, arrival number k buys after (k − 1) · q has already moved the pool, and pays on average:

price(k) = p₀ · (Y + (k − 1)·q) · (Y + k·q) / Y²
last arrival = p₀ · (Y + Q − q) · (Y + Q) / Y²
cluster, everyone = p₀ · (1 + Q / Y)
Race, per arrival Cluster, everyone
0.0%9.0%18.0%one price 8.00%firstlast to arrive
First in race
0.50%
Last in race
16.10%
Cluster price
8.00%
Tokens bought
identical
FigureIllustration, computed from the formulas above: a pool with a 100 ETH quote reserve, equal 0.5 ETH buys, venue fees ignored. Drag the slider: the race spreads out while the cluster price stays one number.

The first arrival in a race pays less than the cluster price; everyone after the midpoint pays more. The totals match. What a cluster buys you is that the outcome no longer depends on who got there first.

The allocation formula

When a cluster clears, the contract admits totalIn = demand × fillRatio (see capacity), takes the fee, makes one venue buy with the rest, and records tokensOut. Each wallet then claims:

tokens[i] = tokensOut × joined[i] / totalJoined
refund[i] = joined[i] × (1 − fillRatio)
⇒ tokens[i] / (joined[i] × fillRatio) = tokensOut / totalIn same for every wallet

The uniform price is not a promise in a report; it falls out of the claim function itself, because every wallet's tokens come from the same two totals. Integer division can leave a few wei of dust per wallet in the contract; it never favours one participant over another.

Numbers on every cleared cluster

The API returns these on Cluster.result (see the API reference):

FieldMeaning
uniformPriceEthETH per whole token every participant paid, fee included.
impactBpsThe uniform price versus the pre-trade spot price, in basis points.
raceWorstBpsA computed counterfactual: what the last participant would have paid versus spot if the same joins had raced one by one through the same venue. It describes the race you avoided; it is not a saving.
fillRatio1 when everyone was filled in full, less than 1 when demand was prorated to capacity.
feeEthThe 10 bps fee taken inside the clearing.

Honest economics

What batching gives you:

  • A uniform price. Nobody is last. The spread between first and last arrival, which a race hands to whoever is fastest, is gone.
  • No sniping inside the window. Latency buys nothing, so there is no reason to spend on it.
  • One gas bill. One venue interaction for the whole cluster, paid by whoever cranks clear.
  • Bounded impact. The ceiling stops the group from moving the market further than it agreed to.

What it does not give you:

  • A lower total cost for the same demand against the same pool. The math above rules that out.
  • A better price than being first in a race. The fastest racer gives up that edge; that is the trade.
  • Protection from the asset itself. A token can still go to zero, at one uniform, verifiable price.

Pons V2 curves

A Pons V2 launch trades on its own bonding curve before it graduates into a Uniswap V4 pool. The curve prices as a constant product over a phantom quote reserve, so the formulas above hold. Fees are charged on the input in ETH, and V2 adds a creator tax on top of the base fee; the adapter reads both live from the curve rather than assuming them. Graduated curves and non-ETH pairs can't be quoted, so they can't be cleared.

Stock token pools

Robinhood Stock Tokens trade in Uniswap-V3-style pools with concentrated liquidity, paired with WETH or, more often, with USDG (then the buy hops through the USDG/WETH pool first). Concentrated liquidity is not a single constant product, so the stock adapter simulates the pool's swap tick by tick: its quotes equal execution to the wei, and its capacity at a ceiling never admits more than the ceiling on the combined price of both hops. The uniform-price and proration rules above are unchanged. The race comparison for a stock clear uses the same exact quotes at the block before the clear; it can only be computed while that state is still available from the public RPC (about 20 minutes), otherwise it shows as n/a.

Every V2 clear, stock or Pons, is also checked against a price guard: the fill must be within the ceiling plus 3% of the best quote seen while the cluster was open, or the clear reverts and can be retried; 15 minutes after close it can be settled as a full refund.

Cookie settings

Choose what we may store on this device. You can change this at any time from the footer.

  • Strictly necessary

    Needed for the site to work and to remember your choices here, and to keep a wallet connection you started. These can't be switched off.

  • Preferences

    Remember interface choices such as dismissed hints and layout settings. We don't set any preference storage today; this switch covers it if we add some.

  • Analytics

    Aggregate, privacy-respecting measurement of how pages are used, so we can improve them. No analytics run today, and none will run unless you allow them here.

Full list of every cookie and storage key: cookie policy.