Skip to content

feat(kits): add trade-signal kit — advisory AI buy/sell/hold, attested, execution-free#89

Merged
rajkaria merged 1 commit into
mainfrom
feat/trade-signal-kit
Jul 2, 2026
Merged

feat(kits): add trade-signal kit — advisory AI buy/sell/hold, attested, execution-free#89
rajkaria merged 1 commit into
mainfrom
feat/trade-signal-kit

Conversation

@rajkaria

@rajkaria rajkaria commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What

Adds a new trade-signal kit — an honestly-named port of create-0g-dapp's agent-trading-bot.

Context: 6 of create-0g-dapp's 7 skills already exist as more complete 0gkit kits (agent-memory, sealed-inference, prediction-market, yield-inteldefi-yield-optimizer, inft-studionft-marketplace, live-feedsocial-fi). The only non-redundant one was agent-trading-bot — and its code is actually an AI signal generator + proof anchor (it does not execute trades). This kit ports that, honestly named and consistent with yield-intel's deliberate "no automated execution" stance.

Behavior (advisory-only)

  • analyzeSignal(input, deps){ action: buy|sell|hold, confidence 0..1, rationale } via Compute.router(). Safe hold default on malformed output; never throws.
  • logSignal(signal, deps) → signs a receipt (EIP-191, ✓ signature verified — not TEE-quote) and anchors the record to 0G Storage. attestSignal = sign+verify without storing (MCP).
  • NO order execution, NO transactions. A load-bearing negative test fails if any lib export ever contains execute/trade/swap/send/transfer.

Surface (full 3-tier standard)

  • lib: signal.ts, signalLog.ts + __tests__/signal.test.ts (18 tests)
  • adapters: react-app + chat (analyze/log), tee-attested-api (Hono buildSignalRouter), mcp-agent (trade_signal + signal_verify + mcpToolPlugin)
  • ui: non-removable AdvisoryBanner, SignalPanel, useTradeSignal, /signal page
  • docs page + kits-index (DeFi) entry; changeset (minor @foundryprotocol/0gkit-kits)

Gates (local, CI-equivalent)

  • pnpm kits:check31/31 PASS (all 4 trade-signal × {react-app, chat, tee-attested-api, mcp-agent} green)
  • pnpm boundary:check ✓ · pnpm format:check ✓ · kit vitest 18/18

🤖 Generated with Claude Code

… attested, execution-free

Honestly-named port of create-0g-dapp's agent-trading-bot. Advisory-only:
generates buy/sell/hold + confidence + rationale via Compute.router(), signs a
receipt (EIP-191, not TEE-quote) and anchors it to 0G Storage. NO order
execution — a negative lib test enforces the execution-free public API
(no execute/trade/swap/send/transfer) and analyzeSignal defaults safely to hold.

- lib: signal.ts (analyzeSignal), signalLog.ts (logSignal + attestSignal), 18 vitest
- adapters: react-app, chat (analyze/log), tee-attested-api (Hono), mcp-agent (trade_signal + signal_verify)
- ui: non-removable AdvisoryBanner, SignalPanel, useTradeSignal, /signal page
- docs page + kits-index entry; changeset (minor @foundryprotocol/0gkit-kits)
- gates: kits:check 31/31, boundary ✓, format ✓, vitest 18/18

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
0gkit Ready Ready Preview, Comment Jul 2, 2026 12:27pm
0gkit-docs Ready Ready Preview, Comment Jul 2, 2026 12:27pm
0gkit-playground Ready Ready Preview, Comment Jul 2, 2026 12:27pm

Request Review

@rajkaria rajkaria merged commit 1b357aa into main Jul 2, 2026
8 checks passed
@rajkaria rajkaria deleted the feat/trade-signal-kit branch July 2, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant