Under the hoodintended

Precompiles on Elysium. Every call a token makes, drawn.

A Corepos token is a contract on Elysium that trades on Hyperliquid's HyperCore by itself. It reads HyperCore through read precompiles and writes its own orders through CoreWriter: no bot holds the money, and every step is a contract call anyone can check. This is the intended design, on Elysium's precompiles when they ship.

The picture

A precompile is a contract built into the chain itself, at a fixed address. Elysium is Kinetiq's chain on top of Hyperliquid, and its precompiles reach into HyperCore: Hyperliquid's order books and accounts. See it animated on How it works.

Reading HyperCore

Every step starts by reading. The vault asks HyperCore for its own position and account value and the market's mark price: no oracle, no off-chain feed. A read older than 2 s stops the step.

CallWhat it doesWhere todayUsed by
coreTimeMs()
How fresh the reads are. A step stops when they're older than 2 seconds.Elysium: the read precompile's HyperCore time (A2)
HyperEVM: the block's time
every template
position(vault, asset)
The vault's own position on a market: its size and what it cost.
L1Read 0x…0800
Loop, Hold, Basket, Pair, Carry, Grid
accountValue(vault)
What the vault's HyperCore account is worth: margin plus the open result. NAV is built from it.
L1Read 0x…080F
Loop, Hold, Basket, Pair, Carry, Grid
withdrawable(vault)
How much USDC can leave the account right now, to pay sellers.
L1Read 0x…0803
Loop, Hold, Basket, Pair, Carry, Grid
markPx(asset)
Hyperliquid's mark price: what the stop, the bands, the levels and the strikes are checked against.
L1Read 0x…0806
Loop, Options, Hold, Basket, Pair, Carry, Grid
bbo(asset)
The best bid and ask. In the reader for sizing orders by the book; v1 vaults don't call it yet.Elysium adds book depth (A2)
L1Read 0x…080e
not yet
spotBalance(vault, token)
A spot balance on HyperCore: USDC, the coin a Carry holds, or the tickets an Options round holds.Outcome tickets: unverified (A5)
L1Read 0x…0801
Options, Carry
spotPx(pair)
A spot pair's price, so a Carry can size its spot side.
L1Read 0x…0808
Carry
outcomePx(10·o + side)
A HIP-4 side's price, 0 to $1: the chance. An Options round is checked and marked with it.Assumption A5
No precompile yet
Options
fundingRate(asset)
A perp's hourly funding. A Carry averages it before it enters or exits.The vault refuses a stale or out-of-range rate
No precompile yet: a keeper reports it, stamped with its time
Carry

Writing its own orders

The vault writes actions to CoreWriter, which acts on the caller's own HyperCore account. Each action is a few bytes:

sendRawAction( version 1 · action id (3 bytes) · ABI-encoded fields )
Prices and sizes are human values × 10⁸. A client id (cloid) lets the vault cancel the order it placed.
CallWhat it doesWhere todayUsed by
limitOrder(… IOC)
An order that fills at once or cancels, never worse than its limit: entries, stops, rebalances, grid steps.
CoreWriter action 1, time-in-force 3
Loop, Options, Hold, Basket, Pair, Carry, Grid
limitOrder(… GTC, reduce-only)
A take-profit that rests in Hyperliquid's book and fills at its own price, with no transaction needed.
CoreWriter action 1, time-in-force 2
Loop
cancelByCloid(asset, id)
Cancels the resting take-profit by the id the vault gave it.
CoreWriter action 11
Loop
outcomeOperation(split)
Turns $1 into one Yes and one No ticket on HyperCore.Assumption A4
CoreWriter action 17, op 0
Options
outcomeOperation(merge)
Turns one Yes and one No ticket back into $1.Assumption A4
CoreWriter action 17, op 1
Options

Moving USDC

Money moves both ways: into the HyperCore account to trade, back to Elysium to pay sellers. While it's on the way, NAV still counts it, so the price never jumps because money is moving.

CallWhat it doesWhere todayUsed by
depositFor(vault, amount, dest)
Sends USDC from the vault on the chain into its own HyperCore account.Elysium's route: assumption A3
Circle's CoreDepositWallet
every template
usdClassTransfer(amount, toPerp)
Moves USDC between the account's perp and spot balances.
CoreWriter action 7
Loop, Hold, Basket, Pair, Carry, Grid
spotSend(system, USDC, amount)
Sends USDC from the HyperCore account back to the vault on the chain, to pay sellers.
CoreWriter action 6
every template

A step, traced

What a keeper's call actually does, with numbers. The keeper decides nothing: the reads and the rules do.

Example: two steps of BTC Long Loop 3x, tracedpool $100k
  1. ·step()called by any keeper
  2. readcoreTimeMs()fresh: under 2 s old
  3. readposition(vault, BTC)0: flat, waiting to enter
  4. readaccountValue(vault)$90,000 on HyperCore (+ $10,000 cash)
  5. readmarkPx(BTC)59,501
  6. ·notional = 3 × $100,000$300,000
  7. ·size = $300,000 ÷ 59,5015.04193 BTC
  8. writelimitOrder(BTC, buy, 59,680, 5.04193, IOC)fills now, at most +0.3%
  9. ·next step()sees the position
  10. writelimitOrder(BTC, sell, 60,691, 5.04193, reduce-only, GTC)+2% above the fill, resting in the book

Which template calls what

Every template reads the same few things and writes the same order type; Options adds the ticket calls, Carry the spot ones.

  • coreTimeMsread
    LoopOptionsHoldBasketPairCarryGrid
  • positionread
    LoopHoldBasketPairCarryGrid
  • accountValueread
    LoopHoldBasketPairCarryGrid
  • withdrawableread
    LoopHoldBasketPairCarryGrid
  • markPxread
    LoopOptionsHoldBasketPairCarryGrid
  • bboread
    in the reader, not called yet
  • spotBalanceread
    OptionsCarry
  • spotPxread
    Carry
  • outcomePxread
    Options
  • fundingRateread
    Carry
  • limitOrder · IOCwrite
    LoopOptionsHoldBasketPairCarryGrid
  • limitOrder · GTCwrite
    Loop
  • cancelByCloidwrite
    Loop
  • outcomeOperation · splitwrite
    Options
  • outcomeOperation · mergewrite
    Options
  • depositFormoney
    LoopOptionsHoldBasketPairCarryGrid
  • usdClassTransfermoney
    LoopHoldBasketPairCarryGrid
  • spotSendmoney
    LoopOptionsHoldBasketPairCarryGrid

What it assumes, in plain words

A1A contract has its own HyperCore account

The token's contract can place orders, cancel them and move money on its own Hyperliquid account, the way HyperEVM's CoreWriter works.

If not: The money moves to a HyperEVM vault that owns the account; Elysium stays where orders are placed fast.

A2It can read everything it needs

Its position, its account value and margin, the mark price, the best bid and ask, and how fresh the read is.

If not: Without book depth, order size is capped by open interest; without the read's time, a tighter freshness limit.

A3USDC moves in seconds

Money moves between the contract's Elysium balance and its HyperCore account quickly.

If not: More cash stays on Elysium (20–30%), and new money arrives through HyperEVM, a day late.

A4It can trade HIP-4 tickets

The write precompile takes orders on outcome markets and the split and merge of a ticket.

If not: The Options template waits. Option tickets and play tokens don't need it.

A5It can read HIP-4 balances and prices

How many tickets it holds, and what they're worth now.

If not: Fallback mode, the default until these reads are confirmed on testnet: an Options token reads only its USDC, counts a running round at what it cost, books each result from the USDC that comes back, and buys and sells at its value only between rounds. No early close.

A6Nothing on chain says how a market settled

So a reporter posts the result, and anyone can check it for an hour.

If not: Designed in already. Replaced if Hyperliquid adds a read.

Kinetiq hasn't published Elysium's precompile interfaces yet. Each assumption is checked the day they are: Assumptions and open questions.

Live today, and when Elysium ships

Today
  • The contracts are written and tested against a mock HyperCore.
  • The whole loop runs on HyperEVM testnet, through HyperEVM's read precompiles and CoreWriter.
  • Option tickets and play tokens need no precompile: they could run on Elysium as they are.
  • Nothing is deployed yet. The site shows only real data: Hyperliquid's live prices, and tokens once they launch.
When Elysium's precompiles ship
  • Only the reader (ICoreReader) and the action encoding change; the vaults stay as they are.
  • A1–A6 are checked against the published interfaces.
  • The Options template launches in fallback mode (USDC reads only) until A5's outcome reads are confirmed on testnet; then the factory switches new launches to full mode. A token keeps the mode it was born in.
  • Audited, then deployed by the owner from their own wallet.

Why it matters

No bot holds the money

The money sits in the token's own HyperCore account. Only the contract's code can move it; a keeper can only say “go”.

Every step can be checked

Every read and every order is a contract call on a public chain. Anyone can replay what the token did and why.

The rules can't drift

The rules are code fixed at launch. Nobody can quietly change the strategy after you buy.

HyperliquidBTCETHHYPESOL