Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
DreamDEX 이벤트 계약용 설명 가능한 트레이딩 에이전트, 실시간 BTC/ETH 시장, 온체인 실행
An explainable trading agent for DreamDEX Event Contracts on Somnia testnet — live BTC/ETH markets, a deterministic decision engine, and on-chain execution.
금융TypeScript · CSSGitHub @shane2512온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A deterministic, non-custodial trading agent for DreamDEX Event Contracts on Somnia Shannon testnet.
SEER evaluates live BTC/ETH DreamDEX Event Contracts, produces a structured directional signal with a stated confidence and rationale, checks that trade against hard risk limits, and hands it to the visitor's own connected wallet to sign. It never holds a key, and it never makes a call it can't explain.README 전문 보기 ↗A deterministic, non-custodial trading agent for DreamDEX Event Contracts on Somnia Shannon testnet.
SEER evaluates live BTC/ETH DreamDEX Event Contracts, produces a structured directional signal with a stated confidence and rationale, checks that trade against hard risk limits, and hands it to the visitor's own connected wallet to sign. It never holds a key, and it never makes a call it can't explain.
Track: Deterministic / Statistical Model. There is no LLM, no agentic multi-step reasoning loop, and no black-box inference anywhere in the trade path — the signal comes from a closed-form momentum/moneyness model, so the same market state always produces the same call.
Live app: seer-omega.vercel.app Demo video: youtu.be/gcHBpvcPFvI
DreamDEX Event Contracts turn a market view into a single binary question — will BTC/ETH be up or down when this contract expires — on windows as short as a minute. That cadence only works if two things hold: the venue can confirm a trade before the window closes, and the trader can trust why a bot took a side, since there's no time to second-guess it mid-round.
Automated trading tools usually fail one of those. A signal from an opaque model can't be checked before you act on it, and a bot that needs custody of your funds to trade fast enough puts your capital at risk of a bug or a compromised operator. SEER is built to fail neither:
@somnia-chain/markets-sdk (DreamDEX Bot Kit), not a mocked price feed.UI Layer (app/, components/, hooks/)
-> connects a wallet, displays the market, the signal, and trade status
-> never holds a key, never calls DreamDEX directly
Application Layer (app/api/evaluate, app/api/trade/validate)
-> runs the decision model
-> checks a proposed trade against hard risk limits
-> returns ok/reject; never signs or submits anything
DreamDEX + Somnia Web3 Engine (lib/dreamdex/, lib/bot/)
-> lib/dreamdex/client.ts + markets.ts + event-contracts.ts: market
discovery and normalization via the official SDK
-> lib/bot/permissions.ts: the guardrail checks themselves
-> lib/dreamdex/browserClient.ts + hooks/useTrade.ts: the browser's own
SDK instance, signed and submitted through the connected wallet
The server never holds a trading private key. POST /api/trade/validate is guardrail-only — it has no signer and submits nothing. On an ok: true response, the browser signs the returned market snapshot itself, through its own wallet client, and submits it directly.
Signal (lib/seer/evaluator.ts). A closed-form directional estimate ported from DreamDEX Bot Kit's own reference strategy (ec-oracle-follow), math unchanged: a rolling spot-price momentum window feeds a moneyness calculation against the contract's strike/reference price, passed through a normal-CDF-shaped estimator to produce P(up). When a market's reference price fails a plausibility check against live spot (guards against a misread strike swinging the estimate to a false-confident extreme), the model falls back to momentum-only. No training, no external inference call, no non-determinism — the same (spot, momentum, strike, time-to-expiry) tuple always produces the same P(up).
Guardrails (lib/bot/permissions.ts). Before a trade is allowed to reach a wallet for signing, validateTrade checks, in order: the market matches the request, the market is actually in Trading status, it isn't within a fixed 30-second floor of expiry, the side is valid, the size is positive and within MAX_ORDER_SIZE, and the requested price doesn't deviate from the book's own reference mid by more than MAX_PRICE_DEVIATION. Any failure returns a specific rejection reason; nothing partially passes.
TypeScript, Next.js (App Router), React, TailwindCSS, @somnia-chain/markets-sdk (DreamDEX Bot Kit), wagmi + viem (wallet connect and client-side signing), Zod (request validation), Vitest (unit tests).
SEER does not deploy or own any smart contract. Every market is a DreamDEX Event Contract, already live on Somnia Shannon testnet (Chain ID 50312), discovered at runtime through the official SDK rather than a hardcoded address — DreamDEX's venues rotate over time, so a value baked into this README would go stale. To find the venue and markets currently live:
npm run ec:doctor
This lists the active binary markets and the venueId backing them right now. Every confirmed trade's block-explorer link is resolved dynamically from the SDK's own chain metadata (lib/blockchain/explorer.ts) rather than a hardcoded explorer origin, so it always points at the correct Somnia Shannon explorer for the transaction shown.
Install dependencies
npm install
Configure environment
Copy .env.example to .env.local:
cp .env.example .env.local
| Variable | Required | Notes |
|---|---|---|
NEXT_PUBLIC_SOMNIA_CHAIN_ID | yes | Somnia Shannon testnet chain id (50312) |
NEXT_PUBLIC_SOMNIA_RPC_URL | yes | Somnia testnet HTTP RPC endpoint |
NEXT_PUBLIC_SOMNIA_WS_RPC_URL | yes | Somnia testnet WebSocket RPC endpoint |
NEXT_PUBLIC_DREAMDEX_INDEXER_URL | yes | DreamDEX GraphQL indexer endpoint |
MAX_ORDER_SIZE / NEXT_PUBLIC_MAX_ORDER_SIZE | yes | Guardrail: max order size (lib/bot/permissions.ts) |
MAX_PRICE_DEVIATION | yes | Guardrail: max allowed deviation from book mid |
No private key belongs in this file — every trade is signed by whichever wallet the visitor connects in the browser.
Verify RPC connectivity
npm run doctor
Discover the active DreamDEX venue
npm run ec:doctor
Copy the venueId this prints if you're scoping discovery to one venue — don't reuse a stale value from a previous session.
Run the app
npm run dev
Open http://localhost:3000/dashboard, connect a wallet on Somnia Shannon, and trade a live signal.
Verify before a demo or submission
npm run lint
npx tsc --noEmit
npm run build
npm test
npm run build # production build
npm run start # run the production build
npm test # unit test suite (vitest)
Built by shane2512 for the Somnia x DreamDEX Event Contracts hackathon.
MAX_ORDER_SIZE from a flat cap toward a proper position-sizing rule that accounts for the model's own stated confidence.See PRD.md for the full product spec, CLAUDE.md for the project's non-negotiable rules, and docs/superpowers/specs/ for technical design notes.