New: Gap alerts tell you when an Elysium pool drifts past your threshold from the HyperCore book.All updates
Liquidisium · protocol paper

Pricing Elysium swaps against the HyperCore book

Version 1.0 · 2026-11-27 · Elysium, chain 99901 · liquidisium.xyz/paper

Read the docs
Abstract

An automated market maker on Elysium quotes HYPE a few blocks behind HyperCore, where HYPE is actually priced. Every time the book moves, the first trade to bring the pool back in line takes the difference from the pool's LPs. Liquidisium is a Uniswap v4 hook that knows the HyperCore price at swap time. A swap that closes the gap to the book pays most of that gap as its fee, and the fee goes to LPs. Every other swap pays a 0.05% base fee. This paper sets out the reference the hook prices against, the fee rule and its bound, the fallback, the pricing channels, the path to reading HyperCore directly with EL1Read, and what runs on Elysium today.

1. The problem: LVR next to the book

Loss-versus-rebalancing (LVR) is the cost an AMM's LPs pay for quoting a price that the rest of the market has already moved away from. On a chain with no venue nearby it is a statistical cost, spread over many small moves. On Elysium it is concrete: HyperCore runs a central limit order book for HYPE one hop away, it updates continuously, and Elysium's pools only move when someone swaps.

When the HyperCore mid steps up, an Elysium HYPE pool keeps the old price. The first trader who notices buys HYPE from the pool below the book. The pool's LPs sell at the stale price; the trader holds HYPE worth more than they paid. A static fee tier does not fix this: a 0.30% pool charges the arbitrageur 0.30% whether the gap is 0.31% or 2%, and charges every ordinary swapper the same 0.30%.

timeHyperCore mid movesElysium poolstale quotearbitrage swapt₀t₁
Figure 1. The HyperCore mid moves at t₀; the Elysium pool waits until an arbitrage swap at t₁. The shaded band is the stale quote LPs sell into.

The size of this flow is measurable on Elysium today. The pool checker replays the last 24 hours of any HYPE pool against the HyperCore book of each minute, and Who took the gap groups the swaps that closed gaps by the address that made them. On busy days a large share of the volume on Elysium's HYPE pools is this kind of trade.

2. The reference

The hook prices every swap against a reference: the HyperCore mid multiplied by the Elysium basis.

reference = mid(HyperCore) × (1 + basis)

The mid. HYPE/USDC uses the HyperCore spot book @107. HYPE/KNTQ uses @107 ÷ @334, taken as a one-minute median because the KNTQ book is thin. A kHYPE/HYPE market would use @336 ÷ @107 with no basis, since both legs are HYPE.

The basis. HYPE on Elysium does not trade at exactly the HyperCore price; the bridge between the two has a cost and the gap moves. A pool priced on the raw mid would charge every buyer that difference. The basis is the 15-minute median of the Elysium price over the HyperCore mid, measured on the deepest Elysium pools of the pair that are not Liquidisium pools. The feed clamps it to ±5% and limits how fast it can move. The pool then moves with the HyperCore book, and the hook charges only for the part of a move Elysium has not followed yet.

The keeper today. A keeper reads the HyperCore books and posts one transaction per update to the KeeperFeed contract: the mid as a sqrtPriceX96, the basis in parts per million, the HyperCore timestamp and a sequence number. It posts on a 0.10% move and on a heartbeat. The HyperCoreAdapter turns a post into the reference; the hook reads it through the pool's pricing channel.

TODAYHyperCore@107, @334 midKeepermid, basis, timeKeeperFeedonchain postAdaptermid × basisHookgap → feeAFTER EL1READHyperCoreread in the callEL1Read precompile, no keeper in the price pathAdapternew sourceHookunchanged
Figure 2. The reference path today and after EL1Read. The hook reads the adapter in both; only the adapter's source changes.

EL1Read later. EL1Read lets an Elysium contract read the HyperCore book inside the call. When it is available, the adapter's source is replaced through the timelock and reads the mid directly. The hook and every pool stay as they are. The basis becomes an onchain moving average updated on each Liquidisium swap, and the keeper leaves the price path.

3. The gap fee rule

In beforeSwap the hook reads the pool's price P and the reference R and computes the gap.

g = | P / R − 1 |

A swap is toward the reference when it sells HYPE while the pool is above the reference, or buys HYPE while the pool is below it. The fee is:

CaseFee
Toward the reference, gap of at least 0.10%min(3%, max(0.05%, 0.8 × g))
Any other swap0.05%
Reference older than 120 s, gap above 10%, or a channel that fails0.30%, both ways
0%1%2%3%0%1%2%3%4%5%gap between the pool and the referenceaway from the book: 0.05%3% cap from a 3.75% gaptoward the book: 0.8 × gap
Figure 3. Fee against gap. Swaps that move the pool away from the book, or trade inside 0.10% of it, pay the base fee.

The hook returns the LP part as the pool's fee for that swap, so it accrues to in-range positions like any v4 fee. LPs receive the base fee and the larger part of the gap fee. The rest of the gap fee goes to the fee router, which sends it to the pricing channel's author and buys and burns $LQDS. Each swap emits GapFee(poolId, g, F, toward, lpAmount, hookAmount).

The result for LPs: the trade that used to take the gap now pays for it, and an ordinary swapper pays 0.05% instead of a static tier.

4. Why no swap pays more than the reference

A toward swap starts from a price that is better than the reference by the whole gap g, and it pays at most 0.8 × g. Its all-in price, fee included, therefore stays on the pool's side of the reference: the swapper never pays more than the HyperCore price times the basis, plus the base fee. A fuzz test, testFuzz_allInNeverBeyondReference, checks this bound on every run.

Reference RHyperCore mid × basisPool price P = R + 1%fee, at most 0.8 of the gap, to LPswhat the swapper keepsall-in price stays on the pool's side of R
Figure 4. A pool 1% above the reference. The arbitrage still clears at a price above R; LPs collect the fee in between.

Because the fee is a fraction of the gap, closing a gap stays profitable. Each swap can close part of it at a profit, so a jump on HyperCore is closed over a few swaps at Elysium's 100 ms blocks rather than all at once. The fee stops at 3%, reached at a 3.75% gap; a move larger than that within one reference interval leaves the excess to the arbitrageur.

A swap away from the reference never pays the gap fee. A wrong reference can make an arbitrage cheap, leaving LPs where they would be in any pool, or make honest swaps in one direction pay more, and never above the reference price.

5. Fallback

The reference only sets the fee. It never moves a pool's price and never touches funds. When the hook cannot trust it, the pool falls back to a plain 0.30% fee in both directions:

  • the reference is older than 120 seconds;
  • the pool is more than 10% from the reference;
  • the channel reverts or runs out of its 60,000 gas budget.

Fallback swaps pay their whole fee to LPs. A keeper outage therefore turns a Liquidisium pool into an ordinary 0.30% pool, never into a pool that cannot trade.

6. Pricing channels and stakes

The hook reads its reference through a pricing channel: any contract that implements one view function.

interface IChannel {
  function quote(PoolKey calldata key, bool zeroForOne, uint160 sqrtPriceX96)
    external view returns (uint160 sqrtRefX96, uint64 updatedAt);
}

The house channel reads the HyperCoreAdapter. Anyone can write another, for example one that blends the HyperCore book with an onchain TWAP, and list it in the channel registry against a $LQDS stake. A pool picks its channel when it opens through the hook's openPool, and keeps it for life. The channel's author earns a share of the gap fees of every pool that runs on it.

The stake is the bond behind the channel. A guardian can pause a dangerous channel at once, and its pools fall back to the house channel. After a 72-hour public notice the timelock can burn the stake. Once EL1Read is live, anyone will be able to prove a faulty reference onchain against the EL1Read mid times the basis. Leaving the registry takes 7 days.

Swappers and LPs never need $LQDS. It is used to list a channel, and gap fees buy and burn it.

7. The upgrade path

A v4 hook is fixed when a pool is created, so the parts that must change are kept out of the hook. The hook has no owner and no path to LP funds. The adapter, the feed, the registry and the router answer to a 48-hour timelock.

Live
Keeper posts both markets on Elysium; hook, adapter, feed, registry, router, timelock deployed and verified
Channels
Registration opens when the timelock records $LQDS in the registry
EL1Read
Adapter source changes through the timelock, basis becomes an onchain EMA, keeper leaves the price path
EL1Write
A hedge vault keeps a HyperCore perp short against opted-in positions
Figure 5. From the keeper to EL1Read and EL1Write. Each step changes a contract behind the hook, never the hook.

With EL1Write, a hedge vault can hold opted-in positions and keep a HyperCore HYPE perp short equal to their HYPE delta, so an LP can earn the gap fee without carrying the HYPE price. Until then, the hedge calculator gives the perp size for any position.

8. What is live today

  • The hook, the HyperCoreAdapter, the KeeperFeed, the channel registry, the fee router and the timelock are deployed on Elysium (chain 99901) and source-verified on the Elysium explorer.
  • The keeper posts the HyperCore mid and the Elysium basis for HYPE/USDC and HYPE/KNTQ. Its posts, age and latency are public on /status and /reference.
  • The two house pools, HYPE/USDC and HYPE/KNTQ with native HYPE, are open through openPool at the keeper's reference and are ready for their first liquidity on /lp.
  • Channel registration opens when the timelock records $LQDS in the registry.
  • Every existing Elysium HYPE pool can be read against the same reference: the gap scanner, the pool checker, Who took the gap, gap alerts and the Shadow LP replay, with JSON, RSS and an MCP server for bots and agents.

The contracts are unaudited. Use them with amounts you can afford to lose.