Templates

Hold. Constant leverage on one market.

Holds one market at a constant leverage, like a leveraged ETF. When the price moves, the leverage drifts; past a band it trades back.

What it does

“Hold BTC at 2×, always.” When BTC rises the position grows slower than the pool, so leverage falls; when it drops leverage rises. Once it leaves 2× ± 20%, or on a schedule if set, the vault trades back: it buys after a gain and sells after a loss.

One check, and the call behind each step
Elysium · the token's contract
HyperCore · its own account
  1. 1Read
    Reads its position and the mark
    coreTimeMspositionaccountValuemarkPx
    Position, account value, mark
    coreTimeMspositionaccountValuemarkPx
  2. 2Open at L×
    Sends leverage × the pool
    limitOrder · IOC
    Fills at market
    limitOrder · IOC
  3. 3Check the band
    Leverage now = position ÷ value; inside the band, nothing to do
    on the chain
  4. 4Trade back to L×
    Out of the band, or on schedule
    limitOrder · IOC
    Sells after a loss, buys after a gain
    limitOrder · IOC
Every step checks again. There is no take-profit and no stop.

What happens next

A week, four ways. A 2× Hold roughly doubles the move either way, and loses a little when the price swings and comes back: the last chart ends below $1,000 though BTC ends where it started.

What happens to $1,000
Long BTC at 2×, band ±20%, rebalanced only when it leaves the band
Up 15%over a week
68,42559,500$1,000$1,294your $1,000
$1,000 →$1,294+29.4%
0 rebalances · leverage stayed inside 2× ± 20%

If BTC rises 15% over a week, your $1,000 becomes about $1,294.

Sidewaysfor a week
61,56155,886$1,000$995your $1,000
$1,000 →$995−0.5%
0 rebalances · leverage stayed inside 2× ± 20%

If BTC goes sideways for a week, your $1,000 becomes about $995.

Down 15%over a week
59,57650,575$1,000$699your $1,000
$1,000 →$699−30.1%
1 rebalance · 1 sold, 0 bought

If BTC falls 15% over a week, your $1,000 becomes about $699.

Down 20%, then backwithin a week
59,50047,305$1,000$947your $1,000
$1,000 →$947−5.3%
1 rebalance · 1 sold, 0 bought

If BTC falls 20% and comes back within a week, your $1,000 becomes about $947.

  • Enters
  • Rebalance
  • Price

Illustrative price paths over a week. 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. 01Open
    Opens 2× the pool with one order that fills at once.
  2. 02Hold
    The token shows “holding”. NAV moves with the price and funding.
  3. 03Check the band
    Leverage = position ÷ pool value. With 2× and ±20%: below 1.6× or above 2.4× it trades.
  4. 04Or on a schedule
    Every 1, 4 or 24 hours, if set, it trades back whatever the drift.

Settings

SettingRangeDefaultWhat it does
Market
Any listed perp, HIP-3 included
BTC
Which market it holds.
Direction
Long or short
Long
Long gains when it rises; short when it falls.
Leverage
1× up to Hyperliquid's max × (1 − cash share)
2×
How many times the move it follows.
Band
5%–50% of the leverage
20%
Tighter: stays closer to the target, trades more often.
Rebalance
Band only, or every 1, 4, 24 h
Band only
A schedule trades back on time even inside the band.
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.
Leverage
How much of the move the pool follows.
2×
Up 15%: $1,294 · down 15%: $699
3×
Up 15%: $1,443 · down 15%: $582
Band
How far leverage may drift before it trades back, on the swing-and-back path.
±20%
Ends at $947
±5%
Ends at $975

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 Hold 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.

CallKindWhat it does hereWhere 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

Worked example

BTC 2x Long on a $100,000 pool, BTC at $90,000, band 20%, ignoring fees and funding.

BTC falls 15%
Opens
$200,000 · 2.2222 BTC
BTC at $76,500: position / pool
$170,000 / $70,000
Leverage now
2.43×, above 2.4×
Trades back to 2 × $70,000
sells $30,000

If BTC rises 15% instead: $230,000 on a $130,000 pool, 1.77×, inside the band, so nothing trades.

HyperliquidBTCETHHYPESOL