# signing-keys: does IMDPicks need a backend private signing key? Repository read: `AgentStewLC/launch-3500-imd-picks-complete` at commit `741da4053db911b89b94b902c37c0df8460dadc2` (cloned; 253 tracked files). Every path:line below is at that commit; raw URL base `https://raw.githubusercontent.com/AgentStewLC/launch-3500-imd-picks-complete/741da4053db911b89b94b902c37c0df8460dadc2/`. Protocol: `https://imd.fun/docs/llms.txt` (fetched 2026-11-29). Nothing was changed, signed or sent. Note: the repository holds two copies of the escrow, `src/ImdPicksEscrow.sol` (root) and `contracts/src/ImdPicksEscrow.sol` (newer; `diff` shows differing comments/limits). Lines are given for both where they matter. ## Signers "IMD.fun-native flow" = the customer's wallet calls `request(job.open@job-1, body, (0x0,0x0), IMD, 0.5 IMD)` on the Intake `0xa43e…de82` itself, and the page follows the job on public `api.imd.fun` routes. | # | Operation | File and line | What is signed | Key holder | Needed by the IMD.fun-native flow | Evidence | |---|---|---|---|---|---|---| | 1 | Settlement Worker loads verifier key | `web/worker/src/chain.ts:19-26` (`keeperAccount`), `:28-33` (`viemChain` builds a wallet client) | Nothing by itself; accepts `VERIFIER_PRIVATE_KEY` only if 32-byte hex AND its address equals the escrow's immutable VERIFIER `0x3322…6d69` (`chain.ts:22-24`) | Operator (secret `VERIFIER_PRIVATE_KEY`, `web/worker/src/index.ts:24`; `docs/CLOUDFLARE.md:63`; `web/worker/wrangler.toml:19`; empty slot `web/worker/.dev.vars.example:5-7`) | **No** | Without it: "the Worker runs read-only (archive and status only)" (`chain.ts:20`) | | 2 | Worker sends escrow/reserve txs | `web/worker/src/chain.ts:42-50` (`send` → `writeContract`); kinds `verifyDelivery`, `rejectDelivery`, `settle`, `refund`, `topUp` (`web/worker/src/keeper.ts:23`), used at `keeper.ts:272, 283, 303-304, 307-308, 315` | Ethereum txs to escrow `0xa198…8e98` / reserve `0xc93f…2584` (`chain.ts:12-13`) | VERIFIER key holder | **No** — these act only on orders paid into `ImdPicksEscrow.pay`; a direct Intake request creates no escrow order | `keeper.ts:2-13` header describes settle/verify/refund of escrow orders only | | 3 | Worker capacity gate requires the key | `web/worker/src/index.ts:106-107` (`verifier-key-not-configured`), `:108-111` (gas checks) | n/a (gate) | n/a | **No** — but note the current escrow checkout (`web/src/escrow.tsx:140,152` via `web/src/capacity.ts:18,28`) stays closed without it | `capacity()` returns `accepting:false` when the key is absent | | 4 | VPS keeper (indexer) loads key | `web/server/indexer.ts:481-485` (`KEEPER_PRIVATE_KEY_FILE` or `KEEPER_PRIVATE_KEY` → `privateKeyToAccount`) | Wallet client for Ethereum txs | Operator; `deploy/docker-compose.yml:27-28,106-108` mounts secret `./secrets/keeper_key`; `deploy/install.sh:54-59` creates it EMPTY (mode 600); docs `docs/ACTIVATION.md:46,133-135`, `docs/OPERATIONS.md:95,118`, `docs/LAUNCH.md:125`, `contracts/integration.mainnet.json:75` | **No** | "Without one the service runs read-only (indexer, archive, health) and signs nothing." (`indexer.ts:482`) | | 5 | VPS keeper sends txs | `web/server/indexer.ts:351-374` (`verifyDelivery` :356, `rejectDelivery` :357, `settle` :359, `refund` :360/:363, `topUp` :370); helpers `web/src/engine/sdk.ts:230-241`, `web/src/engine/reserve.ts:76-79` | Same five escrow/reserve calls | VERIFIER key (for verify/reject); any key for settle/refund/topUp | **No** | `indexer.ts:16-21` | | 6 | Escrow `verifyDelivery` | `src/ImdPicksEscrow.sol:380-391` (`contracts/src/ImdPicksEscrow.sol:413-424`); check `msg.sender != VERIFIER` at `:381` (`:414`) | Tx attesting `resultHash` + `artifactsHash` of a Delivered order | Only the immutable `VERIFIER` (`src/ImdPicksEscrow.sol:99,208`), deployed as `0x3322e6dd06ade8377f1f1bcb766f6133d7b64d69` (`docs/DEPLOYMENT.md:13`, `web/src/engine/sdk.ts:40`) | **No** (escrow orders only) | Without it, `settle` reverts `NotVerified` (`src/ImdPicksEscrow.sol:359`); after `VERIFY_WINDOW` = 6 hours (`:97`) the order becomes refundable (`:41-47`) — so no burn/developer split, customer gets escrowed remainder back | | 7 | Escrow `rejectDelivery` | `src/ImdPicksEscrow.sol:394-403` (`contracts/src/…:427-…`); `msg.sender != VERIFIER` at `:395` | Tx marking a delivery unverifiable → Failed, refundable now | VERIFIER | **No** | Without it the customer waits for the 6-hour window instead of an immediate refund (`:41-47`) | | 8 | Escrow `settle` | `src/ImdPicksEscrow.sol:355-377` (`contracts/src/…:388`) | Tx paying burn + WALLET_1 + WALLET_2 | **Anyone** (permissionless, `:353-354`, `:49-55`) | **No** | Needs `verifiedAt != 0` (`:359`), i.e. step 6 first | | 9 | Escrow `refund` | `src/ImdPicksEscrow.sol:335-352` (`contracts/src/…:367`) | Tx returning escrow to payer | **Anyone**, incl. the customer's own wallet (`:333-334`; UI button `web/src/escrow.tsx:164,293`) | **No** | — | | 10 | Reserve `topUp` | `src/ImdPicksRefundReserve.sol:131-145` | Tx paying the payer the 0.5 IMD Swarm share after a refunded order | **Anyone** (`:128-130`) | **No** | — | | 11 | Escrow constructor / deployment | `script/Deploy.s.sol:41-46` (`VERIFIER_ADDRESS` env, `vm.startBroadcast()` :44); `contracts/script/Deploy.s.sol:47` | Deployment tx | Deployer's own keystore (`script/Deploy.s.sol:18-20`); no key in the repo | **No** — contracts already deployed; `contracts/deploy.sh:2-3,14-16` removed broadcast, `dry` only "no key, no broadcast" | — | | 12 | Admin page sign-in | `web/src/pages.tsx:809` (`client.signMessage`), verified at `:780,810`; `README.md:463` | Off-chain one-time message (no tx) | Developer/operator **browser wallet** `0x8302…41B0` (`README.md:463`) | **No** (accounting view only) | Not a backend key | | 13 | Worker `ADMIN_TOKEN` | `web/worker/src/index.ts:14,24,133` | Not a signature: a Bearer token for `POST /admin/pass` | Operator | **No** | — | | 14 | Customer wallet (excluded from "backend") | `web/src/checkout.tsx:141` (approve Intake), `:150-151` (`request` on Intake with `JOB_ACTION`, null callback), `:168` (split transfers); escrow path `web/src/engine/sdk.ts:194,212` | approve / `request` / `pay` | Customer | Yes (customer only) | `Checkout` (`checkout.tsx:44`) is not imported anywhere in `web/src` (grep); the mounted checkout is `EscrowCheckout` (`web/src/main.tsx:8`) | Other searches for signers (`git grep` for `privateKeyToAccount|signMessage|signTypedData|writeContract|sendTransaction|PRIVATE_KEY|startBroadcast|mnemonic`, excluding `dist/` bundles and vendored forge-std): no further backend signer found. `web/server/knowledge/*`, `deploy/scripts/backup.mjs`, `deploy/scripts/monitor.mjs`: no signing found. ### What the IMD.fun protocol requires (docs `https://imd.fun/docs/llms.txt`) - **Pay**: Pay onchain — "The Intake contract takes the payment and the ask together: no request token, no x402 signature, no call to the API first." The customer approves the Intake once and calls `request`; "The price is pulled in the same call." Only the payer's wallet signs. The x402 door (quote/submit) uses the customer's wallet signature (`PAYMENT-SIGNATURE`, `quoteSignature`), not a site key; its "Paid request" credential is a random 32-byte bearer token, not a signing key (Authentication). - **Job opened**: "the control plane reads the event and runs the work" (Pay onchain). No action by IMDPicks' backend. - **Follow**: `GET /intake/:chainId/:transactionHash` — Public, gives `admission.result.jobId`, `statusUrl`, `resultUrl`, and states received…completed/refused/failed (Following it). - **Report**: `GET /jobs/:id`, `GET /jobs/:id/result` — Public; `GET /intake-results/:id` — Public (Jobs; Following it). "Most routes need nothing" (Authentication). - The other credentials (Wallet EIP-712 "from the wallet that holds the seat", Device Ed25519 "from a paired contributor device key") are for contributors, not customers (Authentication). So: **pay — customer wallet only; job opened — no key (IMD.fun's plane); follow — no key; fetch report — no key.** ## Verdict No backend private signing key is genuinely required for the IMD.fun-native checkout (customer wallet → Intake `request`, public `api.imd.fun` reads); `VERIFIER_PRIVATE_KEY`/`KEEPER_PRIVATE_KEY` is needed only to call `verifyDelivery`/`rejectDelivery` on the site's own `ImdPicksEscrow` (`src/ImdPicksEscrow.sol:381,395`), i.e. only if the escrow path with its burn/developer split and verified-settlement is kept. ## What can be switched off | Service / setting | Where | Native flow needs it? | What a customer (or operator) loses without it | |---|---|---|---| | `VERIFIER_PRIVATE_KEY` Worker secret | `web/worker/src/chain.ts:19-26`, `index.ts:24,106` | No | For escrow orders only: no `verifyDelivery`, so no settlement — burn (0.25/0.5/0.75 IMD) and developer rewards never paid (`src/ImdPicksEscrow.sol:359`); delivered orders refund after 6 h instead (`:41-47,97`). Invalid reports are not rejected early. Native Intake orders: nothing lost. | | Worker cron keeper pass | `web/worker/src/keeper.ts`, `index.ts:89-100,120` | No | Automatic refunds/top-ups of escrow orders; the customer can still call `refund` themselves (`src/ImdPicksEscrow.sol:333-335`, `web/src/escrow.tsx:164`). | | Worker `/capacity` gate | `web/worker/src/index.ts:103-117`, `web/src/capacity.ts:2,18,28` | No | A queue-full/readiness pause before charging. IMD.fun native equivalent: free `POST /requests/check` / `POST /requests/quote` before paying (docs, Pay onchain → How it works). | | Worker report archive (D1) | `web/worker/src/keeper.ts:86,129-143`, `web/worker/schema.sql` | No | A mirror of report bytes; public `GET /jobs/:id/result` and `GET /intake-results/:id` serve the report instead. Archive fallback for gateway outages (`indexer.ts:22-26`) is lost. | | `ADMIN_TOKEN` | `web/worker/src/index.ts:14,133` | No | Manual pass trigger only. | | VPS indexer/keeper + `KEEPER_PRIVATE_KEY(_FILE)` + `secrets: keeper_key` | `web/server/indexer.ts:481-488`, `deploy/docker-compose.yml:19-28,106-108`, `deploy/install.sh:54-59` | No | Same as Worker keeper (settle/verify/refund/top-up of escrow orders) and its `/orders`, `/reports` archive API. The `ingest` service (`docker-compose.yml:36-39`) is separate and has no key. | | `ImdPicksEscrow` (deployed `0xa198…8e98`) | `src/ImdPicksEscrow.sol` | No | **Refund protection**: with direct Intake `request`, the 0.5 IMD is "forwarded whole to the treasury in the same call" and "a refused body is a spent payment" (docs, Pay onchain); no refund route for a failed `job.open` was found in the protocol docs (not found). **Burn split / developer rewards**: the escrow enforced burn + two wallets only after verified delivery; without it they would be separate customer-wallet transfers, as the unmounted `web/src/checkout.tsx:160-172` does, with no refund if the job fails. **Delivery deadline** (`deliverBy`) enforcement lost. | | `ImdPicksRefundReserve` (deployed `0xc93f…2584`) | `src/ImdPicksRefundReserve.sol:128-145` | No | The 0.5 IMD Swarm-share top-up after a refunded escrow order. | | Deploy script `VERIFIER_ADDRESS` | `script/Deploy.s.sol:41-43` | No | Only for a new escrow deployment; contracts already deployed (`contracts/deploy.sh:2-3`). | Open (not found): whether IMD.fun's own plane refunds a failed `job.open` paid onchain — the docs list `onFailure` / `requestWithFailure` callbacks ("Refused (status 1) or ended without a result (2)") but no refund of the 0.5 IMD; with the null callback the site uses, failure is visible only via `GET /intake/...` state `refused`/`failed`. ## Committed key search Searched all 253 files tracked at `741da40` with `git grep -I` for: 1. A 64-hex value (optionally `0x`) assigned (`=`/`:`) to a name containing priv/secret/key/mnemonic/seed/signer/pk (any case). 2. Every `0x` + 64-hex literal in `*.ts *.mjs *.sol *.json *.toml *.sh *.yml *.example *.md` (18 hits), each reviewed by its name. 3. Well-known public test keys (Anvil/Hardhat accounts #0 and #1), PEM `BEGIN … PRIVATE KEY`, `xprv`. 4. Tracked files named like `secret`, `.env`, `keystore`, `.pem`, `.key`. Found: - **No committed private key.** - Search 1 hits: `docs/ADAPTATION.md:199` and `docs/validation/contracts-test-results-launch.txt:2` — both `FOUNDRY_FUZZ_SEED`, a Foundry fuzz seed, not a key. - Search 2: the other hits are transaction hashes, request ids/result hashes and ABI-encoded constructor args (`contracts/integration.mainnet.json:7,17,21,31,90`, `docs/DEPLOYMENT.md:18`, `docs/LAUNCH.md:19`, `web/src/config.ts:116`, `artifacts/samples/recovered-ufc-report.v2.json:10-11`) and secp256k1 curve constants in vendored forge-std (`contracts/test/lib/forge-std/src/StdSecp256k1.sol:23-34`, `safeconsole.sol:7`). - Searches 3 and 4: none. `web/worker/.dev.vars.example:7` has `VERIFIER_PRIVATE_KEY=` with an empty value; `deploy/secrets/keeper_key` is not tracked (created empty at install, `deploy/install.sh:55`). - Minified bundles (`dist/assets/*.js`, `web/worker/dist/worker.js`) matched only on whole-line co-occurrence of library text; the assignment-anchored search 1 found nothing in them. - Git history before this commit was not searched (brief limits to files at the commit).