Overview
Docs

Overview

Scriptcore turns a one-line trading rule into an on-chain contract that fires against live HyperCore state.

ifHYPE.funding<0then closeHYPE0x4353010104000000 9f00000000140200 ...writeone linecompilecanonical bytesregisterElysium registrydecideengine, per updatefirekeeper tx + proofsame bytes, same hash: the registry, the executor and the engine evaluate one program
One program, end to end. The bytes you register are the bytes every evaluator runs.

What it is

You write a condition on HyperCore data (marks, mids, oracle prices, funding, open interest, book imbalance, large trades, a whale's position, the Kinetiq rate) and an action. The compiler turns the line into canonical bytecode. You register it on Elysium with limits and an escrow, and from then on it is a contract: bonded keepers watch the condition, fire it when it turns true, and every fire carries the exact values that justified it, hashed on-chain.

The language is small on purpose. It has no loops, no state you can write and no calls out. Every program ends, every value is bounded, and the same bytes give the same answer in Rust and in Solidity.

A few lines

if HYPE.funding < 0 then close HYPE
if HYPE.mark < 40 then buy 0.001 HYPE of KNTQ
if HYPE.change(1h) < -10% then short 50 USDC of HYPE slip 0.5%
if (HYPE.mark - HYPE.oracle) / HYPE.oracle > 0.2% for 3m then reduce HYPE by 50%
if 0x0000000000000000000000000000000000000001.HYPE.position > 1000 then twap long 100 USDC of HYPE in 5 slices every 1m

The pieces

PieceWhereJob
Language and bytecodeeverywhereOne line in, canonical bytes out. The keccak256 of the bytes is the strategy's identity.
Engineoff chainIngests the Hyperliquid feeds and decides, per market update, which strategies just turned true.
StrategyRegistryElysium 99901Holds code, limits and escrow; re-runs the program on the keeper's values before it acts.
KeeperBond and CoreTruthElysiumBonds keepers and slashes any fire whose prices disagree with delivered HyperCore truth.
CoreExecutorHyperEVM 999Your own executor for HyperCore orders, checked against the live read precompiles in the same transaction.

What you can rely on

  • At most once per trigger. A trigger is a rising edge of the condition. The contracts refuse any trigger that is not strictly greater than the last one fired.
  • Bounded loss. Expiry, a maximum number of fires, a cooldown and the escrow cap what a strategy can ever spend.
  • Your money stays yours. Only you can withdraw your escrow, at any time, also while firing is paused. Kill refunds it in full and stops the strategy for good.
  • Provable fires. A fire whose MARK or ORACLE values were off by more than 1% costs the keeper its whole bond.
  • Stale data never fires. The keeper refuses whenever the feed lags, the state disagrees with Hyperliquid's info API, or a value the strategy reads is old. See data and freshness.

Where to go next