Templates

Pair

Long one market and short another at the same size: a bet that one beats the other, whichever way the market goes. It takes profit or stops on the gap between them, then enters again.

What it does

“Long ETH, short BTC, 2× each side.” If ETH rises 3% and BTC 1%, the pair is up 2%; if both fall 10%, it's flat. The pool's result is about leverage × the gap.

One cycle, and the call behind each step
Elysium · the token's contract
HyperCore · its own account
  1. 1Read both legs
    Reads both positions and marks
    coreTimeMspositionaccountValuemarkPx
    Positions, account value, marks
    coreTimeMspositionaccountValuemarkPx
  2. 2Open both legs
    Same size long and short
    limitOrder · IOC
    Two orders that fill at once
    limitOrder · IOC
  3. 3Watch the gap
    Long's move minus short's move, every step
    on the chain
    markPx
    markPx
  4. 4Close both
    Gap reached the take-profit or the stop
    limitOrder · IOC
    Two reduce-only orders
    limitOrder · IOC
  5. 5Settle and wait
    Books the result, cools down
    accountValue
    Account value after the close
    accountValue
Then it waits out the re-entry delay and opens both legs again.

What happens next

The white line is how far ETH is ahead of BTC, in points; the dashed lines are each coin. Note the last chart: a crash that hits both barely moves the pair.

What happens to $1,000
Long ETH, short BTC, 2× each side, take-profit +2% and stop −1% on the gap between them
ETH beats BTC+6% vs +2%
+6.1%0%ETHETH − BTCBTC$1,000$1,070your $1,000
$1,000 →$1,070+7.0%
1 take-profit · 0 stops · in a trade at the end

If ETH rises 6% while BTC rises 2% over 2 days, your $1,000 becomes about $1,070.

They move togetherboth +5%
+5.2%0%ETHBTCETH − BTC$1,000$995your $1,000
$1,000 →$995−0.5%
0 take-profits · 0 stops · in a trade at the end

If ETH and BTC both rise 5% over 2 days, your $1,000 becomes about $995.

ETH lags BTC+1% vs +5%
+5.1%−4%BTCETHETH − BTC$1,000$907your $1,000
$1,000 →$907−9.3%
0 take-profits · 3 stops · in a trade at the end

If ETH rises 1% while BTC rises 5% over 2 days, your $1,000 becomes about $907.

Both crash 12%in an hour
+0.1%−12.2%ETH − BTCETHBTC$1,000$996your $1,000
$1,000 →$996−0.4%
0 take-profits · 0 stops · in a trade at the end

If ETH and BTC both crash 12% in an hour, your $1,000 becomes about $996.

  • Enters
  • Take-profit
  • Stop
  • ETH's lead over BTC, points

Illustrative price paths over 2 days. What the token does on them, and every dollar figure, comes from the template's own simulator with these settings and Hyperliquid's fees, with funding and order-book slippage where they apply. Before the fees to buy and sell the token. Not a forecast.

How it runs

  1. 01Enter
    Opens both legs at the same size: leverage × capital each.
  2. 02Watch
    Each step reads both prices. No single resting order can hold a two-leg take-profit, so both exits are checked by the vault.
  3. 03Close
    When the gap reaches the take-profit or the stop, it closes both legs.
  4. 04Settle and wait
    Like the Loop: performance fee on new highs, bank, breakers, re-entry delay.

Settings

Long market / short market
Range: Any two different listed perps
Default: ETH / BTC
What it does: Which one you think beats which.
Leverage per side
Range: 1× up to what the shared margin allows
Default: 2×
What it does: Higher: more per point of gap.
Take-profit
Range: 0.1%–100% of the gap
Default: 2%
What it does: Closer: more, smaller wins.
Stop
Range: Off, or 0.1% up to the tighter leg's liquidation
Default: 1%
What it does: Tighter: smaller losses, hit more often.
Re-entry delay
Range: 0 s – 7 days
Default: 1 min
What it does: Longer: fewer cycles.
After-stop multiplier
Range: ×1–×100
Default: ×1
What it does: Waits longer after a stop.
Bank of each win
Range: 0%–100%
Default: 0%
What it does: Banked profit isn't traded any more.
Entry slippage
Range: 0.05%–5%
Default: 0.3%
What it does: The worst price an entry accepts. Past it, the order doesn't fill and waits for the next step.
Stop slippage
Range: 0.05%–10%
Default: 0.5%
What it does: The worst price a stop accepts. What doesn't fill is sent again in the next block.
Leverage per side
The same exits, more or less size on each leg.
2×
ETH beats BTC: $1,070 · lags: $907
4×
ETH beats BTC: $1,140 · lags: $816
Take-profit and stop
On the gap between the two legs, not on either price.
+2% / −1%
Closes on a 2-point lead or a 1-point lag
+4% / −2%
Waits for a bigger gap either way

Plus the settings every template shares: the cash share, breakers, pool cap, end date, fees, market liquidity, metadata and seed. See Shared settings.

Under the hoodintended, on Elysium's precompiles

Every precompile call a Pair token makes, in the order its cycle first makes them, then the pool's own. Until Elysium publishes its precompiles these are the intended calls; the contracts run them on HyperEVM testnet today. What each does, and the assumptions behind them: Precompiles on Elysium.

coreTimeMs()
Kind: read
What it does here: How fresh the reads are. A step stops when they're older than 2 seconds.
Where today: HyperEVM: the block's time
position(vault, asset)
Kind: read
What it does here: The vault's own position on a market: its size and what it cost.
Where today: L1Read 0x…0800
accountValue(vault)
Kind: read
What it does here: What the vault's HyperCore account is worth: margin plus the open result. NAV is built from it.
Where today: L1Read 0x…080F
markPx(asset)
Kind: read
What it does here: Hyperliquid's mark price: what the stop, the bands, the levels and the strikes are checked against.
Where today: L1Read 0x…0806
limitOrder(… IOC)
Kind: write
What it does here: An order that fills at once or cancels, never worse than its limit: entries, stops, rebalances, grid steps.
Where today: CoreWriter action 1, time-in-force 3
withdrawable(vault)
Kind: read
What it does here: How much USDC can leave the account right now, to pay sellers.
Where today: L1Read 0x…0803
usdClassTransfer(amount, toPerp)
Kind: money
What it does here: Moves USDC between the account's perp and spot balances.
Where today: CoreWriter action 7
depositFor(vault, amount, dest)
Kind: money
What it does here: Sends USDC from the vault on the chain into its own HyperCore account.
Where today: Circle's CoreDepositWallet
spotSend(system, USDC, amount)
Kind: money
What it does here: Sends USDC from the HyperCore account back to the vault on the chain, to pay sellers.
Where today: CoreWriter action 6