Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
A fully-collateralized perpetual prediction market on corporate credit default
probability, built on Base. Each market asks one question — "Will [Entity] have a credit
event in the next 12 months?" — starting with:
"Will MicroStrategy have a credit event in the next 12 months?"
(Multi-market — MicroStrategy, CoreWeave, Turkey — is being built; see
docs/multi-market-design.md.)README 전문 보기 ↗A fully-collateralized perpetual prediction market on corporate credit default probability, built on Base. Each market asks one question — "Will [Entity] have a credit event in the next 12 months?" — starting with:
"Will MicroStrategy have a credit event in the next 12 months?"
(Multi-market — MicroStrategy, CoreWeave, Turkey — is being built; see
docs/multi-market-design.md.)
Users deposit USDC and mint YES/NO ERC-20 "complete sets" 1:1, trade them on a
Polymarket-style off-chain CLOB with atomic on-chain settlement, and the market price of
YES is the crowd's implied annual default probability. Positions are economically
equivalent to a zero-recovery perpetual CDS, presented as a prediction market. (The
product UI calls YES/NO "Upbet"/"Downbet" — see CLAUDE.md for the full naming
convention. This README uses the internal YES/NO names, which is also what the code,
ABIs, and API fields use.)
N USDC mints N YES + N NO; redeeming an equal
YES+NO pair returns N USDC (pre-settlement). YES.totalSupply() == NO.totalSupply()
always.cumulativeFundingPerYES /
cumFundingPerNO) and a persistent per-user fundingDebt ledger so debts are never
silently forgiven.m ≤ 1.03 × f_next, evaluated one
epoch ahead — cost-basis-independent) flags underfunded YES positions. Claiming is
formulaic (no Dutch auction): the YES token transfers to the liquidator (never
burned), NO is always made whole (InsuranceFund tops up the rare tail case).The full funding/liquidation model (display-layer math, freeze semantics, worked
examples, and the 10 hard invariants) is specified canonically in the root
CLAUDE.md — this README only summarizes it.
84532) as of 2026-07-06 — all 7 contracts
deployed and verified. See contracts/deployments/base-sepolia.json
for the current address record and docs/deploy-testnet.md
for the full deploy/hosting runbook (contracts, Railway backend, Vercel frontend). ┌─────────────────────────┐
wallet (user) ───▶│ Frontend (Next.js 14) │
│ /market /portfolio │
│ /liquidate /admin │
└───────────┬─────────────┘
│ REST (poll) EIP-712 signed orders
┌───────────────┼──────────────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌──────────────────┐ (direct tx: mint/redeem/
│ order-book-server│ │ matching-engine │ cure/claim/settleYES)
│ REST, Redis │◀│ price-time match │
│ pre-filters │ │ submits matched │
│ frozen/short- │ │ pairs on-chain │
│ fall orders │ └────────┬─────────┘
└──────────────────┘ │ fillOrders(...)
▼
┌──────────────────────────────────────────────────────────────┐
│ On-chain (Base / Base Sepolia) │
│ │
│ CreditMarket.sol ── mint/redeem/settleYES, funding ledger, │
│ seizure trigger (isSeizable), freeze/cure│
│ YESToken / NOToken.sol ── ERC-20, CLOB_ROLE-restricted xfers │
│ CLOBSettlement.sol ── verifies EIP-712 orders, atomic swap │
│ + funding settlement │
│ OracleRouter.sol ── credit-event attestation → settlement │
│ LiquidationEngine.sol ── formulaic claim(); YES transfers, │
│ never burned │
│ InsuranceFund.sol ── USDC reserve, tail-case top-up │
└──────────────────────────────────────────────────────────────┘
▲ ▲
│ accrueFunding / flagClaimable │ GET /claimable
┌─────────────────┐ ┌──────────────────────┐
│ funding-keeper │ │ liquidation-keeper │
│ (KEEPER_ROLE) │ │ (read-only, permission│
│ cron every epoch │ │ -less claim by anyone)│
└─────────────────┘ └──────────────────────┘
oracle-monitor is a placeholder service for an eventual ISDA Determinations Committee
scraper; credit events are attested manually via a multisig in the MVP.
contracts/ Foundry project (Solidity 0.8.24, OpenZeppelin v5). Contracts in src/,
tests in test/, deploy scripts in script/, deployed addresses in
deployments/. See contracts/CLAUDE.md.
backend/
order-book-server/ Fastify REST API + Redis order book, on-chain pre-filter (viem)
matching-engine/ price-time-priority matcher, submits settlement on-chain
keepers/ funding-keeper (accrual + flagging cron) and
liquidation-keeper (read-only /claimable API)
See backend/CLAUDE.md.
frontend/ Next.js 14 App Router, wagmi v2 + viem + RainbowKit, Tailwind,
TradingView Lightweight Charts. See frontend/CLAUDE.md.
scripts/demo/ One-command local demo stack (anvil fork, seeded order book, scripted
"beats" for trade/cure/claim/credit-event) — see docs/demo-runbook.md.
docs/ Deploy runbook, production/mainnet plan.
Each of contracts/, backend/, frontend/ has its own CLAUDE.md with
directory-specific stack notes; the root CLAUDE.md is the canonical product/economics
spec (funding model, invariants, UX naming conventions).
forge, cast, anvil) — not npm-installed;
see the Foundry installation guide.order-book-server; a system install or redis-server --port <port> for a
scratch instance)There is no root package.json / workspace tool — each of contracts/,
backend/order-book-server/, backend/matching-engine/, backend/keepers/, and
frontend/ is installed and run independently.
# Contracts
cd contracts
git submodule update --init --recursive # openzeppelin-contracts, forge-std
forge build
# Each backend service (repeat for order-book-server, matching-engine, keepers)
cd backend/order-book-server && npm install
cd backend/matching-engine && npm install
cd backend/keepers && npm install
# Frontend
cd frontend && npm install
cd contracts && forge test -vvv # 87 tests
cd backend/order-book-server && npm test
cd backend/matching-engine && npm test
cd backend/keepers && npm test # covers both funding- and liquidation-keeper
cd frontend && npm run type-check # no Vitest suite here; CI runs tsc --noEmit
CI (.github/workflows/ci.yml) runs forge test, all three backend npm test jobs, and
the frontend type-check on every push/PR to main.
See Run MVP locally.txt for the exact commands: anvil --fork-url $BASE_SEPOLIA_RPC_URL, forge script script/DeployLocal.s.sol, then
order-book-server, matching-engine, keepers, and frontend each in their own
terminal via npm run dev. .env.example files under contracts/ and each backend/*
service document the required variables; frontend/.env.local.example covers the
frontend's NEXT_PUBLIC_* vars.
scripts/demo/ spins up an isolated anvil chain (non-default ports, e.g. :8547),
deploys fresh contracts, seeds a realistic order book, price history, a resting position,
a distressed (near-liquidation) position, and an already-flagged position, then starts
all backend services and the frontend on http://localhost:3010:
cd scripts/demo
./demo-up.sh # ~1-2 minutes; prints all addresses + demo wallet keys
./warp.sh 3 # advance chain time N days, accrue funding, auto-flag if triggered
./demo-down.sh # tear down, restore tracked files touched by the demo
Full walkthrough (what to click, in what order) is in
docs/demo-runbook.md.
Base Sepolia is live — see docs/deploy-testnet.md for the
complete runbook (contract deploy + role wiring, Railway backend services, Vercel
frontend, smoke checklist) and
contracts/deployments/base-sepolia.json
for the current contract addresses. Do not hand-edit that file outside of a deploy
script run.
docs/production-plan.md for what remains).docs/production-plan.md): a Safe-based role ceremony off the raw deployer EOA, a Foundry stateful
invariant suite + Slither + external audit, mainnet plumbing, and a full credit-event
dress rehearsal on Sepolia.YES + NO = $1 across the two books), so it must never be gated at the contract
level. The UI keeps buy-first as the default path and frames mint-and-sell as the
carry-seller entry ("deposit USDC → sell the Upbet side → earn daily carry"). The
long-term resolution is Polymarket-style complementary matching in the engine: a YES
buy at p crossing a NO buy at 1−p mints a fresh set from their combined $1 (and
the reverse cross merges/redeems), so every user is implicitly a minter without ever
seeing the mechanic.CLAUDE.md.Gnosis CTF/ERC-1155 (custom ERC-20 YES/NO instead), permissionless market listing, an
LP vault, MarketFactory, an ISDA oracle relayer (multisig only), a USDC bond module for credit
event disputes, a subgraph, fee distribution, referrals, governance, insurance fund
withdrawals, a market-listing UI, mobile optimization, and direct wallet-to-wallet
YES/NO transfers. Full list in the root CLAUDE.md.