Templates

Carry. Funding, with no price exposure.

Collects funding with no price exposure. When a perp's funding pays enough, it buys the coin and shorts the perp at the same size; it exits when funding falls.

What it does

On Hyperliquid, when funding is positive, shorts are paid by longs every hour. A Carry token holds the coin on HyperCore's spot market and shorts the same amount on the perp: a price move cancels out, and the short collects the funding. It only takes the positive-funding side.

One period, and the call behind each step
Elysium · the token's contract
HyperCore · its own account
  1. 1Read funding
    Averages funding over the last hours
    coreTimeMsfundingRatespotPxmarkPxspotBalancepositionaccountValue
    Funding, spot and perp prices, balances
    coreTimeMsfundingRatespotPxmarkPxspotBalancepositionaccountValue
  2. 2Enter both sides
    Funding at or above the entry level
    usdClassTransferlimitOrder · IOC
    Buys the spot, shorts the perp, same size
    usdClassTransferlimitOrder · IOC
  3. 3Collect
    no transaction
    The short is paid funding every hour
  4. 4Exit
    Funding under the exit level
    limitOrder · IOCusdClassTransfer
    Sells the spot, closes the short
    limitOrder · IOCusdClassTransfer
Then it waits for funding to pay enough again.

What happens next

The white line is funding, as a yearly rate averaged over the last 72 hours: what the rule reads. The first three charts move the price 20% up, sideways and down: the result doesn't change. Only funding does.

What happens to $1,000
HYPE: 80% of the pool, enters at 10% funding a year, exits under 3%, funding averaged over 72 h
Price up 20%funding 15% a year
15%3%in 10%out 3%$1,000$1,009your $1,000
$1,000 →$1,009+0.9%
in for 100% of the month · funding earned 0.98% · the price move cancels out

If HYPE rises 20% over a month while funding pays 15% a year, your $1,000 becomes about $1,009.

Price sidewaysfunding 15% a year
15%3%in 10%out 3%$1,000$1,009your $1,000
$1,000 →$1,009+0.9%
in for 100% of the month · funding earned 0.98% · the price move cancels out

If HYPE goes sideways for a month while funding pays 15% a year, your $1,000 becomes about $1,009.

Price down 20%funding 15% a year
15%3%in 10%out 3%$1,000$1,009your $1,000
$1,000 →$1,009+0.9%
in for 100% of the month · funding earned 0.98% · the price move cancels out

If HYPE falls 20% over a month while funding pays 15% a year, your $1,000 becomes about $1,009.

Funding fades15% → −5% a year
15%-5%in 10%out 3%$1,000$1,002your $1,000
$1,000 →$1,002+0.2%
in for 57% of the month · funding earned 0.47% · the price move cancels out

If HYPE goes sideways while funding fades from 15% to −5% a year, your $1,000 becomes about $1,002.

  • Enters
  • Exits
  • Funding, a yearly rate

Illustrative price paths over a month. 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. 01Wait
    Checks funding every hour. Below the entry level the token shows “waiting”.
  2. 02Enter
    At or above the entry level, it buys the spot and shorts the perp at the same size.
  3. 03Hold
    The token shows “holding” and collects funding every hour.
  4. 04Exit
    Below the exit level, it closes both sides and waits again.

Settings

SettingRangeDefaultWhat it does
Market
A listed perp with a HyperCore spot pair
HYPE
Only coins that trade on HyperCore's spot market too.
Size
10%–90% of the pool
80%
More: more funding, less margin left for the short.
Entry level
1%–100% a year
10%
Higher: waits for richer funding, in less often.
Exit level
Any, up to the entry level
3%
Higher: leaves sooner when funding fades.
Averaged over
1–720 hours
72 h
Longer: steadier decisions, fewer round trips.
Entry and exit levels
When it goes in and out, on the “funding fades” month.
10% / 3%
Ends at $1,002
20% / 10%
15% never reaches 20%: $1,000
Size
How much of the pool is in the trade, at 15% a year for a month.
80%
Ends at $1,009
50%
Ends at $1,005

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 Carry 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
fundingRate(asset)
read
A perp's hourly funding. A Carry averages it before it enters or exits.
No precompile yet: a keeper reports it, stamped with its time
spotPx(pair)
read
A spot pair's price, so a Carry can size its spot side.
L1Read 0x…0808
markPx(asset)
read
Hyperliquid's mark price: what the stop, the bands, the levels and the strikes are checked against.
L1Read 0x…0806
spotBalance(vault, token)
read
A spot balance on HyperCore: USDC, the coin a Carry holds, or the tickets an Options round holds.
L1Read 0x…0801
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
usdClassTransfer(amount, toPerp)
money
Moves USDC between the account's perp and spot balances.
CoreWriter action 7
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
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
HyperliquidBTCETHHYPESOL