T3 Trade — Fork Review Report
1. Headline
No critical, high, or medium findings. The review found seven minor issues (P3), one recommendation, and a few context notes. The fork adds an autonomous Hyperliquid trading system on top of the t3code agent platform; the trading logic matches the strategy documents on all eight checkable claims, and secrets handling is clean — the trading private key never touches the repository.
2. What was reviewed
The review covers only what the fork adds on top of upstream, at commit
117ce350: 743 files changed, 2,752 commits ahead of upstream
(and 253 behind — worth noting for future upstream merges).
| Area | Size | What it is |
|---|---|---|
apps/server/src/trading |
133 files, ~60,700 lines added | The trading runtime: mission state machine, order handling, watch evaluation, exchange reconciliation, wake payloads, execution, telemetry, and an offline market-data archive. |
packages/trading-contracts |
64 files, ~22,500 lines | New package: shared schemas for markets, watches, execution, and policy. |
packages/hyperliquid |
44 files, ~15,000 lines | New package: Hyperliquid SDK — API gateway, signing, WebSocket client, order mapping. |
apps/web |
62 files, ~18,000 lines | Trading cockpit UI (live mission panel, price chart, presentation helpers). |
apps/marketing |
53 files | Rebrand of the marketing site (t3code → t3trade). |
apps/server/src/persistence |
56 files | Trading database migrations 035–073 (inclusive), with adjacent tests where applicable. |
scripts, .github, tooling |
29 scripts + CI changes | Offline replay harness, live soak/monitor tooling, release workflow. |
Four review packages covered this work: the fork delta map (WP1), platform and secrets (WP2), UI (WP3), and trading logic (WP4), each independently verified before inclusion here.
3. Findings — 7 minor issues (P3)
Every finding below was reproduced independently at commit 117ce350 before
inclusion.
3.1 Metrics trust the data archive blindly P3
Owner: Trading logic review (WP4)
If the market-data archiver goes down mid-session (or starts mid-day) without logging a gap, calculations like session VWAP and the 24h change figure silently compute over whatever bars exist — a 3-bar "session VWAP" would be served at full confidence. The module's own rule is "absence is an answer, never a number," but the guard only rejects holes the archiver itself recorded.
Reference: apps/server/src/trading/archive/derived.ts lines 17–21 (header
contract), 231–250 (refuseOnGap), 540–588 (vwap_distance);
digest in TradingMarketArchive.ts.
3.2 Unnamed market data is assumed to be ETH P3
Owner: Trading logic review (WP4)
A data delivery that does not name which coin it is for gets evaluated as ETH. This is documented and safe today (all current subscriptions name their coin), but if a coin-less subscription is ever added, Bitcoin bars would silently evaluate ETH watches.
Reference: apps/server/src/trading/WatchEvaluator.ts lines 60, 1160
(DEFAULT_MARKET="ETH").
3.3 Derived watches can run one bar behind P3
Owner: Trading logic review (WP4)
The archiver lags the live WebSocket feed by up to about 60 seconds, so a watch computed from closed bars may exclude the most recently closed bar. This is documented and accepted behavior — named here so it is on record, not treated as a defect.
Reference: apps/server/src/trading/WatchEvaluator.ts lines 1092–1098
(evaluateDerivedDelivery); plan 38 §3.5 comment.
3.4 Price freshness rests on the gateway, not a local check P3
Owner: Trading logic review (WP4)
When deciding whether a price reading is fresh enough to act on, the evaluator relies on the data gateway's freshness windows and a 2-second sweep rather than checking a timestamp itself. A correctness question worth one look someday, not urgent at alpha.
Reference: apps/server/src/trading/WatchEvaluator.ts lines 381, 459–477.
3.5 Compiled Python bytecode is committed P3
Owner: Platform review (WP2)
A .pyc file is tracked in git alongside its source; it will silently drift
out of sync the next time the source is edited. Fix is a one-liner:
git rm --cached plus a __pycache__/ ignore rule.
Reference:
scripts/wake-payload-replay/__pycache__/attribute.cpython-314.pyc (10,967
bytes, tracked — confirmed via git ls-files).
3.6 Chart drag-strips announce the wrong interaction model P3
Owner: UI review (WP3)
The grab-strips for dragging a stop or target level on the price chart are marked with
role="slider" but cannot be focused with a keyboard and have no
minimum/maximum values or arrow-key handling — the only way to adjust a level is pointer
drag. Either drop the role and expose the drag another way, or implement the keyboard
behavior the role promises.
Reference: MissionPriceChart.tsx lines 1176–1180 (role="slider",
tabIndex={-1}, no aria-valuemin/max, pointer handlers only).
3.7 A code comment understates when the chart is live P3
Owner: UI review (WP3)
A library comment says the chart is only enabled while a position is open ("a flat mission puts nothing on the wire"), but the panel intentionally enables it during planning too ("Planning draws candles too"). The panel behavior is correct and intentional; the comment is stale and should be corrected. No code change needed.
Reference: lib/tradingMarketChartState.ts lines 113–114 vs
MissionLivePanel.tsx lines 460, 466, 479–481.
4. Recommendations & context notes
Items that are not findings, recorded so readers have the full picture.
4.1 Generated reports are committed to git Recommendation
Owner: Platform review (WP2)
artifacts/reports holds 26 generated HTML analysis files (+27,206 lines, ~1.3
MB) in version control. Harmless at alpha scale, but it adds merge noise to every upstream
sync. Consider moving to artifact storage or a docs folder with a retention rule.
4.2 Mac app is ad-hoc signed, not notarized Context
Owner: Platform review (WP2)
Intentional alpha state: the desktop builds are ad-hoc signed and the install script removes macOS's quarantine flag so they open. Notarization is pending a paid Developer ID. Well documented in the scripts themselves; not a code bug.
4.3 Nightly releases are disabled on the fork Context
Owner: Platform review (WP2)
The release workflow disables nightlies because signing and publishing secrets are absent. Intentional — noted so nobody chases a "broken" nightly later.
4.4 Marketing legal pages were deleted Context
Owner: UI review (WP3)
Privacy-policy, terms-of-service, security-policy, and legal pages were removed with no replacement or redirect, so those URLs return 404. Confirmed as intentional pre-release state by the owner — recorded as context, not a finding. Reinstate before any public release.
5. What checked clean
-
Secrets handling: the Hyperliquid signer key loads only from an
environment variable or a file under
~/.t3trade/secrets/; with no key configured, every signable action is refused. A grep across all fork-added files found nothing committed. CI workflows reference secrets only through the proper mechanism. - Trading logic vs strategy docs: all eight checkable claims in the strategy documents were confirmed in code, including the retirement of the ema_cross strategy (disabled in the active policy, filtered from the playbook, not accepted by the mode layer, EMA parameters preserved).
- Database migrations: fork migrations run 035–073 inclusive, sequential, with adjacent tests where applicable; the archive process shuts down cleanly and restarts safely.
- UI discipline: presentation logic split into tested modules, decorative icons hidden from screen readers, reduced-motion variants, and a build-time regression guard.
- Fork etiquette: consistent T3 Trade rebrand with visible upstream credit ("Built on T3 Code" footer).
6. Limitations
- Not all 29 new scripts were reviewed line-by-line; the Python replay harness was skimmed with no network or secret handling found. The live soak/monitor scripts are developer tooling, not on any deploy path.
- CI workflow changes were reviewed at diff-summary level, not line-by-line.
-
Two large trading modules (
HyperliquidReconciler,TradingMissionReactor) were not fully line-reviewed. - The fork is 253 commits behind upstream; merge planning is out of scope for this review.
-
The repository's working tree has moved past the reviewed commit; all findings were
verified specifically at
117ce350.
7. How this was verified
Each review package was delivered with file-and-line evidence, then independently re-checked
at commit 117ce350 by a separate verifier before being recorded as verified.
Two corrections from verification are incorporated here: the migration range is 035–073
inclusive (not two bands), and the committed generated reports count is 26 files. All
severities were then re-weighted against the alpha/testnet context before this report was
assembled.