Status: accepted
Date: 2026-03-26
Add a minimal execution-context layer beside ExecutionIntent so QuantLab can model Hyperliquid-style venue semantics without overloading the core strategy-facing intent object.
The Stage D.0 boundary now includes ExecutionContext in code.
It currently models:
execution_account_idsigner_idsigner_typerouting_targettransport_preferenceexpires_afternonce_hint
The current allowed shape is intentionally small:
signer_typedirectapi_walletagent_wallet
routing_targetaccountsubaccountvault
transport_preferencerestwebsocketeither
ExecutionIntent is still the right place for venue-agnostic trading intent:
- symbol
- side
- quantity
- notional
- strategy identity
But a venue like Hyperliquid adds other concerns that are not purely strategy intent:
- signer identity may differ from the traded account
- API wallets or agent wallets may sign on behalf of another address
- routing may target a subaccount or vault rather than the signer directly
- websocket-first transport preferences may matter
- expiry windows such as
expiresAftermay be execution metadata rather than strategy metadata - signer-scoped nonce hints may need to live beside routing metadata rather than inside strategy intent
Those pressures should not be hidden inside one venue adapter as undocumented local fields.
This layer is intentionally minimal.
It does not yet:
- add Hyperliquid runtime integration
- change Kraken behavior
- introduce websocket execution logic
- implement nonce management
- enforce routing or signer validation rules
The current boundary should now be read as:
ExecutionIntentcarries strategy-facing order intentExecutionContextcarries execution-venue-specific signer and routing context- local policy still decides whether the action is acceptable
- adapters may then translate both intent and context into venue-specific transport or payload behavior
Kraken can ignore ExecutionContext for now.
That is expected and desirable. The point of this slice is not to make Kraken more complex, but to stop the shared contract from being too CEX-shaped before Hyperliquid runtime work starts.
The next Hyperliquid-related runtime slice should build on this layer by deciding:
- which parts of
ExecutionContextremain adapter-agnostic - which parts need venue-local validation
- where signer-scoped nonce handling should live