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.
- 1Read both legsReads both positions and markscoreTimeMspositionaccountValuemarkPxPositions, account value, markscoreTimeMspositionaccountValuemarkPx
- 2Open both legsSame size long and shortlimitOrder · IOCTwo orders that fill at oncelimitOrder · IOC
- 3Watch the gapLong's move minus short's move, every stepon the chainmarkPxmarkPx
- 4Close bothGap reached the take-profit or the stoplimitOrder · IOCTwo reduce-only orderslimitOrder · IOC
- 5Settle and waitBooks the result, cools downaccountValueAccount value after the closeaccountValue
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.
If ETH rises 6% while BTC rises 2% over 2 days, your $1,000 becomes about $1,070.
If ETH and BTC both rise 5% over 2 days, your $1,000 becomes about $995.
If ETH rises 1% while BTC rises 5% over 2 days, your $1,000 becomes about $907.
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
- 01EnterOpens both legs at the same size: leverage × capital each.
- 02WatchEach step reads both prices. No single resting order can hold a two-leg take-profit, so both exits are checked by the vault.
- 03CloseWhen the gap reaches the take-profit or the stop, it closes both legs.
- 04Settle and waitLike the Loop: performance fee on new highs, bank, breakers, re-entry delay.
Settings
| Setting | Range | Default | What it does |
|---|---|---|---|
| Long market / short market | Any two different listed perps | ETH / BTC | Which one you think beats which. |
| Leverage per side | 1× up to what the shared margin allows | 2× | Higher: more per point of gap. |
| Take-profit | 0.1%–100% of the gap | 2% | Closer: more, smaller wins. |
| Stop | Off, or 0.1% up to the tighter leg's liquidation | 1% | Tighter: smaller losses, hit more often. |
| Re-entry delay | 0 s – 7 days | 1 min | Longer: fewer cycles. |
| After-stop multiplier | ×1–×100 | ×1 | Waits longer after a stop. |
| Bank of each win | 0%–100% | 0% | Banked profit isn't traded any more. |
| Entry slippage | 0.05%–5% | 0.3% | The worst price an entry accepts. Past it, the order doesn't fill and waits for the next step. |
| Stop slippage | 0.05%–10% | 0.5% | The worst price a stop accepts. What doesn't fill is sent again in the next block. |
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.
| Call | Kind | What it does here | Where today |
|---|---|---|---|
coreTimeMs() | read | How fresh the reads are. A step stops when they're older than 2 seconds. | HyperEVM: the block's time |
position(vault, asset) | read | The vault's own position on a market: its size and what it cost. | L1Read 0x…0800 |
accountValue(vault) | read | What the vault's HyperCore account is worth: margin plus the open result. NAV is built from it. | L1Read 0x…080F |
markPx(asset) | read | Hyperliquid's mark price: what the stop, the bands, the levels and the strikes are checked against. | L1Read 0x…0806 |
limitOrder(… IOC) | write | 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 |
withdrawable(vault) | read | How much USDC can leave the account right now, to pay sellers. | L1Read 0x…0803 |
usdClassTransfer(amount, toPerp) | money | Moves USDC between the account's perp and spot balances. | CoreWriter action 7 |
depositFor(vault, amount, dest) | money | Sends USDC from the vault on the chain into its own HyperCore account. | Circle's CoreDepositWallet |
spotSend(system, USDC, amount) | money | Sends USDC from the HyperCore account back to the vault on the chain, to pay sellers. | CoreWriter action 6 |
coreTimeMs()position(vault, asset)accountValue(vault)markPx(asset)limitOrder(… IOC)withdrawable(vault)usdClassTransfer(amount, toPerp)depositFor(vault, amount, dest)spotSend(system, USDC, amount)