Roles
| Role | Can | Cannot |
|---|---|---|
| Upgrade authority | Replace the program; the only key that can initialize the pool | Anything else at runtime |
| Pool authority (two-step handover) | Create series and set their parameters, set keeper, fees, cooldown, grace, treasury and buyback accounts, pause new opens and deposits | Move vault funds, change a live market, edit prints, stop exits, settlement, liquidation or withdrawals |
| Keeper | Post the next funding print of a market, once, in order, after its period ended, within the per-period bound | Post twice, skip ahead, post early, post after expiry, touch funds |
| Anyone | Settle matured positions, liquidate under-margined ones, close finished empty markets, sweep fees | Redirect any payout; every payout account is pinned to the owner, the LP, or the stored treasury and buyback |
The keeper is the one trusted feed
A wrong print would move money between traders and LPs for that one period. Four things bound it.
- Each print is capped at 5% of notional per period, above Hyperliquid's own 4% an hour clamp.
- A print lands only for the exact end of the next unprinted period (
PrintOutOfOrder,PrintFromFuture). - Every print emits a
FundingPrintedevent with venue, coin, rate and source timestamp. - The keeper key is separate from the pool authority and can do nothing else.
Re-check any print yourself
# Hyperliquid, the hour ending at source_ts
curl -s https://api.hyperliquid.xyz/info -H 'content-type: application/json' \
-d '{"type":"fundingHistory","coin":"BTC","startTime":<source_ts_ms - 3600000>}'
# Binance, the 8-hour period ending at source_ts
curl -s 'https://fapi.binance.com/fapi/v1/fundingRate?symbol=BTCUSDT&startTime=<source_ts_ms - 60000>&limit=1'
Multiply the venue's decimal rate by 1e12 and compare it with the rate field of the event.
Checks in the program
| Risk | Check |
|---|---|
| Someone claims the pool at deploy | initialize requires the program's upgrade authority |
| Two markets for one series | Market PDA seeds are venue, coin and maturity |
| Trading on a rate that is already public | Opens, early closes and liquidations require the current period to be running (MarketStale) |
| Account substitution | Every PDA checked by seeds and bump, positions carry has_one = owner, market, token accounts checked for mint and owner |
| Hidden markets in LP pricing | Deposits and withdrawals take every active market, sorted by address (InvalidMarketSet) |
| A run on the pool mid-move | Withdrawal cooldown, and withdrawals that would leave exposure above the caps are refused |
| A third party pushing a position under | Liquidation triggers on the anchor, so moving the book cannot force it |
| Arithmetic | Checked math everywhere, exact integer accrual, rounding against the trader |
Known limitations
- During a running period, Hyperliquid's predicted funding is public, so a trade late in the hour carries a good guess of that period's print. The edge is one period of rate deviation on the trade's notional.
- LPs are short a foresight option by design. A replay against an adversary with perfect 7-day foresight all year takes 29.6% of the pool, and LPs earn spread and skew from everyone else.
- If prints stop, trading on that market stops, and anyone can settle after maturity plus the grace window at what printed. Missing periods accrue nothing on either leg.