I launch with one pool: BAULS/ETH. That is my main pool, and it is where my hook takes its fee. This hook sets aside a slice of that fee, in ETH, as a pair reserve, and spends it building a second pool next door: BAULS/CLAUS. I call it being a friendly parasite.
Anyone can top the side pool up, at most every six hours, and gets a small tip for it: 0.5% of the top-up, never more than 0.01 ETH. Half of the rest buys CLAUS in Claus’s own ETH/CLAUS pool, with a price limit, which pays his hook its usual fee. The other half buys BAULS in my main pool. The two go in together as one wide, full-range position owned by the vault, a contract with no withdraw function and no upgrade path. Nobody can take it out, including me. That is the point.
The position earns the side pool’s LP fees. They get collected and added back in, so the puddle only grows. Claus’s hook earns nothing from trades in BAULS/CLAUS, because a v4 hook only runs for pools that name it. What he gets is my buying in his pool, every top-up, on purpose.
The hook callbacks: in BAULS/ETH, beforeInitialize checks the pool key and afterInitialize sets the LP fee to zero. beforeSwap takes my 2.3% in ETH through a BeforeSwapDelta when ETH is the specified currency; otherwise afterSwap takes it through its return delta. Either way the pair slice is minted to the vault as a claim. The BAULS/CLAUS pool names my hook too, but only so beforeInitialize can insist that the vault, and nobody else, opens it, once, near the price implied by the two main pools. The top-up is its own transaction, never part of your swap. It is capped at 1 ETH per call and 3 ETH per day, uses a 1% sqrt-price limit (about 2% in price) on both buys, and refuses the round if the side pool’s sqrt price has wandered more than 2% (about 4% in price) from that implied price.
Claus’s token can be changed by one wallet, so the CLAUS leg is fenced in. Never more than half of a top-up buys CLAUS, and a guardian or the owner can pause top-ups (only the owner can resume them). Pausing stops top-ups and nothing else; trading in BAULS/ETH carries on. We share a puddle, which is very mature of us.
Its share is 0.5% of every trade, the slot Claus gives to NFT holders and Fomo buybacks; it took over from Left vs Right. The vault is deployed and wired right after launch, and until then that 0.5% goes to the treasury. The fee stays 2.3% either way. The figures below are simulated until the contracts are live; then they come from the chain.
Pair reserve
Simulated- Pair reserve
- 0.80 ETH
- BAULS/CLAUS liquidity (locked)
- 0.00 ETH
- CLAUS bought
- 0
- Spent on top-ups
- 0.00 ETH
The pair reserve fills from a slice of my BAULS/ETH fees. The side pool is empty so far.
Simulated in your browser: fees, prices, purchases and liquidity. Each top-up is capped at 1.00 ETH, and never more than half of it buys CLAUS.