Hold
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.
- 1ReadReads its position and the markcoreTimeMspositionaccountValuemarkPxPosition, account value, markcoreTimeMspositionaccountValuemarkPx
- 2Open at L×Sends leverage × the poollimitOrder · IOCFills at marketlimitOrder · IOC
- 3Check the bandLeverage now = position ÷ value; inside the band, nothing to doon the chain
- 4Trade back to L×Out of the band, or on schedulelimitOrder · IOCSells after a loss, buys after a gainlimitOrder · IOC
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.
If BTC rises 15% over a week, your $1,000 becomes about $1,294.
If BTC goes sideways for a week, your $1,000 becomes about $995.
If BTC falls 15% over a week, your $1,000 becomes about $699.
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
- 01OpenOpens 2× the pool with one order that fills at once.
- 02HoldThe token shows “holding”. NAV moves with the price and funding.
- 03Check the bandLeverage = position ÷ pool value. With 2× and ±20%: below 1.6× or above 2.4× it trades.
- 04Or on a scheduleEvery 1, 4 or 24 hours, if set, it trades back whatever the drift.
Settings
| Setting | Range | Default | What 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. |
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.
| 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)Worked example
BTC 2x Long on a $100,000 pool, BTC at $90,000, band 20%, ignoring fees and funding.
- 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.