ETH-PERP Long 10x
Size$25,000
Entry3,412.50
LeverageGuardReferralSplit
afterOpen → pay my referrer 10 bps// ReferralSplit.sol
OPEN FEE$8.75
HOOK TAX$12.50
REFERRAL-$2.50

NET$18.75
maxLeverage25x 10xvol 30d 4.1%
HYPE
beforeLiquidation

Program every perp position.

HyperHooks lets anyone attach a Solidity contract to a position on Elysium. Your code runs when a position opens, changes, gets liquidated or closes.

Built on Elysium settling to Hyperliquid

Four moments in a position. Two hooks each.

Scroll to follow one example ETH long through its life, and watch which hooks fire.

ETH-PERP

Long, opening
Example position
Notional$25,000
Leverage25x10x
Mark price3,412.50
Unrealized PnL$0.00
Margin health 2.40
beforeOpenLeverageGuardCaps leverage by 30-day volatility
afterOpenReferralSplitPays the referrer 10 bps
hook callselysium
  1. openPosition(ETH-PERP, long, $25,000, 25x)#4,812,310beforeOpenLeverageGuardvol 4.1% → cap 10x, leverage set 25x → 10x
  2. #4,812,310afterOpenReferralSplit10 bps ($2.50) → 0x8f3c…a21e

If it happens to a position, you can hook it.

A few of the things builders can ship as hooks on day one. Each one is a single contract.

Position taxes

Charge a fee on opens or size increases and route it to a treasury, a buyback or stakers.

Size increase$15,000
Hook tax 0.05%$7.50

To treasury$7.50

Referral rewards

Split fees with whoever brought the trader in, paid in the same block the position opens.

TR10 bpsRF

Dynamic leverage

Tighten max leverage when a market gets volatile, and loosen it when things calm down.

Max leverage10x

Trading games

Streaks, seasons and leaderboards scored from real closes, so the game can't be faked offchain.

1. 0x41a…9be14 win streak2,840 pts
2. 0xc07…1129 win streak2,115 pts
3. 0x8f3…a214 win streak1,960 pts

Automated hedging

Open a matching hedge on HyperCore spot whenever a position grows past a threshold.

Perp long11.7 ETH
Spot short4.0 ETH
Net delta66%
Testnet chain ID 99801// gas is paid in HYPE
HYPE

Hooks are plain Solidity.

If you've written a Uniswap v4 hook, you already know the shape. Same idea, applied to perp positions.

Dear builder,

Implement the callbacks you care about, register your contract against a market, and the engine calls it at each step of a position's life. Return values let a before-hook change the trade or stop it. After-hooks see the result and can act on it.

LeverageGuard.sol

      

The HyperHooks team

Fast logic on Elysium. Liquidity on HyperCore.

Hooks run on Elysium's fast blocks and read positions and order books from Hyperliquid's engine.

Elysium

Where your hook contract lives and runs. An EVM layer 2 built by Kinetiq for Hyperliquid.

LeverageGuard.beforeOpen()
ReferralSplit.afterOpen()
HedgeBot.afterModify()
StackArbitrum Orbit, Nitro
GasHYPE
Settles toHyperEVM

HyperCore

Hyperliquid's trading engine, with the perp and spot order books your positions trade against.

MarketsPerps and spot
Builder perpsHIP-3
FillsReported back onchain

HyperCore reads and order routing from Elysium are rolling out with Elysium mainnet.

afterClose: +120 pts
beforeModify: tax 0.05%
ship it before mainnet
liquidation saved

Hook into every trade on Elysium.

Get the interface, a starter repo and testnet access. Early hook builders get listed in the launch directory.