Every trade must prove itself.
Kyvrane is a pre-execution firewall for AI-assisted crypto trading. It verifies SoSoValue market evidence, prices the proposal against SoDEX order-book depth, applies deterministic policy, and returns a hash-sealed APPROVE, REVIEW, or BLOCK receipt before capital moves.
Live Demo · Scenarios · Provider Status · Docs · Repository
AI can explain evidence. It does not authorize capital. Kyvrane's verdict is owned by deterministic TypeScript.
AI trading agents can make trades look profitable without checking the execution path that decides whether the trade survives in the real market.
A proposal can show a 2.40% expected return, but the top of the book may only hold 0.40 ETH. A larger order walks deeper into the book, raises the average fill price, adds slippage and fees, and can turn a positive-looking trade into a negative one before it is placed.
For solo traders and builders using AI-assisted trading agents, the missing control is not another strategy generator. The missing control is a proof step that says: this trade has fresh evidence, enough liquidity, acceptable slippage, and a policy verdict before funds move.
Kyvrane sits before execution. It receives a proposed trade, gathers sponsor-backed evidence, computes the real executable edge, and returns an auditable receipt.
The MVP is deliberately narrow:
- It evaluates trade proposals.
- It issues
APPROVE,REVIEW, orBLOCK. - It records sources, calculations, policy version, verdict, time, and a SHA-256 receipt hash.
- It does not connect a wallet, place orders, custody funds, or give financial advice.
Fastest judge path: open /scenarios, run all three proposals, then open /status to see whether providers are live or demo.
| Route | What to verify |
|---|---|
/ |
Trade authorization workspace and product framing |
/scenarios |
Reproducible APPROVE, REVIEW, and BLOCK verdicts |
/status |
Provider mode transparency for SoSoValue and SoDEX |
/docs |
Pipeline, verdicts, provenance, receipts, and API notes |
Screenshots are pending. The live deployment is the current product proof.
- A user or agent submits a trade proposal.
- Kyvrane requests market evidence from the SoSoValue adapter.
- Kyvrane requests order-book execution conditions from the SoDEX adapter.
- The engine calculates net executable edge:
expectedReturn - slippage - fees - marketImpact. - Deterministic policy checks edge, slippage, evidence age, contradiction count, and notional exposure.
- The engine returns
APPROVE,REVIEW, orBLOCKwith reason codes. - A Trade Proof Receipt records inputs, source modes, calculations, policy version, verdict, and issue time.
- The receipt is sealed with a canonical SHA-256 hash and can be replayed.
- Deterministic authorization - no LLM decides whether capital can move.
- Sponsor-backed evidence path - SoSoValue evidence freshness and contradiction counts affect the verdict.
- Execution-aware pricing - SoDEX order-book depth is walked with
estimateFill, so a 1 ETH order and a 5 ETH order can produce different verdicts. - Hash-sealed receipts - every decision gets a tamper-evident proof receipt.
- Replay API - captured assessments can be re-evaluated without hiding their original source metadata.
- Provider transparency -
/statuspublishes whether each adapter is using live sponsor data or seeded demo data. - No custody by design - Kyvrane cannot move funds, connect a wallet, or place orders.
| Alternative | What it does | Kyvrane difference |
|---|---|---|
| Trading bot | Generates or executes trades | Kyvrane is a pre-execution control, not a strategy engine. |
| LLM risk summary | Explains a proposed trade | Kyvrane lets AI explain, but deterministic code owns the verdict. |
| Static checklist | Asks a user to review manually | Kyvrane computes slippage, evidence freshness, contradiction count, and policy outcomes. |
| Demo-only sponsor integration | Shows sponsor logos or sample cards | Kyvrane routes sponsor data through the decision engine, and labels demo mode honestly. |
flowchart LR
U[User or AI agent] --> API[POST /api/trades/analyze]
API --> SSV[SoSoValue adapter]
API --> SOD[SoDEX adapter]
SSV --> E[Deterministic policy engine]
SOD --> E
E --> R[Trade Proof Receipt]
R --> H[SHA-256 contentHash]
R --> UI[Workspace, scenarios, receipts]
API --> Status[GET /api/health]
Trust boundaries:
- Provider adapters own HTTP and authentication.
- API routes orchestrate requests and validation.
- The decision engine is pure TypeScript with no network or AI calls.
- UI components never call sponsor APIs directly.
- Sponsor keys are server-side only.
- Supplies timestamped market evidence.
- Kyvrane derives evidence freshness and contradiction count from that evidence.
- Stale evidence can trigger
REVIEW; evidence outside the policy window can triggerBLOCK. - Environment variables:
SOSOVALUE_API_KEY,SOSOVALUE_API_BASE_URL.
- Supplies order-book depth for execution checks.
- Kyvrane walks the book with
estimateFillto compute average fill price and slippage for the requested size. - Slippage above policy can trigger
BLOCK; larger notional can triggerREVIEW. - Environment variable:
SODEX_API_BASE_URL.
Sponsor credentials are not provisioned in this repo, so both adapters currently run seeded demo data through the same code path. The UI and API label those values as DEMO, and /status publishes the mode of each provider.
Demo mode still exercises the real engine, policy math, receipt hashing, and routes. What changes is the origin of the inputs, not the verdict path.
| Proof item | Value |
|---|---|
| Live app | https://kyvrane.vercel.app |
| Scenarios | https://kyvrane.vercel.app/scenarios |
| Provider status | https://kyvrane.vercel.app/status |
| Repository | https://github.com/mystiquemide/kyvrane |
| Sponsor credential status | Pending - adapters currently run labelled demo data |
| Demo video | Pending |
- Frontend: Next.js 16 App Router, React 19, TypeScript, Tailwind CSS 4
- Testing: Vitest, ESLint, TypeScript typecheck
- Decision engine: Pure TypeScript policy engine
- Proof: SHA-256 content hash over canonical receipts
- Deployment: Vercel
- State: Browser-local receipt history for the MVP
git clone https://github.com/mystiquemide/kyvrane.git
cd kyvrane
npm install
npm run setup:hooks
cp .env.example .env.local
npm run devKyvrane runs without credentials in labelled demo mode.
To connect live providers, set:
SOSOVALUE_API_KEY=your_sosovalue_key
SOSOVALUE_API_BASE_URL=https://example.sosovalue.api
SODEX_API_BASE_URL=https://example.sodex.apiThen open /status to confirm the provider modes.
npm run verifynpm run verify runs:
npm run lint
npm run typecheck
npm test
npm run buildThe suite covers deterministic verdicts, provider adapters, receipt hashing, replay behavior, and API-route behavior for the reproducible APPROVE, REVIEW, and BLOCK scenarios.
- Sponsor data must be integral to the verdict, not decorative.
- A narrow working firewall is stronger than a broad trading-agent demo.
- The UI must never blur live provider data and fallback demo data.
- Receipt hashes prove tamper evidence for a specific issued receipt, not profit or market truth.
- The clean product boundary is important: Kyvrane evaluates and proves; it does not execute.
- Record the submission walkthrough from
docs/DEMO_SCRIPT.md. - Add final demo video link to this README.
- Keep
/scenariosand/statusstable for judges.
- Provision live SoSoValue and SoDEX credentials.
- Add signed testnet execution handoff while keeping custody out of scope.
- Export receipts for external audit trails.
- Multi-venue execution checks.
- Policy templates for different trader risk profiles.
- Agent integration SDK for pre-trade authorization.
Kyvrane is unaudited hackathon software. It does not custody assets, connect wallets, place trades, or provide financial advice. It is a pre-execution risk and proof layer for trade proposals.
MIT. See LICENSE.