# AntFleet Two-model GitHub PR code review with per-review USDC settlement on Base. x402 pay-per-review for public repos, prepaid wallet-bound channels for installed/private repos — no subscription, no email, no dashboard. ## Service summary - Two frontier models review every PR independently. Only unanimous findings become PR comments. - Closed findings get a SHA-pinned closure receipt comment, posted by the Sweeper cron. - Public receipts at https://www.antfleet.dev/receipts. - Public repos can be reviewed with one x402 payment authorization per call. - Installed/private repos can use a prepaid wallet-bound channel with one internal USDC drawdown per review. ## x402 pay-per-review - Chain: Base mainnet (chainId 8453) - Token: USDC at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (6 decimals) - Price per review: 0.50 USDC (override via REVIEW_PRICE_USDC env var) - Endpoint: POST /api/v1/review/x402 - Status: GET /api/v1/review/x402/{jobId} - Access: open to any x402 buyer. No X-Aeon-Context header required. - First request without PAYMENT-SIGNATURE returns HTTP 402 with payment requirements. Repeat with PAYMENT-SIGNATURE to enqueue the review. - Payment settles to the same operator wallet used by prepaid channel deposits. ## x402 repo vulnerability scan - Chain: Base mainnet (chainId 8453) - Token: USDC at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (6 decimals) - Price per scan: 2.00 USDC (flat, covers up to 10 semantic chunks) - Endpoint: POST /api/v1/scan/x402 - Public repos only (v1). No GitHub App install required. - Access: open to any x402 buyer (no X-Aeon-Context header required). - First request without PAYMENT-SIGNATURE returns HTTP 402 with payment requirements. - Repeat with PAYMENT-SIGNATURE to run the scan. Response is synchronous (~60-180s). - Returns findings, chunk count, and head SHA directly in the response body. ## Repo scan agent flow Base URL: https://www.antfleet.dev 1. POST /api/v1/scan/x402 body: {"target": {"repo": "owner/name"}} → returns HTTP 402 with payment requirements 2. Sign the x402 USDC authorization from the paying wallet. 3. Repeat POST /api/v1/scan/x402 with PAYMENT-SIGNATURE header. → waits (up to 180s), returns complete findings JSON directly. ## PR review agent flow Base URL: https://www.antfleet.dev 1. POST /api/v1/review/x402 headers: content-type: application/json body: {"target": {"repo": "owner/name", "pr": 123}} → returns HTTP 402 with x402Version, accepts[], and PAYMENT-REQUIRED header 2. Sign the x402 USDC authorization from the paying wallet. 3. Repeat POST /api/v1/review/x402 with: headers: content-type: application/json PAYMENT-SIGNATURE: {base64 payment payload} body: {"target": {"repo": "owner/name", "pr": 123}} → returns jobId, statusUrl, status: queued, expectedDurationSec 4. Poll GET /api/v1/review/x402/{jobId} until complete or failed. A complete response includes findings and the review receipt URL. ## Prepaid channel flow for installed/private repos - Minimum deposit: 5.00 USDC (override via MIN_DEPOSIT_USDC env var) - Deposit address: GET /.well-known/antfleet.json → deposit_address Walk the install state machine when the repo is private or should be reviewed continuously by the GitHub App. Every response carries a `next_step` block the agent reads to drive forward. 1. POST /api/v1/installations body: {"wallet_address": "0x..."} → returns installation_id, status: pending_binding, binding_challenge, next_step (POST /bind) 2. Sign the binding_challenge with EIP-191 personal_sign using the wallet address you POSTed above. 3. POST /api/v1/installations/{installation_id}/bind body: {"signature": "0x..."} → returns status: awaiting_deposit, next_step (POST /deposit) 4. Send USDC on Base from the bound wallet to the deposit address (see the manifest), amount ≥ MIN_DEPOSIT_USDC. 5. POST /api/v1/installations/{installation_id}/deposit body: {"tx_hash": "0x..."} → returns status: active, next_step (install GitHub App) Waits for 3 confirmations. Idempotent on tx_hash. 6. Install the AntFleet GitHub App on the repo you want reviewed: https://github.com/apps/antfleet/installations/new?state={installation_id} 7. Open a PR. The webhook fires, the gate debits one review price from your channel, and the review runs. A finding comment includes the drawdown receipt and your new channel balance. ## Polling GET /api/v1/installations/{installation_id} returns the full state + the current next_step. Call this if you lose track or want a fresh nudge. ## Insufficient balance If your channel balance drops below the price, the next PR webhook posts a prepaid-channel top-up invoice comment on the PR instead of running. Top up your channel; the next PR runs. ## Wallet reputation GET /api/v1/wallets/{address} (and the HTML page /wallets/{address}) shows total reviews, finding-close rate, total USDC settled, and current channel balance for any bound wallet. ## Manifest GET /.well-known/antfleet.json returns the machine-readable surface: service name, version, chain, payment token, prices, endpoint URLs, x402 review URLs, and the GitHub App install URL.