# Clapper Pool markets on stocks, ETFs and crypto. People stake USDG on YES or NO before lock. After settle time anyone submits the first Chainlink round, the contract checks it, and the winning side splits the pool minus a 2% fee. One empty side at lock, or no round within 6 hours of settle time, voids the market and refunds every stake in full. **State: running on a local fork of Robinhood Chain mainnet (chain 4663) until launch.** The Chainlink rounds are real mainnet rounds. The stakes are test USDG written to fork accounts. Nothing has been deployed to mainnet. There is no outside audit. $CLAPPER has not launched. | | | |---|---| | Site | https://clappermarkets.com (opens at launch) | | X | [@clappermarkets](https://x.com/clappermarkets) | | Source | https://github.com/clappermarkets/clapper | | $CLAPPER contract | Coming soon | ## Contracts | Contract | Source | Mainnet address | |---|---|---| | ClapperMarkets | `contracts/src/ClapperMarkets.sol` | not deployed yet | | ClapperFeeReserve | `contracts/src/ClapperFeeReserve.sol` | not deployed yet | Solidity 0.8.28, Foundry. No owner, pause, upgrade or withdraw function over stakes. `config/fork.json` holds the addresses of the local fork. They do not exist on mainnet. ## Run it locally Needs Node 22 or newer and Foundry. If `anvil` and `forge` are not on PATH, set `ANVIL` and `FORGE` in `.env`. ``` npm ci git clone --depth 1 --branch v1.9.4 https://github.com/foundry-rs/forge-std contracts/lib/forge-std cd contracts && forge build && cd .. npm run build # web-src to web npm run fork -- --fresh # anvil fork of chain 4663 on 8560, deploys and seeds it. Later: npm run fork npm start # site, API and keeper on 127.0.0.1:5360 ``` Copy `.env.example` to `.env` to turn on the admin panel (`/admin`) and the help assistant. ## CLI and SDK The `clapper` package is in `packages/clapper`. It is not on the npm registry yet. With the site running: ``` npx --yes http://127.0.0.1:5360/download/clapper-0.1.0.tgz markets --open npm install ./packages/clapper ``` Commands and SDK methods are listed in `packages/clapper/README.md`. ## Tests ``` npm run test:forge # contracts npm test # server, CLI and SDK, against the running fork and site npm run outsider # every page and flow in Chrome, with its own throwaway fork npm run secrets # secret scan of the tree and the git history ``` `node scripts/record-tests.mjs` records the results at `/api/v1/tests`. ## Check it - `/verify` recomputes a settlement and every payout from the chain, in your browser. - `/api/v1/proof` lists contracts, deploy transactions, the bytecode match, the feed of every market and the keeper address. - `/api/v1/sources` gives the source and block of every number the pages print. - `/status` shows the keeper, both RPC endpoints, uptime and the last settlement with its Chainlink round. ## Layout - `contracts/` ClapperMarkets and ClapperFeeReserve with their tests. - `server/` API, indexer, keeper, proof, uptime monitor, admin, assistant. - `web-src/` pages, built into `web/`. - `packages/clapper/` CLI and SDK. - `scripts/deploy-mainnet.mjs` mainnet checklist and gas estimate. It sends nothing unless it is started with `--broadcast`, a key and a typed confirmation. License: MIT. Security contact: `/.well-known/security.txt`.