07 · Authority and risk
Authority and cumulative-loss accounting for ETH momentum missions
Do not collapse these concepts. Seven definitions bound T3 Trades risk, and one deterministic budget converts realized losses, open risk, and pending entries into a hard mission-loss ceiling the harness cannot enlarge or exceed.
§16 · The 7 concepts that must not collapse
Distinct quantities the harness, T3, and Hyperliquid each own part of
| Concept | Definition | Owner |
|---|---|---|
Allocated capital | User-authorized capital pool the mission may draw from. | User |
Deployed margin | Collateral supporting the current position. | Hyperliquid |
Gross notional | Absolute market exposure. | Hyperliquid |
Planned risk | Estimated mission loss if an entry fills and the stop later executes. | Authority |
Paid trading costs | All fees already charged to the mission, including fees on still-open positions. | Hyperliquid |
Realized mission result | Closed PnL plus net funding minus all paid trading fees. | T3 server |
Reserved open risk | Estimated remaining loss represented by open positions and pending entries. | Authority |
Allocated capital, deployed margin, gross notional, planned risk, and realized mission result are not interchangeable. A position can have large gross notional, small deployed margin, and zero planned risk all at once.
§16.1 · Default cumulative-loss model
A hard mission-loss budget measured from mission start
For the POC, maximumCumulativeLossUsd is a hard mission-loss budget measured from mission start. Positive PnL does not enlarge this budget. For a $1,000 mandate:
Use the current Hyperliquid userFees response when available. The 5-bps fallback applies only when the user-specific rate cannot be read or is stale.
§16.2 · Accounting equations
How realized losses, open risk, and pending entries consume the budget
realizedMissionResultUsd
= closedPnlUsd
+ netFundingUsd
- allPaidTradingFeesUsd
realizedLossUsedUsd
= max(0, -realizedMissionResultUsd)
openPositionRiskUsd
= max(0, estimatedLossFromWeightedEntryToStopUsd)
+ estimatedUnpaidExitFeeUsd
+ stopSlippageReserveUsd
pendingEntryRiskUsd
= plannedLossAtStopUsd
+ estimatedEntryFeeUsd
+ estimatedExitFeeUsd
+ stopSlippageReserveUsd
lossBudgetUsedUsd
= realizedLossUsedUsd
+ sum(openPositionRiskUsd)
+ sum(pendingEntryRiskUsd)
remainingCumulativeLossUsd
= max(0, maximumCumulativeLossUsd - lossBudgetUsedUsd)
realizedMissionResultUsd; they must not also be reserved as unpaid open-position fees. A queued-but-unfilled entry reserves both estimated entry and exit fees; a filled position reserves only the fees that have not yet been paid.
realizedLossUsedUsd back toward zero, but they never increase maximumCumulativeLossUsd above the user-authorized amount.
§16.3 · Position-increase validation
The full checklist before any position-increasing action is signed
- Mission is active.
- Entries are allowed.
- Strategy version is current.
- Authority version is current.
- Harness run owns the lease.
- Direction is permitted.
- Market is ETH.
- Execution wallet is approved.
- Account and BBO are fresh.
- Size and price are valid.
- Exchange minimum is met.
- Leverage is within user and exchange limits.
- Gross notional remains within authority.
- Planned loss remains within the per-position ceiling.
- Existing reservations plus proposed risk remain within the cumulative-loss budget.
- No conflicting execution is pending.
- A valid stop is defined.
§16.4 · Loss-budget exhaustion
When remainingCumulativeLossUsd reaches zero or below
When remainingCumulativeLossUsd reaches zero or becomes negative after reconciliation:
- Cancel all mission-owned position-increasing orders.
- Block new entries, scale-ins, reversals, and re-entry.
- Preserve valid reduce-only protection.
- Permit only protection improvement, cancellation of increasing orders, reduction, close, and revocation.
- Set the mission to
blockedwith reasoncumulative_loss_limit. - Notify the user and expose the remaining position and protection state.
Related: see Hyperliquid protection invariant for the exchange-native reduce-only stop path, and Tools for the typed execution surface the harness validates against.