Custody and hedging
The positions that back pTokens are held by contracts on HyperEVM, one per market, never by a person. Each can trade only its own market, close to the mark price, within hourly limits, and can send USDC only to Ported's treasury. The treasury in turn can send it only to those accounts or to the Issuer.
One CoreAccount per market
A CoreAccount is a HyperEVM contract that is also a Hyperliquid account: it holds USDC margin and one long position, places orders through CoreWriter and reads its own state through Hyperliquid's precompiles. Because every market has its own, a loss or a problem in one market cannot reach the margin of another.
- Deployment
CoreAccountFactory.createAccount(perpIndex)deploys an EIP-1167 clone of one implementation at an address derived from the perp index, and initialises it in the same transaction.predictAccount(perpIndex)gives the address in advance;accountOf(perpIndex)after.- Market data
- At creation the account reads from Hyperliquid whether the market exists, its size decimals and whether it is isolated-only. A perp that does not exist cannot get an account.
- Dexs
- The factory accepts only perp dexs the owner has marked as USDC-margined, because the account moves USDC and nothing else. The default dex is allowed from the start.
- Roles
- An owner, an operator that trades and moves USDC within the bounds below, and a guardian that can pause and unwind.
Bounded orders
The operator trades with two functions, both immediate-or-cancel limit orders on the account's own market. The contract checks every order before it reaches Hyperliquid.
| increase(sz, limitPx, cloid) | decrease(sz, limitPx, cloid) | |
|---|---|---|
| Side | Buy | Sell, reduce-only |
| Price | limitPx ≤ mark × (1 + maxSlippageBps) | limitPx ≥ mark × (1 − maxSlippageBps) |
| Hourly limit | Notional bought per hour | Notional sold per hour, operator only |
| Leverage | Position + pending + order ≤ account value × maxLeverageBps | — |
| While paused | Refused | Allowed |
| Who | Operator | Operator, guardian, owner |
- Pending increases. A CoreWriter order reaches Hyperliquid a few seconds after the EVM call, so for a short settle window the account counts recent increases that its reads do not show yet. Up to eight can be settling at once. Without this, a burst of orders could each pass the leverage check against the same stale position.
- Two hourly buckets. Increases and the operator's decreases each drain over an hour. The decrease limit is never lower than the increase limit, so redemptions are not held up, but a leaked operator key cannot dump the whole hedge at once. The guardian and the owner decrease without limit, so a wind-down never waits.
- Valid orders only. Size must be a whole number of lots and price must respect Hyperliquid's tick rules; Hyperliquid would drop anything else silently, so the contract refuses it instead.
- No side door. The account has no API agent during normal operation, so no order can bypass these checks.
USDC routes
USDC can move only along fixed paths. There is no general transfer function: the operator cannot name a destination.
- depositUsdc
- From the account on HyperEVM to its Hyperliquid balance, through Circle's deposit wallet. On the default dex it lands in perp margin directly; on a HIP-3 dex it lands on Hyperliquid spot, because the deposit wallet forwards to the default dex only.
- spotToPerp
- From the account's Hyperliquid spot balance to its market's perp dex. This is the second hop for HIP-3 markets.
- perpToSpot
- Back from the perp dex to spot, refused if the margin left would put the position above the leverage cap.
- spotToEvm
- From Hyperliquid spot back to the account on HyperEVM.
- sweep
- From the account on HyperEVM to the treasury. The treasury is the only destination.
Deposits and spotToPerp stop while the account is paused. Taking margin out still works, within the leverage cap, so a paused market can always be unwound.
Isolated-only markets and the 1x setup
Many HIP-3 markets, most stock markets among them, allow only isolated margin. CoreWriter cannot set leverage, and a new position would open at the market's default, maximum leverage. So an isolated account goes through a one-time setup before its first trade:
- 1A throwaway agentThe owner registers a fresh agent (
beginLeverageSetup), only on an account with no position and at most $1,000 of USDC, and only with an address this account never used before. No USDC can be deposited while the agent exists. - 2Set 1xThe agent signs one action on Hyperliquid's API: isolated margin at 1x on this market.
- 3Revoke
endLeverageSetupreplaces the agent with an unpredictable keyless address Hyperliquid has never seen, which revokes it. If the replacement does not take,retryRevocationtries a new one. - 4ConfirmThe guardian or owner checks off-chain that the agent is gone and the leverage reads 1x isolated, then calls
confirmRevocation. Only now can the account trade.
Two more guards follow. The first order on an isolated account is capped at $100 of notional, bounding the loss if the leverage was not really set. Every later increase requires the live position to read isolated at 1x. If Hyperliquid changes the market's margin mode, increases stop.
The treasury
The Treasury on HyperEVM holds Ported's spare USDC: what accounts sweep back and what returns from Elysium. Its mover can send USDC to exactly two kinds of place.
| Function | Destination | Enforced by |
|---|---|---|
fundAccount(perpIndex, amount) | A market's CoreAccount | The factory's accountOf: only accounts it deployed |
bridgeToElysium(amount, …) | The Issuer on Elysium | The recipient is stored in the treasury, not passed in |
ownerWithdraw(token, to, amount) | Anywhere | Owner only, for migrations and emergencies |
Bridging to Elysium pays a retryable fee in HYPE, capped per transaction, with floors on gas so a ticket cannot be sent that would fail to execute on its own. The guardian can pause the treasury; only the owner unpauses it.
In the other direction, USDC leaving the Issuer on Elysium can go only to this treasury: through the canonical bridge, whose recipient the Issuer fixes, or through a faster route capped per day on-chain. Neither can touch fees or USDC owed to queued redemptions.
Solvency, watched
Ported's operator compares everything Ported holds with everything it owes, continuously.
If assets fall below what is owed, beyond a small margin, minting is paused at once. Redemptions stay open: a shortfall is never a reason to keep holders in.
What is trusted
- Hyperliquid itself: the positions, the mark price and the funding all live there.
- The operator's liveness: if it stops, hedges stop following trades and quotes stop, so minting and redeeming pause. It cannot move funds outside the routes above.
- The owner, which can reconfigure the contracts and move treasury funds. It is meant to sit behind a time delay; during the test phase the team holds these keys.