Skip the scroll sequence
Counterbook

One inventory. Two venues.

Live HyperCore HYPE/USDC spot order book, top 5 levels each side. Connecting to HyperCore…
SideSize (HYPE)Price (USDC)
Ask
Ask
Ask
Ask
Ask
mid–
Bid
Bid
Bid
Bid
Bid
spread –

Connecting to HyperCore…

Pool legUniswap v4 position on HyperEVM

Book legFloat on the HyperCore spot book

Curated Uniswap v4 liquidity that rebalances as a maker on Hyperliquid’s order book.

Every swap is priced from the book.

In the same block, the hook reads HyperCore’s best bid and ask. The fee is a base rate plus the pool’s gap to the book, the book’s spread, and the vault’s skew.

fee = base + gap + spread + skew

The gap term builds on Aven’s in-block pricing.

Flow tips the vault.

When traders sell HYPE into the pool, the vault ends up holding more HYPE than its target. Trades that add to the skew pay more. Trades that reduce it pay less.

The book leg counters it.

Past the curator’s band, the vault posts a maker order on HyperCore through CoreWriter. When it fills, net exposure is back on target, without trading through an AMM.

Orders reach HyperCore a few seconds after the block, and fills are read from balances. The book is live; the vault’s order is drawn, as the vault is not deployed yet.

Anyone can check the manager.

NAV is computed on-chain from both legs at the book mid. The curator is paid only on outperformance against holding the assets, and every fee can be recomputed from events and HyperCore data.

Every swap is priced from the book.

In the same block, the hook reads HyperCore’s best bid and ask. The fee is a base rate plus the pool’s gap to the book, the book’s spread, and the vault’s skew.

fee = base + gap + spread + skew

The gap term builds on Aven’s in-block pricing.

Flow tips the vault.

When traders sell HYPE into the pool, the vault ends up holding more HYPE than its target. Trades that add to the skew pay more. Trades that reduce it pay less.

The book leg counters it.

Past the curator’s band, the vault posts a maker order on HyperCore through CoreWriter. When it fills, net exposure is back on target, without trading through an AMM.

Orders reach HyperCore a few seconds after the block, and fills are read from balances. The book is live; the vault’s order is drawn, as the vault is not deployed yet.

Anyone can check the manager.

NAV is computed on-chain from both legs at the book mid. The curator is paid only on outperformance against holding the assets, and every fee can be recomputed from events and HyperCore data.

How it compares

Each approach below solves part of the problem. Counterbook combines book pricing with rebalancing on the book itself, and it has limits of its own.

How Counterbook compares with fee-only hooks, liquidity managers and perp hedges
ApproachWhat it doesWhat it leaves
Fee-only hooksfor example AvenRaise the swap fee when the pool drifts from HyperCore prices read in the same block. Counterbook’s gap term builds on this idea.The position stays skewed after one-sided flow.
Liquidity managersfor example Arrakis and GammaRebalance a concentrated position, typically by swapping the leftover tokens through AMMs or aggregators.Swap fees and price impact on each rebalance.
Perp hedgesfor example lambda and coldcascadeOffset the position’s exposure with perp orders on Hyperliquid.Funding payments, margin to maintain, and liquidation risk.
Counterbookthis vaultPrices each swap from the HyperCore book, then corrects skew with spot maker orders on that book.Maker fees, fills that are not guaranteed, and orders that land a few seconds after the block.

Limits, stated plainly

  • HyperCore executes CoreWriter orders a few seconds after the EVM block. The vault never sees a fill directly; it infers fills from its balances.
  • Maker orders can go unfilled. Past the hard band the vault uses an immediate-or-cancel order instead, which pays the taker fee.
  • Redeeming the book leg is asynchronous: your share of the HyperCore float is returned through a claim after it moves back to HyperEVM.
  • If a HyperCore read fails, the swap still goes through, at a fixed fallback fee.

Check it yourself

Every claim on this page should be checkable. These are the places to look, including the ones that do not exist yet.

Product

DocsFee function, both control loops, parameters and limits
counterbook.xyz/docs
Run it locallyReal contracts on a local chain, HyperCore prices mirrored live, simulated order book
pnpm devnet

Contracts on HyperEVM testnet

CounterbookHookPrices swaps, records inventory
Not deployed yet
CounterbookVaultShares, NAV, curator fee
Not deployed yet
CoreAgentThe vault’s HyperCore account
Not deployed yet

Contracts on HyperEVM mainnet

CounterbookHookPrices swaps, records inventory
0x0CdE6e83eaeAD76f4FB000Abe1d5049ae45B68C0
CounterbookVaultShares, NAV, curator fee
0x3AbDDD1BBf646144e35144244aF0344F8b76555a
CoreAgentThe vault’s HyperCore account
0x8561779F15419e15e8723d36FEBb9b2167262b92

Addresses the contracts use

Best bid and ask (precompile)
0x000000000000000000000000000000000000080e
Spot balances (precompile)
0x0000000000000000000000000000000000000801
Perp oracle for the basis check (precompile)
0x0000000000000000000000000000000000000807
CoreWriter, for orders
0x3333333333333333333333333333333333333333
Uniswap v4 PoolManager on HyperEVM
0x12D4Fd9C5DeDd00ab8a0bCe2CF0167bbf94b6B1F
The book on this pageRead in your browser, not through Counterbook
HyperCore info API, l2Book for @107 (HYPE/USDC spot). How HyperEVM reads HyperCore

Level, and checkable.

The app reads the vault and the HyperCore book side by side. The docs cover the fee function, both control loops and the known limits.