尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 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.