# PEPE RUN — what must exist outside the code before paid play is enabled Scope: repository `identity-md-launches/goal-3502-build-audit-deploy-pepe` at commit `6083f1b5db4c14344351876ca9d2d057b768ad85` (cited as `path:line`), plus the public sources linked below. This identifies requirements. It is **not legal advice**. Rows marked **[Counsel]** or **[Requester]** can only be decided by the requester or their lawyers. ## Summary 1. **Paid play cannot be switched on today, and the code says so.** `backend/admission/README.md:31` says paid entry stays unavailable until the ledger address, rules hash, HSM/KMS adapter, policy source, legal and jurisdiction data, terms/privacy hashes, Pepe rights evidence, security approval, Royal disclosure and evidence providers are supplied and approved. `backend/runtime/README.md:62-66` lists as "Not release-ready yet": the real admission/SIWE adapter, seed-custody encryption, a trusted multi-provider finalized RPC, the verifier adapter and signature flow, the WebSocket transport with per-IP limits, the expired-run leaderboard policy, a production durable volume with backups, and load tests on target hardware. 2. **The code at this commit does not match the authorised sink design.** `src/RunArcade.sol:222` still calls `IMD.burn(burned)`, and `docs/arcade.md:6-20` records that IMD has no `burn`, so every purchase reverts. The requester has authorised direct transfers to `0x…dEaD` instead. That change is not in this commit, so contract changes, re-tests and a re-audit come before any deployment. The disclosure must say that circulating tokens leave circulation, but `totalSupply` is unchanged. 3. **Hosting is small but has one hard constraint.** One process serves at most about 50 concurrent paid runs. The store is single-writer SQLite on one local durable volume, with no replicas and no network filesystem (`backend/runtime/README.md:58-60`; `backend/store/README.md:42`). Availability therefore depends on backups and a restore drill, not on horizontal scaling. 4. **Keys are immutable once the ledger is deployed.** The admission/score authority and the replay verifier are constructor immutables (`src/RunArcade.sol:30-31,103-110`). There is no owner and no rotation (`docs/arcade.md:48`). A lost or compromised key cannot be replaced without redeploying. Its effect on the pot depends on which key it is. The admission authority is also the first score signer (`src/RunArcade.sol:30`), and a valid score needs both signatures (`src/RunArcade.sol:255`). So losing either key stops all new scores from being accepted. If the admission authority and the verifier signer collude or are both compromised, they can sign scores for arbitrary results. Operators must be different legal persons on different infrastructure. 5. **The Pepe the Frog name and character are the largest non-code risk.** The project says its mascot is original and that clearing the "Pepe" name belongs to legal review (`media/characters/README.md:41`). It records no licence from the character's creator. Press reports say Matt Furie pursued Infowars over unauthorised Pepe posters and that his counsel said Infowars needed a licence. I could not read the primary court or settlement documents, or any trade-mark register. Whether the game needs a licence, a redesign or a rename is **[Counsel]**. 6. **Legal gating is entirely open.** The game is skill-based, but the paid entry and the pooled prize raise questions in every main jurisdiction. The brief's own claim is that the highest verified score wins. In the UK, the statutory test is whether the skill requirement would stop a significant proportion of entrants from winning or from entering. A skill-only score race with a large gap between players may or may not meet it, and that is a question for counsel. Beyond the UK I cite no primary source (see Not checked). 7. **Media licences are self-declared.** Characters use `LicenseRef-PEPE-RUN-Project-Asset` and say the project owner may replace it (`media/characters/characters.json:1830-1832`). The music was written by an AI contributor (`media/music/README.md:26`). Rights in AI-assisted output, and the identity of the "project owner", are for the requester and counsel. ## Requirements table | # | Requirement | Why it is needed | Who provides it | Source | What it blocks | |---|---|---|---|---|---| | 1 | Contract change from `IMD.burn` to direct transfer to `0x000000000000000000000000000000000000dEaD`, new tests, and a re-audit of both contracts | The deployed IMD has no burn, so purchases revert. The requester authorised the sink in the brief. | Requester decision (given); contract developer; independent auditor | `src/RunArcade.sol:9-11,214-236`; `docs/arcade.md:6-20` | Sepolia and mainnet deployment; all paid play | | 2 | Public disclosure that the 25% sink removes tokens from circulation but `totalSupply` is unchanged | Honest consumer-facing description of what is "burned" | Requester / counsel for wording | `docs/arcade.md:13-18` (supply stays at the on-chain value); brief | Terms of play, marketing, legal sign-off | | 3 | Static site hosting for `peperun.imd.site`: HTTPS, DNS control for the `imd.site` zone, CDN, security headers. Free play is client-only | Free practice needs no wallet or backend (`backend/admission/README.md:3`). The domain must be controlled by the requester. | Requester (DNS/registrar access); hosting provider | `web/README.md`; `backend/admission/README.md:3` | Publishing the free site | | 4 | API and WebSocket host with TLS and per-IP rate limits. Node ≥ 22.13 with `node:sqlite` | Runtime ships no transport; WebSocket and per-IP limits are listed as missing | Requester's hosting account; backend developer | `backend/runtime/README.md:5,64-66` | Paid sessions | | 5 | 60 Hz game-runtime host sized for ≤ 50 concurrent paid runs per process: dedicated CPU core, fast local NVMe, no noisy neighbours | Measured p99 loop 65 ms at 50 sessions and 250 ms at 200 (build machine). Fsync cost dominates. Load tests on target hardware are still outstanding. | Requester; infrastructure operator | `backend/runtime/README.md:53-60,66` | Paid sessions at scale; load test sign-off | | 6 | Durable single-writer volume for SQLite (WAL, `synchronous=FULL`), SQLite-aware snapshot backups (not file copies), encrypted off-site copies, tested restore, disk alerts | Store holds purchases, inputs, checkpoints and attestations. Copying the live file is unsafe and a WAL must never be deleted. | Infrastructure operator | `backend/store/README.md:42` | Paid sessions; dispute handling | | 7 | Seed-custody encryption and a separate private runtime DB | Seed secrets must stay secret until a run ends. A leaked secret lets a player precompute obstacles. | Backend developer; KMS-backed data key | `backend/runtime/README.md:13,64`; `backend/admission/README.md:29` | Paid sessions | | 8 | Ethereum RPC that serves finalized blocks, from at least two independent providers, plus an archive/log-capable endpoint for the indexer | Seeds are derived only from a finalized hash of `entryBlock+2`, and the store registers purchases only after finality | RPC providers (account holder: requester) | `docs/protocol.md:51`; `backend/runtime/README.md:21-22,64`; Ethereum finality is not independently checked here | Seed release, indexer, paid sessions | | 9 | Admission authority signer (ECDSA), HSM/KMS-backed, `sign(digest)` adapter, operated separately from the service. Address fixed at deployment | It signs every admission and is the first score signer. The service refuses a signer address mismatch. | Operator A (the service operator); requester names them | `backend/admission/README.md:9-11`; `src/RunArcade.sol:30,103-110` | Deployment (address is a constructor argument); all admissions | | 10 | Independent replay-verifier signer, run by a different operator on separate infrastructure, with its own KMS/HSM key and its own copy of engine and replay code | The second score signature is the check against a rogue or compromised server. Contract requires it distinct from the authority and the developer wallet. | Operator B (not Operator A); requester recruits and contracts | `src/RunArcade.sol:31`; `docs/arcade.md:30-31`; `docs/protocol.md:103,115` | Deployment; any score submission | | 11 | Verifier access path (`revealForVerifier`, `verifierAuth` adapter) so the verifier can fetch seed and replay only after a run ends | Verifier cannot replay without the seed. The adapter is not built. | Backend developer; Operator B | `backend/runtime/README.md:25,37,64` | Score attestation, settlement of any non-empty week | | 12 | Keeper wallet funded with ETH for `submitScore`/`settle` relays, with a balance alert. Not a trusted role: both calls are permissionless and cannot choose a winner | Settlement is automated only if something sends the transactions. The pot stays safe if the keeper stops, because anyone can call. | Requester funds it; any operator holds it | `docs/arcade.md:39-43` | Automated settlement (not safety) | | 13 | Eligibility-evidence provider for age, location and sanctions with `assess` and independent `verify`, plus a retention schedule | Admission refuses without approved age, location and sanctions assessments. A browser checkbox never authorises. | Requester contracts a provider; counsel approves scope | `backend/admission/README.md:13-15,29` | All paid admissions | | 14 | Provisioned policy: jurisdictions allowed, minimum age, operator identity, terms hash, privacy/policy hash, rights and security approvals with `status: 'approved'`, Royal disclosure | Admission has no fallback policy and defaults to unavailable | Requester and counsel | `backend/admission/README.md:12,15,31` | All paid admissions | | 15 | Publish the exact terms and policy documents whose keccak hashes are signed into each admission | Wallets accept terms by hash | Counsel drafts; requester publishes | `docs/protocol.md:17` | Admissions; consumer-law compliance | | 16 | Monitoring and alerting: runtime loop lag, fsync latency, disk and WAL size, backup age, finalized-head lag, RPC disagreement, keeper balance, unsettled-epoch age, signer health, anomaly counters | Runtime exposes loop and backlog behaviour and persisted anomaly counters; paging is not supplied | Infrastructure operator | `backend/runtime/README.md:51,56-58` | Production readiness | | 17 | Wallet integration and swap path for IMD: the user needs IMD and an exact approval of the price, and the Royal skin disclosure | Purchases need exact approvals of 1/5/10 × UNIT. A swap venue must be chosen and legally reviewed. | Frontend developer; requester picks any venue | `docs/arcade.md:34-36` | Paid UX; swap feature | | 18 | Trade-mark and copyright position on "Pepe the Frog": ownership, any registrations, enforcement history, and a licence, redesign or rename | Name and character are in the title, logo and mascot. The repo's licence field does not settle third-party rights. | **[Counsel]** and **[Requester]**; possibly the rights holder | `media/characters/README.md:41`; `media/logo/PROVENANCE.md:3`; NPR report https://www.npr.org/2019/06/11/731520403/alex-jones-to-pay-15-000-in-pepe-the-frog-copyright-infringement-case (search snippet; page not fetched) | Public launch name and paid play | | 19 | Fix the asset owner and licences: name the legal owner of the "project", replace `LicenseRef-PEPE-RUN-Project-Asset` with a real licence, and decide on AI-generated music | Records say the art, obstacles and music are original/procedural; backgrounds and obstacles say no third-party art; music says an AI contributor wrote it | **[Requester]**, **[Counsel]** | `media/characters/characters.json:1830-1832`; `media/obstacles/PROVENANCE.md:2,6`; `media/backgrounds/README.md:9`; `media/sfx/README.md:15`; `media/music/README.md:26` | Publication terms; any licence the requester offers | | 20 | Skill-contest versus gambling and lottery analysis per jurisdiction (at least US federal and states, UK, EU states, and the operator's home) | Paid entry plus a prize pool is the shape that gambling and lottery statutes target. A skill element matters in some tests and not in others. | **[Counsel]** | UK: https://www.legislation.gov.uk/ukpga/2005/19/section/14 (s.14(5)). Others: not checked | Enabling paid entry anywhere | | 21 | Age and geography limits: minimum age, blocked jurisdictions list, how location is verified and how it is enforced at the wallet level | Policy requires approved age and location | **[Counsel]** decides; provider enforces | `backend/admission/README.md:15` | Admission | | 22 | Sanctions screening programme: wallet and location screening, a blocked-property procedure, and a written compliance process | Prize payout to a sanctioned address is a US-person risk. The contract settles automatically and cannot veto, so screening happens at admission and cannot be done at payout. | **[Counsel]**; provider | OFAC guidance https://ofac.treasury.gov/recent-actions/20211015; `docs/arcade.md:48` | Admission; payout risk sign-off | | 23 | Prize-promotion and consumer rules: official rules, odds and skill disclosure, refund and complaint handling, advertising claims, and the Royal advantage disclosure | Royal grants an extra life and expires weekly, so it needs a clear disclosure | **[Counsel]** | `backend/admission/README.md:25`; `docs/arcade.md:36` | Terms; marketing | | 24 | Tax reporting on prizes: operator's own reporting and withholding duties, and winners' notices | The prize is paid by a contract with no operator step, so the operator may have no payout hook but may still carry duties. Counsel must decide whether any form is required. | **[Counsel]** and tax adviser | IRS instructions (US prizes in box 3) https://www.irs.gov/instructions/i1099mec; other countries not checked | Launch sign-off | | 25 | Privacy: lawful basis, notice, retention and deletion schedule, processors, international transfers, DPIA where needed. Wallet addresses, IPs and eligibility evidence are personal data | The admission DB keeps hashes and references and the code states that it exposes no deletion endpoint and leaves retention to counsel | **[Counsel]**; evidence provider | `backend/admission/README.md:29` | Collecting any paid-play data | | 26 | Independent security audit of both contracts and the whole system, with findings fixed and approved in policy | Policy requires explicit security approval | Independent auditor; requester commissions | `backend/admission/README.md:15,31`; `docs/arcade.md:48` | Mainnet deployment | | 27 | Sepolia dress rehearsal and a mainnet fork run with real keys' addresses (not stand-ins), including a full settle cycle | Brief requires Sepolia first | Requester funds Sepolia ETH; deployer | brief; `docs/arcade.md:22,51-52` | Mainnet deployment | | 28 | Deployer wallet and deployment keys for the two contracts, held by multisig or hardware wallet and discarded for any admin role (contracts have none) | Constructor takes the verifier contract, authority and verifier address | Requester | `src/RunArcade.sol:103-110` | Deployment | | 29 | Incident and key-compromise runbook: what to do if either signer is lost or leaks (pause admissions in policy, stop signing scores, redeploy a new ledger, migrate) | Immutable signers and no admin mean the only remedy is to stop issuing signatures and redeploy | Requester, operators | `src/RunArcade.sol:30-31`; `docs/arcade.md:48` | Go-live approval | | 30 | Decision on whether `expired` runs are leaderboard-eligible (store admits only `finished`) | Fairness rule that affects terms | **[Requester]** | `backend/runtime/README.md:66` | Terms; leaderboard | ## What to do next | # | Action (one per row) | Owner | |---|---|---| | 1 | Instruct counsel on the Pepe the Frog question first: obtain a written opinion on the name, the logo and the mascot, with a licence, redesign or rename recommendation. Everything public hangs off the name. | Requester | | 2 | Commission the contract change (dEaD transfer in `_collect`, updated tests and docs, wording for the "supply unchanged" disclosure) and freeze it for audit. | Contract developer | | 3 | Hire a firm for the written skill-contest and gambling analysis, starting with the jurisdictions you intend to allow, and an allow-list or block-list of countries. | Requester / counsel | | 4 | Select two separate operators and name them: Operator A holds the admission authority key, and Operator B holds the replay verifier key. Neither shares cloud account, KMS or staff. | Requester | | 5 | Create both keys inside an HSM/KMS, record only the public addresses, and confirm the signing adapter returns signatures that recover to those addresses. | Operators A and B | | 6 | Pick an eligibility-evidence provider that supports separate `assess` and `verify`, and agree its data retention terms with counsel. | Requester / counsel | | 7 | Provision the runtime host with a local NVMe volume, a snapshot backup job and a tested restore, then run a load test on it at 50 concurrent runs. | Infrastructure operator | | 8 | Contract two finalized-block RPC providers and add disagreement alerts. | Infrastructure operator | | 9 | Build the missing adapters listed in `backend/runtime/README.md:62-66`: SIWE, seed-custody encryption, verifier flow, WebSocket with limits. | Backend developer | | 10 | Publish the free practice site at `peperun.imd.site` (no wallet, no paid code path). | Requester / web host | | 11 | Write terms of play, privacy notice and the Royal disclosure, publish them, and compute their hashes for the policy. | Counsel | | 12 | Replace the project-asset licence field with a real licence and name the asset owner. Decide on the AI-authored music. | Requester / counsel | | 13 | Commission the independent audit of both contracts and the integrated system. | Requester | | 14 | Deploy to Sepolia, run the full cycle (purchase, score, settle, rollover) with both real signer addresses. | Deployer | | 15 | Fund and alert the keeper wallet, and run it on Sepolia. | Operator | | 16 | Write and rehearse the key-compromise runbook. | Requester / operators | | 17 | Approve the policy with `status: 'approved'` for each of legal, rights and security. Only counsel and the requester can sign these. | Requester / counsel | ### Go-live checklist in dependency order 1. Rights decision on the Pepe name and character (row 18) → final product name and branding. 2. Free site live (no dependency on 3–20 beyond hosting and DNS). 3. Contract change for the dEaD sink merged and frozen (row 1). 4. Legal analyses for the allowed jurisdictions, age/geography policy, sanctions programme, tax and privacy decisions (rows 20–25). 5. Terms and policy documents published; hashes computed (row 15). 6. Operators A and B appointed; keys generated in HSM/KMS; addresses recorded (rows 9–10). 7. Infrastructure up: runtime host, volume, backups with a restore drill, RPCs, monitoring (rows 3–8, 16). 8. Missing adapters built and eligibility provider integrated (rows 7, 11, 13, 14). 9. Load test at target hardware and an internal replay-verifier drill. 10. Independent audit complete; findings fixed or accepted in writing (row 26). 11. Sepolia rehearsal passes, including settle and rollover (row 27). 12. Deploy `RunVerifier` and `RunArcade` to mainnet from the deployer wallet with the real signer addresses. Verify the source; check the immutables match the recorded addresses (rows 28). 13. Fund the keeper; provision the production policy; set approvals to `approved`. 14. Small-cap soft launch, with monitoring and the runbook staffed. Enable paid play only after the above are written down as complete. ## Not checked - Any primary document on Pepe the Frog: copyright registrations, trade-mark registers, the Infowars settlement text and any other enforcement. I rely on a search summary of press coverage (NPR, WilmerHale), and my attempt to read WilmerHale's page was blocked (HTTP 403) and NPR's timed out. Nothing here establishes who owns what today. - The licences of the IMD token and any swap venue's terms. IMD is recorded as `UNLICENSED` in `docs/arcade.md:10`, a claim from the repo that I did not re-check on Sourcify or Etherscan. - Gambling, lottery and skill-contest law outside the UK statute text, including US state law, EU member states and the operator's home country. The UK s.14(5) reading is from a fetched summary of the statute, not a full legal analysis. - Age-of-majority, consumer-protection, advertising, MiCA/crypto-asset, money-transmission, AML/KYC thresholds, VAT/GST and tax rules in every jurisdiction. I cite only OFAC (overview page) and the IRS Form 1099-MISC instructions (US box 3 prizes). I did not verify whether those apply to a permissionless contract operator. - GDPR and other privacy statutes were not retrieved (the EUR-Lex fetch returned an empty page). - Vendor choices, prices, quotas and availability for hosting, KMS/HSM, RPC and eligibility providers: nothing is recommended by name because none was checked. - Contract and runtime behaviour: I read the READMEs, docs and selected source lines. I did not run the tests, fork tests or load tests, and I did not audit the contracts. The capacity figures are the repo's own measurements. - Whether the repo's later commits changed any of this. Findings are for commit `6083f1b`. - Ethereum finality semantics and RPC-provider behaviour were not independently verified.