A stablecoin-native prediction market and financial dashboard for Arc Testnet. The monorepo contains:
contracts: factory-deployed, escrowed pari-mutuel marketsbackend: Express API, on-chain reads, metadata and webhook endpointsfrontend: Vite/React app with Wagmi, Viem and Circle App Kit
Requires Node.js 22+.
npm install
cp contracts/.env.example contracts/.env # if deploying
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
npm run buildDeploy the factory:
npm run deploy:arc --workspace contractsCopy the deployed address to PREDICTION_MARKET_ADDRESS and
VITE_PREDICTION_MARKET_ADDRESS, then run:
npm run devFrontend: http://localhost:5173 · API: http://localhost:4000
Open /admin and connect the wallet that deployed the factory. The admin panel
creates markets directly through MarketFactory, saves protected off-chain
metadata, and resolves expired markets through their resolver wallet.
To seed the three starter markets, configure contracts/.env, then run:
npm run seed:arc --workspace contractsWithout a deployer key and factory address, the seed command prints a dry-run payload and does not submit transactions.
Stakes use the USDC ERC-20 at 0x3600…0000; the client reads decimals() before
parsing amounts. Arc's native gas currency is also USDC but has 18 native
decimals—these are separate representations. Market resolution is restricted
to each market's creator. The backend admin resolution route intentionally
does not sign until an oracle policy and production secret management are
configured.