Mantua is an agent-driven prediction market for sports. Bettors and market makers open positions, provide liquidity, and execute automated hedging strategies through natural language. It combines a custom suite of Mantua hooks, autonomous AI agents running Circle Developer-Controlled Wallets, and real-time on-chain execution to turn user intent into automated market actions a programmable liquidity layer for sports outcomes, live in-game markets, and USDC-settled event contracts.
From a single natural-language prompt you can:
- Take a position on a scheduled game, priced continuously by the pool rather than by a bookmaker.
- Provide liquidity to market pools and to the base pairs, and manage those positions.
- Analyze & research matchups, pool health, peg status, and token prices (free data, with optional pay-per-call x402 premium sources).
- Swap USDC, EURC, and cirBTC across the hook pools.
- Run an autonomous agent a Circle-managed wallet that researches, takes positions, manages liquidity, and hedges under a spending cap.
- Bridge & manage treasury move USDC cross-chain (Circle CCTP) and hold a unified, multi-chain USDC balance (Circle Gateway).
Status: live at mantua.ai on Base Sepolia and Arc Testnet. The full pipeline runs in production on both chains — each day's games are ingested, their markets minted on-chain, their pools opened at the provider's implied odds and seeded with liquidity, all automatically. Positions trade from the league pages; markets freeze at kickoff and settle from live game data through the on-chain Resolver.
docs/tasks/sports-pivot.mdtracks the build plan (phases B0–B10 complete; a handful of P2/P3 refinements remain).
Mantua runs on two testnets, switchable from the chain selector in the header and under the chat input (Base Sepolia is the default):
| Network | Chain id | Gas token | What runs there |
|---|---|---|---|
| Base Sepolia | 84532 |
ETH | Full stack: sports markets (Dynamic Market hook + factory/resolver), Stable Protection (USDC/EURC), swaps, liquidity, agent wallet |
| Arc Testnet | 5042002 |
USDC (native) | Full stack: sports markets, Stable Protection + Dynamic Fee hooks, swaps, liquidity, agent wallet |
Every surface follows the selected chain: the wallet switches with the selector, swaps and
liquidity route to that chain's Uniswap v4 stack, and the Circle agent holds one wallet per
chain (shared daily spending cap). Sports markets mint and settle independently on each
chain. Per-chain contract addresses live in
server/src/lib/v4-contracts.ts and
server/src/lib/markets-contracts.ts; the Base hook
deployments are attested in
docs/security/hook-deployments.md.
Prediction markets are static. Odds and liquidity sit passively while the world moves, so market makers get picked off the moment news breaks and bettors trade against stale depth. Mantua makes the market itself programmable: fees adapt to order-flow imbalance, access is enforced at execution, and trading halts under conditions the market defines in advance. Bettors, market makers, and liquidity providers set all of it from natural-language instructions, executed on-chain through agent-managed Mantua hooks.
Prediction markets today are passive. Mantua makes them state-aware, fee-adaptive, oracle-enforced, and agent-managed by embedding these behaviors directly into AMM execution logic through Mantua hooks. By letting AI agents coordinate liquidity in response to real-time market conditions, Mantua transforms prediction-market liquidity from static capital into an automated financial control system for compliant access, market making, and event settlement.
One scheduled game produces one market. Each market mints a YES/NO ERC-20 pair fully collateralised 1:1 by USDC, and the YES token trades against USDC in a Uniswap v4 pool carrying the Dynamic Market Hook. A YES pays 1 USDC if the outcome happens and 0 if it does not, so its price is the market's implied probability a YES at 0.62 is a 62% chance.
create → seed → trade → freeze → resolve → redeem
└────→ void (postponed / cancelled)
- split 1 USDC in → 1 YES + 1 NO out. merge reverses it. Both are fee-free, and together they are the arbitrage floor that keeps the pool price inside [0, 1].
- freeze at scheduled kickoff, enforced by the hook so it holds even if the interface is bypassed.
- resolve from live game data, with provider disagreement flagged for review and a manual override so a bad feed cannot auto-settle a market.
- redeem the winning token 1:1 for USDC. A voided game returns collateral instead.
Collateral held is always at least the outstanding redeemable supply. That invariant is fuzzed
over half a million calls in contracts/test/markets/MarketInvariant.t.sol.
Full specification: docs/specs/market-lifecycle.md.
NFL and WNBA are the covered leagues. NBA, MLB, NHL, and Soccer appear in the nav and
report as coming soon; promoting one is a single field in
client/src/features/markets/sports.ts.
Autonomous agents turn intent into action: they buy the intelligence they need, then deploy capital with it.
- The agent hits a question it can't answer → searches Circle's x402 marketplace.
- Pays per call in USDC capped, audited, no API keys, no accounts.
- Combines paid intelligence with live sports and on-chain signals game state, pool health, peg status, whale flows.
- Executes through Mantua hooks + a Circle Developer-Controlled Wallet take a position, swap, provide liquidity, bridge via CCTP.
- Manages the position hedging strategies fire on price and game-state ticks under a policy cap, and auto-disarm when a market freezes.
Programmable money buying programmable intelligence, then acting on it in one autonomous loop.
Programmable Sports Agents
- Universal command bar. One input routes every command by intent a card only starts a mode, it never locks it. Hookless actions and agent commands go to the Circle Agent; naming a hook (Stable Protection / Dynamic Fee) opens the manual Uniswap-v4 panel; research questions open Analyze.
- Sports markets. Full-screen per-league pages (Polymarket-style): date-grouped games with moneyline prices in cents fed by the live pool price, and a trade sidebar — pick a side, set an amount, get a live quote, sign with your wallet. Browsing and matchup details are open to everyone; anonymous visitors also get three free analyst questions a day (enforced server-side), after which chat and every transaction require login.
- Automated hedging strategies. Describe one in plain language ("take profit at 80% on the Chiefs"), confirm the structured preview, and it arms: evaluated on price and game-state ticks, sized under its own USDC cap, auto-disarmed at kickoff freeze. Kill switches at every level; every transition audited.
- State-aware Mantua hooks. Custom hooks embed pricing, fee logic, and circuit breakers directly into pool execution. Stable Protection is FX-aware: its circuit breaker anchors to the live EUR/USD rate (Pyth) instead of assuming 1:1, so USDC/EURC trades at the true ~1.14 rate (see Hooks).
- Swap · Liquidity Pools. Manual v4 swaps with live quotes and hook selection; create pools and add/remove liquidity (market-priced initialization); pool detail pages with real pair exchange-rate charts.
- Cross-chain USDC bridging. Outbound from Arc to all 12 CCTP-V2 testnets Base, Ethereum, Arbitrum, Unichain, Avalanche Fuji, OP, Polygon Amoy, Linea, Sonic, World Chain, Sei, HyperEVM via Circle CCTP (Bridge Kit).
- Unified balance / treasury. A single multi-chain USDC balance via Circle Gateway (Unified Balance Kit) view, deposit, and spend: settle USDC out of the unified balance to any Gateway testnet (burn on Arc, mint on the destination), with Arc as the settlement hub.
- Analyze & research. Inline conversational research: deterministic cited data cards for known topics + AI-streamed answers for free-form questions.
- Portfolio & earnings. User + agent portfolios, LP positions, and fee earnings with an estimated LP/hook split grouped by hook.
An autonomous financial analyst trader and liquidity provider running a tool-using Claude loop over server-custodied Circle wallets — one per chain, acting on whichever network is selected (sponsored gas on Arc, ETH gas on Base Sepolia; one daily USD spending cap shared across both):
- Wallet auto-provisioned; view/manage, set the daily cap, and fund it (Circle's programmatic testnet faucet, with manual faucet fallback).
- Trade & move swap (signal-guarded: peg deviation + price impact), send, and bridge USDC to any CCTP chain (funds land at your wallet on the destination).
- Treasury (Circle Gateway) manages its own unified USDC balance: consolidate on Arc, read the cross-chain breakdown, and settle USDC out to any Gateway testnet on demand (spends to third parties count against the daily cap).
- FX best execution (StableFX) for USDC↔EURC the agent compares Circle's StableFX RFQ rate, the live on-chain pool rate, and the Pyth interbank EUR/USD reference, then recommends the better venue (executing on-chain when the pool wins), citing the spread vs interbank.
- Liquidity create no-hook pools at the live market price, add/remove liquidity, list positions.
- On-chain analysis (Arcscan). Inspect any Arc address (balance, activity, whale signals: accumulating/selling, stables↔tokens rotation), any token (holders, top-10 concentration, safety red flags), and any transaction (decoded token movements).
- Analyst workflow. "Give me my daily briefing" → market pulse → peg check → portfolio review → on-chain highlights, figures first. Never blindly copies a wallet verifies hypotheses against live data.
- Analyst advisor. If the agent can't afford a trade (balance or cap), it reads your wallet and if you hold enough delivers its analysis with a concrete "execute this yourself" recommendation.
- Autonomous de-peg rebalancing. Opt-in: auto-exits a stablecoin that drifts off peg into the on-peg reference signal-gated, capped, audited on a daily cron.
- x402 agent marketplace. Access to Circle's full paid-services catalog (agents.circle.com/services) web search, news, weather, sports, prediction markets, social lookups, papers, SMS/communication APIs paid per-call in USDC (pre-capped, daily-capped, audited); the agent searches the marketplace before declining a request. HTTP-native x402 v2 buyer works in prod, no CLI (setup).
- Custom hooks Mantua hooks, each deployed at a mined CREATE2 address. All three are live on Arc: the Dynamic Market Hook (prediction markets), Stable Protection, and Dynamic Fee. Source repos linked under Architecture.
- v4 periphery, per hook PoolManager, PositionManager, StateView, V4Quoter, and PoolSwapTest. The app routes each pool's create / liquidity / swap / read to its hook's own stack (no-hook pools fall back to the Stable Protection stack).
- Permit2 (
0x000000000022D473030F116dDEE9F6B43aC78BA3) for gas-efficient LP approvals. - Quotes via V4Quoter; all addresses live in
server/src/lib/v4-contracts.ts.
- Developer-Controlled Wallets (
@circle-fin/developer-controlled-wallets) server-managed agent wallets (smart-contract accounts) that sign and execute on Arc with sponsored gas; the user's signing key is never touched by the agent path. - CCTP via Bridge Kit (
@circle-fin/bridge-kit) native cross-chain USDC burn-and-mint to all 12 CCTP-V2 testnets, used both by the app (user wallet) and server-side by the agent's Circle wallet (Circle-Wallets adapter + Forwarding Service). - Gateway via Unified Balance Kit (
@circle-fin/unified-balance-kit+@circle-fin/adapter-circle-wallets+@circle-fin/adapter-viem-v2) unified multi-chain USDC balance: deposits (agent SCA) and spends to any Gateway testnet, signed by a Gateway delegate EOA on the SCA's behalf (SCAs can't sign burn intents directly). - StableFX (
POST /v1/exchange/stablefx/quotes) Circle's institutional stablecoin FX engine on Arc; the agent pulls RFQ reference quotes for USDC↔EURC and compares them against on-chain liquidity for best execution. - x402 agent marketplace (
@x402/fetch+@x402/extensionsBazaar discovery) the full paid-services catalog at agents.circle.com/services, paid per-call in USDC via EIP-3009 authorizations from the agent's buyer EOA (Mantua is also a seller:GET /api/x402/analyst-brief, $0.01). - USDC + EURC stablecoins, funded for testing via the Circle Faucet.
- Arc Testnet (chain id
5042002) Circle's stablecoin-native L1 where USDC is the gas token. RPChttps://rpc.testnet.arc.network; explorer ArcScan. - Arcscan (Blockscout) API powers the agent's on-chain analysis tools (address activity, token holders, transaction decoding).
- Every hook stack, token registry, and agent wallet exists on Arc and on Base Sepolia (addresses below).
- Hermes price feeds primary price source behind
getUsdPriceand the peg signals (USDC/USD, EURC/USD, BTC/USD, EUR/USD FX), with DefiLlama as automatic fallback. The EURC peg is measured FX-neutrally (EURC/USD ÷ EUR/USD). - Peg keeper a daily cron pushes the live EUR/USD reference on-chain to the FX-aware
Stable Protection hook (
setPegReference), anchoring its circuit breaker to the real rate.
- Client Vite + React + TypeScript SPA; Privy auth (embedded + external wallets), viem, lightweight-charts.
- Server Express + TypeScript API; Anthropic Claude (
claude-opus-4-8) agent loop, Drizzle ORM + Postgres (Neon). Deployed on Vercel (serverless) with daily crons — sports-sync (ingest + on-chain market/pool creation), resolution (settlement), strategies (hedging ticks), agent rebalance, and Pyth peg-sync. Game-day cadence comes from pointing any external scheduler at the same cron URLs.
| Network | Chain ID | RPC | Explorer |
|---|---|---|---|
| Base Sepolia | 84532 |
https://sepolia.base.org |
https://sepolia.basescan.org |
| Arc Testnet | 5042002 |
https://rpc.testnet.arc.network |
https://testnet.arcscan.app |
Arc is Circle's stablecoin-native L1, where USDC is the gas token; Base Sepolia uses ETH for gas, and the Circle agent wallet's operations are gas-sponsored there.
Arc Testnet:
| Token | Address | Decimals | Notes |
|---|---|---|---|
| USDC | 0x3600000000000000000000000000000000000000 |
6 | Native gas token (ERC-20) |
| EURC | 0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a |
6 | Circle EURC |
| cirBTC | 0xf0C4a4CE82A5746AbAAd9425360Ab04fbBA432BF |
8 | BTC-pegged demo asset |
| Permit2 | 0x000000000022D473030F116dDEE9F6B43aC78BA3 |
Canonical (all chains) |
Base Sepolia:
| Token | Address | Decimals | Notes |
|---|---|---|---|
| USDC | 0x036CbD53842c5426634e7929541eC2318f3dCF7e |
6 | Circle USDC, market collateral |
| EURC | 0x808456652fdb597867f38412077A9182bf77359F |
6 | Circle EURC |
| Permit2 | 0x000000000022D473030F116dDEE9F6B43aC78BA3 |
Canonical (all chains) |
Mantua ships three hooks. Because Uniswap v4 allows one hook per pool key, each is a distinct contract deployed at a mined CREATE2 address, and each lives on its own v4 stack (PoolManager
- PositionManager + StateView + V4Quoter + PoolSwapTest). The app routes every pool's create / liquidity / swap / read to the stack of that pool's hook.
| Hook | Surface | Purpose | Live on | Source |
|---|---|---|---|---|
| Dynamic Market Hook | Prediction market | Adapts pricing, fees, liquidity, and risk parameters in real time from game state and flow | Base Sepolia | Arc | contracts/src/hooks/dynamic-market/ |
| Stable Protection | Trading | Monitors peg deviation across five zones, scaling LP fees to severity and halting past 5% | Base Sepolia | Arc | stableprotection-hook |
| Dynamic Fee | Trading | Nezlobin directional fees across five deviation zones, charging the toxic side of the trade | Base Sepolia | Arc | dynamic-fee |
The Dynamic Market Hook's eight Solidity modules live in this repo under
contracts/src/hooks/dynamic-market/, alongside the
market primitives in contracts/src/markets/ and the Foundry deploy
scripts in contracts/script/. Stable Protection and Dynamic Fee each
have their own repository and are wired in here as git submodules under
contracts/hooks/, so GitHub shows them as pointers rather than inline files — clone them
with the repo:
git clone --recurse-submodules https://github.com/DelleonMcglone/Mantua-Intelligence.gitThe Dynamic Market Hook shipped against the authoritative spec in
docs/specs/dynamic-market-hook.md: a 0.30%–5% adaptive fee band (five weighted premiums + a directional adjustment), per-risk trade caps, timestamp-driven kickoff freeze that fires even with no keeper write, and fail-closed behaviour on stale keeper state. Security review: 0 HIGH / 0 MEDIUM open (docs/security/sign-off.md, owner-signed).
Two further hooks RWA Gate (permissioned pools via a ComplianceRegistry) and Async Limit Order are built and were previously deployed on testnet, but are deferred to mainnet, where RWA-grade tokens better match their use cases.
Every hook and every market stack is deployed on both testnets. Addresses below are the
live ones; the canonical machine-readable source is
server/src/lib/v4-contracts.ts and
server/src/lib/markets-contracts.ts.
Verifiable on ArcScan. Each hook has its own full v4 stack.
| Contract | Address |
|---|---|
| DynamicMarketHook | 0xbb5D42DC40128fa681882cA49f9A74d50D15E8c0 |
| PoolManager | 0xee196B3F83Fe6f57E074C399DBdeFe07e1407636 |
| MarketStateRegistry | 0xEA8c2f329E7eBD9a67FA7E502CEcc938bE3ec7a6 |
| MarketFactory | 0x0cd79B383c3f10F786bF9B942F791283dFB4d6e6 |
| Resolver | 0x76578c4EA626bEe114e5B72939e7927eF5f1CAbF |
| PositionManager | 0xd288EE632fb58101211C7c87b3FCF44328C6866d |
| StateView | 0x17a69A23F3c0F7F0dCA6391f967C020BaC0906da |
| V4Quoter | 0x448E16702C19fF0b0AF7b51D675Cc40f1b2D5281 |
| PoolSwapTest | 0x1791972C76a8Bcb9da83E50B9435612590a0102f |
| PoolModifyLiquidityTest | 0x6A8Ce701aB14a2909F22a18063426fEE016A36da |
Each game's Market contract and YES/NO tokens are minted by the factory at ingest time —
deterministic ids, one market per side per game. The Resolver is the fixed settlement
authority every market burns in as an immutable; the keys behind it rotate without
redeploying a single market. Deployment record:
deploy/dynamic-market/README.md.
| Contract | Address |
|---|---|
| Hook | 0xd1Deea248850BFc239Cb282b793b076357Cb20c0 |
| PoolManager | 0x15B5f2c054b9DC788250131FCD1bcfCC34080a59 |
| PositionManager | 0x47AD8c1C78F9b07c81d833d924BbE36388A4ab78 |
| StateView | 0x73Bb8E68c08C528770880c10223670f7aee13824 |
| V4Quoter | 0xd57545f0a2C3A721Fc3F1F4f3007b2aA021f4567 |
| PoolSwapTest | 0xeA44982cB8b71A9BF69bfe3F3f5b43E1790be4d1 |
| Contract | Address |
|---|---|
| Hook | 0xA1Be807481F532c074380FCcF05be5e2A3ec80C0 |
| PoolManager | 0x7eA87A5919C119DC95855A0BE227fd3241c998F0 |
| PositionManager | 0xDa1bfA53fA93463fB9Abd349bad381667D29b88d |
| StateView | 0x6F4eD6D86e8d770Dc7Ef027011d7cd6c12Db40c9 |
| V4Quoter | 0x2CF521F13658FE57958D09B40Ee3420D974EE7eC |
| PoolSwapTest | 0xAa096011E6604df33762d611cbBdaA0671F19Bdb |
| Contract | Address |
|---|---|
| AgenticCommerce (ERC-8183 proxy) | 0x0747EEf0706327138c69792bF28Cd525089e4583 |
Verifiable on BaseScan. Stable Protection and Dynamic Fee were
deployed against the canonical Uniswap v4 PoolManager
0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408, so they share one periphery stack; the Dynamic
Market Hook runs on its own PoolManager, as on Arc.
| Contract | Address |
|---|---|
| DynamicMarketHook | 0xff94F6319d3A67682147c997D1323D0f0B1768c0 |
| PoolManager | 0x53AA23D6B81562E75505EA25e015650a2BB8fDCa |
| MarketStateRegistry | 0x1c03020a160ad4558414235c90F305F010Baf086 |
| MarketFactory | 0x9aB104e89F8de7bc240a134Dc6adBCe7124D3d84 |
| Resolver | 0x0FEAf3BA53E9F163c8060F4d437bcC77F86E4270 |
| PositionManager | 0x275dc77b579b56eb493732f177b1109141ad9a67 |
| StateView | 0xc352dc25d3ab4748cce6600efb3d5edf42613a45 |
| V4Quoter | 0xbb91b69d888afb30eebd373023480d2007d37cd6 |
| PoolSwapTest | 0x4357c1d769fc94278ae85b36e22dd494cca078b4 |
| PoolModifyLiquidityTest | 0x37fbd7e25de3259340e0879ec15f19c56abcc55b |
| PositionDescriptor | 0x5f30b3ff7b65e3c06a02a2e120c9a2478ea26be9 |
Operator, keeper, and settlement signer: 0x9215594bdA3fE6c029155566B9c9DA75dFC1024D.
Market collateral is Circle USDC 0x036CbD53842c5426634e7929541eC2318f3dCF7e. Deployment
record: deploy/dynamic-market/README.md.
| Contract | Address |
|---|---|
| Hook | 0xe5e6a9E09Ad1e536788f0c142AD5bc69e8B020C0 |
| PoolManager | 0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408 |
| PositionManager | 0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80 |
| StateView | 0x571291b572ed32ce6751a2cb2486ebee8defb9b4 |
| V4Quoter | 0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba |
| PoolSwapTest | 0x8b5bcc363dde2614281ad875bad385e0a785d3b9 |
| Contract | Address |
|---|---|
| Hook | 0x9788B8495ebcEC1C1D1436681B0F56C6fc0140c0 |
| PoolManager | 0x05E73354cFDd6745C338b50BcFDfA3Aa6fA03408 |
| PositionManager | 0x4b2c77d209d3405f41a037ec6c77f7f5b8e2ca80 |
| StateView | 0x571291b572ed32ce6751a2cb2486ebee8defb9b4 |
| V4Quoter | 0x4a6513c898fe1b2d0e78d3b0e0a4a151589b1cba |
| PoolSwapTest | 0xF778eF19F4A0065430C55a7cD09d287368947C29 |
| PoolModifyLiquidityTest | 0x9f12E9d064398e07153Ca7E1401C71343edB772B |
Its Base pools trade mock tokens from the hook repo's own deploy (tWETH
0x839Cc782708f1768F0F7591eA0c7D08290ba2a3c, tUSDC 0x8b6de320b93c2f8dEE5C9392A001E03CE6cc8Fe6),
so the app lists no user-facing Dynamic Fee pairs on Base yet — Arc is where that hook's real
pairs live.
| Contract | Address |
|---|---|
| AgenticCommerce (ERC-8183 proxy) | 0x49da1bdd06fafbadaf941a35d732800c89b2b7bb |
| AgenticCommerce implementation | 0x4c49d46812ae1aafd06e1a9ebcaff7183ec1f9c9 |
Deployment record:
deploy/agentic-commerce-base/README.md.
All three hooks' permission bits and PoolManager wiring are re-verified on both chains by
npm run verify:hooks, attested in
docs/security/hook-deployments.md.
client/ Vite + React + TypeScript SPA (port 5173) landing, docs, legal, market pages,
swap/LP/agent panels
server/ Express + TypeScript API (port 3001) calldata builders, quotes, agent, portfolio,
market id + probability utils, Drizzle schema
contracts/ Foundry contracts: market primitives (MarketFactory, Market, OutcomeToken,
Resolver, pool bootstrap), the Dynamic Market Hook (8 modules), full-lifecycle
E2E tests, and the deploy scripts (contracts/script/). The Stable Protection and
Dynamic Fee hooks are submodules under contracts/hooks/
deploy/ Foundry deploy scripts + per-chain deployment records for the hook v4 periphery,
pool setup, and the agent-commerce escrow
docs/ Architecture, specs, decision memos, task lists, legal drafts
- Per-hook routing.
getV4StackForHook(poolKey.hooks)resolves the PoolManager + periphery for a pool from its hook address, so each pool's operations target its own stack. No-hook pools fall back to the Stable Protection ("hero") stack. - Wallets. Users connect via Privy (embedded + external). Agents use Circle Developer-Controlled Wallets (server-managed smart-contract accounts on Arc) the user's signing key is never touched by the agent path.
- Hook source repos. stableprotection-hook · dynamic-fee · RWAgate · limit-orders (the last two are mainnet-deferred)
| Document | What it covers |
|---|---|
docs/architecture.md |
Living architecture notes and the decision log |
docs/tasks/sports-pivot.md |
The build plan phases, priorities, and what is done |
docs/decisions/sports-pivot-decisions.md |
Each decision, its reasoning, and what it rules out |
docs/specs/market-lifecycle.md |
Market states, transitions, failure modes |
docs/specs/market-id.md |
Deterministic market ids |
docs/specs/dynamic-market-hook.md |
The authoritative hook spec (§1–§46) + implementation record |
docs/security/sign-off.md |
Ship-gate security sign-off — findings, rails, E2E proofs |
docs/ops/incident-runbook.md |
Kill switches, mis-resolution, provider failover, comms |
docs/tasks/sports-pivot-scope-reconciliation.md |
What survives the pivot, what is superseded, what is deferred |
An in-app documentation site covering the same ground for users is reachable from the landing footer.
npm install
# server (port 3001) + client (port 5173)
npm run devRequires Postgres + a .env (see server/.env.example, client/.env.example). Verify with:
npm run typecheck # all workspaces
npm run lint # eslint, zero warnings tolerated
npm test -w @mantua/server # 223 tests
npm test -w @mantua/client # 84 testscd contracts
forge test # 204 tests: market primitives, hook suites, invariants, full-lifecycle E2EDependencies are not vendored.
contracts/lib/is gitignored, so a fresh checkout has no forge-std, solmate, OpenZeppelin, v4-core, or v4-periphery and the Solidity will not compile until they are installed. They are not yet pinned as submodules; install them intocontracts/lib/before building.
Optional: the agent can pay per-call for premium data via the x402
marketplace (off by default; set X402_ENABLED=1 + fund the buyer wallet)
see docs/x402-setup.md.
Foundry scripts for re-deploying the per-hook periphery / pool setup live under
deploy/ each with a README and the exact forge script commands
(all use --via-ir --optimizer-runs 200).