v0.0.4 Open the state

What a swap
pays

Nine steps, in order, with the constants written out. One pool, one number it keeps about itself, and a fee that falls out of the two.

01

The whole rule, in one line

This is an ordinary Uniswap v4 pool with one difference: the fee you pay is the base rate multiplied by how many times your swap is the usual size of a swap in this pool.

That usual size is called the measure. The pool works it out from its own flow, continuously. Nobody sets it and nobody can move it.

Swap the measure, pay the base rate. Swap three times the measure, pay three times the base rate. There is nothing else to learn.

02

The measure

The measure is the pool's own idea of a normal swap. It starts at 0.25 ETH and then follows what actually happens, with a slow average that takes about thirty swaps to forget an old regime.

A swap counts toward the measure at at most four times its current value. A single enormous order cannot drag the measure up behind it, which is what stops the obvious attack: making the pool think your size is normal.

It never goes under 0.01 ETH. That floor exists so a dead pool cannot have a measure of zero and charge everyone the ceiling.

03

Nemesis, what your own swap pays

Nemesis is your swap divided by the measure, and it is the only thing about you that the pool looks at. It starts at x1 and stops at x12.

Under the measure it stays at x1: a tiny swap does not pay less in proportion than a normal one. Above twelve times, it stops growing, so an enormous order pays the same multiple as one twelve times the measure.

The pool has no memory of addresses. Splitting one large order into ten small ones is not an attack on this rule, it is the rule working: ten measured swaps pay ten base rates, which is what a measured trader pays anyway.

0the measure12x the measure x1x12 proportionalflatcapped

Below the measure the multiplier is flat, above it proportional, and it stops at twelve.

04

The favour, what everyone pays

The favour is one number from 0 to 1 000, shared by everybody, and it multiplies the base rate for every swap in the pool.

A measured swap lifts it by up to four points. An oversized one drops it by ten points for every step of nemesis past one, so a swap at twelve times the measure costs the pool a hundred and ten points.

And it leaks: one point a minute, always, whether anything happens or not. A pool nobody trades falls to the bottom in about seventeen hours.

+4
points at most, for a swap at the measure
-110
points for a swap at twelve times the measure
-1
point a minute, whatever happens
05

The twelve thrones

Where the favour sits decides which of the twelve Olympians holds the throne, and each one carries a coefficient. That coefficient is the collective half of your fee.

Hermes is the fixed point, at x1.00: under Hermes this pool behaves exactly like an ordinary 0.30% pool. Everything else is a signed distance from there, from Zeus halving the fee to Ares multiplying it by more than three.

ThroneFavourCoefficientBase rate there
Zeus950 - 1000x0.500.15 %
Hera860 - 949x0.580.17 %
Demeter770 - 859x0.670.20 %
Apollo680 - 769x0.760.23 %
Athena590 - 679x0.850.26 %
Hermes500 - 589x1.000.30 %
Artemis410 - 499x1.150.34 %
Hephaestus320 - 409x1.350.41 %
Aphrodite230 - 319x1.600.48 %
Dionysus150 - 229x1.950.58 %
Poseidon60 - 149x2.450.73 %
Ares0 - 59x3.200.96 %
06

Where the money goes

A swap inside the measure has no surcharge at all: everything it pays goes to the liquidity providers, exactly as in an ordinary pool.

Above the measure, the part beyond the base is split in two. Half to the providers, because they are the ones taking the price impact of a large order, paid in the same transaction as the damage. Half to the temple, a balance inside the hook.

The temple has one use and no other: it can pay to hold the favour where it is when the pool is below Hermes. Its flame is set to exactly the leak, so it can cancel the drift and never lift the favour by itself.

07

Buying the favour back

Anyone can pay into the temple and lift the favour, at one point for every hundredth of the measure. A hundred points costs one whole measure, which is where the name comes from.

Nothing is recorded, no right is acquired, nothing is returned. It is pure expense, and it is the only way the favour moves other than by swapping.

Near the top of the table, repairing a hundred and ten points of damage costs about five times what the oversized swap paid in fees. Near the bottom it costs about what it paid. That inversion is deliberate: it has to be expensive to break and cheap to climb out of the hole.

08

What it cannot do

It cannot be paused, tuned, or pointed at a second pool. There is no owner, no fee switch, no pause, no upgrade path and no parameter that anyone can move after deployment.

It cannot read an outside price. There is no oracle and no reference anywhere: every number comes from this pool's own flow.

It cannot refuse a swap. Whatever the size, whatever the favour, the swap goes through and simply pays what the rule says.

09

The flaw

Nobody knows whether this costs or earns the liquidity providers. They collect a surcharge they would not otherwise see, and at the same time the oversized flow that pays it is the flow that hurts them. The two have not been measured against each other on a live pool, and the honest answer today is that the instrument to answer it is in place and the answer is not.

Two more, said plainly. The twelve coefficients were chosen for a total spread of 6.4 and a neutral point at Hermes, and nothing says that is the right scale, and there is no governance to change it. And an aggregator that does not know this rule will route an order straight into the ceiling without meaning to.