a description of the
ORRO, and the manner
of using it.
Being an account of a mechanism by which the fee of a pool is paid to the liquidity that keeps the range, and not to the liquidity that merely visits it.
- Fee
- 1.00% per swap
- Orbit
- 1h 0m
- JIT weight
- 0
- Owner
- none
What a fee is paid for.
A Uniswap pool pays its fee to whoever is in range at the instant of the swap. That rule has a hole the size of a block. Liquidity that appears one transaction before a large trade and leaves one transaction after it collects most of the fee while carrying none of the risk, and the providers who held the range through the quiet hours before are diluted at the very moment they were waiting for. ORRO does not forbid that liquidity. It changes what a fee is paid for.
In an ORRO pool the pool’s own fee is nought. Every swap hands its fee to the hook, and the hook streams that fee out over the following orbit, 1h 0m, to whatever liquidity is in range while the stream runs, in proportion to liquidity multiplied by time. A position earns for the seconds it spends in range while a fee is streaming, and for nothing else.
The stream runs forward.
The obvious way to weight by time is to split each fee across the liquidity-seconds of the window that preceded it. It cannot be done in constant gas: it needs the history of every position’s range against the price over that window. Streaming forward needs one accumulator and one timestamp, the same shape as the pool’s own fee growth, and it gives the same guarantee at the boundary. A swap cannot pay liquidity that leaves before its stream starts, and the stream has not started when the swap settles.
So to collect a swap’s fee you have to be there afterwards, for as long as it takes to pay out. Liquidity that arrives and leaves inside the same block spends zero seconds in range. Its weight is zero. Not small, not diluted, and there is no amount of capital that changes it.
In range, measured as the pool measures it.
Whether a position was in range is tracked the way the pool tracks fee growth: an accumulator per pool and an outside value cut into every initialised tick, flipped each time the price crosses it. A position’s share is the difference of three numbers, whatever else happened on the plate. It costs a swap one flip per tick it crosses, and the ticks it crossed are read off the pool’s own bitmap, so the hook keeps no list of its own and cannot drift from the pool’s.
The stream waits for someone to pay.
A fee that streams into an empty range would belong to nobody, and would sit in the hook for ever. While no liquidity is in range the stream pauses; it resumes for the first position that arrives. Every wei the hook has taken is therefore owed to someone who was in range while it ran, and the hook holds nothing else. There is no owner, no treasury and no switch. Anyone may call claim on anyone’s behalf; the money has only one place to go.
The manner of using it.
Open a position in the pool as you would in any other, naming yourself in the hook data so the hook credits you and not the position manager it sees as the sender. Keep the range. When you wish, claim what has streamed to you, in both currencies; closing the position stops the clock and leaves what was already owed on your books. The orbits page does all three, and the mechanism page lets you try the arithmetic against a just-in-time visitor before you put anything in.