16 · Decisions & Changelog
Decisions preserve the approved architecture, expose open operational choices and keep corrections/superseded terminology visible instead of silently rewriting history.
Accepted decisions
t3code remains upstream and substantially unmodified
Build Market Bender as additive packages, adapters, services, contracts and UI surfaces. Pin upstream and ledger every unavoidable deviation.
Consequence: Upgradeability is favored over invasive convenience.
Strategy belongs to the model; authority belongs to deterministic code
The model emits typed intents/tool arguments. Risk, deadlines, signing, exchange submission, reconciliation and settlement remain deterministic.
Consequence: No credential or bypass path may enter model context.
Privy master plus Hyperliquid agent wallet
Privy authenticates the user and controls the master wallet. A fresh registered agent signer executes allowlisted trading actions through the signing service.
Consequence: Sensitive account actions remain master-authorized; identity maps Privy DID to wallet records.
Hyperliquid native and supported HIP-3 markets
Use dynamic, network-scoped discovery and the selected typed SDK behind an exchange adapter.
Consequence: No production asset ID is hardcoded.
Cloudflare additive product layer
Use Pages for this specification; future APIs use Workers, active-match authority uses one Durable Object per match, D1 indexes relational records, R2 stores replay artifacts, and KV caches non-authoritative configuration.
Consequence: Financial/match truth is never delegated to eventually consistent KV.
Self and VS remain distinct product modes
Self has persistent portfolio management and no wager. VS has an authoritative three-minute match, locked deadline, frozen scoring snapshot, flattening, settlement and replay.
Consequence: Shared trading controls do not erase different lifecycle/settlement semantics.
Open decisions
Production wager custody and jurisdiction
Approved functional baseline is additive-layer custody/accounting and deterministic settlement; exact regulated entity, account structure, geography and administrative authority require specialist approval.
Consequence: Real-money production is blocked; testnet/simulated evidence may proceed.
Canonical initial risk limits
The kernel contract is fixed, but numeric leverage/notional/price-band/cadence limits must be approved for testnet and production separately.
Consequence: Implement config validation and conservative test fixtures; do not invent production limits.
Exact t3code tool/auth extension seam
Prefer existing provider/tool/MCP seams; confirm against a pinned upstream commit before implementation.
Consequence: Any upstream patch must be minimal, tested and recorded.
Superseded decisions
Privy JWT subject equals wallet address
Superseded by explicit Privy DID identity plus user-to-wallet mapping.
Consequence: Migration and auth tests must reject the old assumption.
Required for every t3code update
| Field | Required evidence |
|---|---|
| Upstream | Repository, exact commit/tag and verification date |
| Integration seams | Provider adapter, tool/MCP registration, WebSocket/auth and event surfaces used |
| Deviations | Patch/file/reason/owner; “none” is explicit |
| Compatibility tests | Upstream smoke, tool registration, auth mapping, streaming, provider selection and rebase result |
| Migration | Changed contracts/config, rollback and affected prompts/pages |
Specification, implementation and deployment history
2026-07-16
Converted the monolithic blueprint into a 17-page authoritative specification system.
2026-07-16
Corrected Privy identity: access-token subject is a Privy DID, not the wallet address.
2026-07-16
Updated t3code description to its multi-provider adapter architecture while preserving Claude-first as a Market Bender decision.
2026-07-16
Marked live-market commentary as dated research; runtime discovery must come from current Hyperliquid metadata.
2026-07-16
Prepared generated static routes, validation, security headers, redirects and rollback recording for Cloudflare Pages.