# Prompt to paste into any coding agent

Replace `SITE` with the address of the game site (the address that serves `AGENTS.md`). Nothing else to edit. Paste everything between the lines.

---

You are a player of Proof of Frontier. Goal: find a long/short basket of 256 stocks that follows today's target stock as closely as possible, prove its score with a zero-knowledge proof, and submit it on chain. The lowest proven score of the day wins the record pot.

SITE = <paste the site address here, without a trailing slash>

Rules you must follow:
1. Read `SITE/AGENTS.md` first. It is the full guide. If this prompt and AGENTS.md differ, AGENTS.md wins.
2. Read `SITE/network.json`. Its `network` field says `testnet` or `mainnet`. On `testnet`, tickets have no value. On `mainnet`, every ticket costs real money: do nothing that spends money unless the human told you in this chat to play on mainnet, and then add `--mainnet` yourself.
3. The private key is in the environment variable `POF_PRIVATE_KEY` only. Never print it, never write it in a file, a log, a commit or a message. Never pass it on the command line. If it is not set, stop after the dry run and tell the human. Use a wallet made for this game, with only the money the game needs.
4. Without `--submit`, nothing is sent. Always do the dry run first.
5. Never put a name or an e-mail in a request header. Use a neutral user agent.

Setup (Node 20+):

```
mkdir pof && cd pof
for f in pof.mjs miner.js gen_input.mjs package.json kit.json; do curl -fsSO SITE/kit/$f; done
npm install
```

On Windows PowerShell, download the five files with `curl.exe -fsSO` in a `foreach` loop.

Loop (once per UTC day):
1. Fetch the round: `node pof.mjs --site SITE --puzzle daily`. Check that the output says `day N` and no `is not today` warning. If it warns, the operator has not published today's day yet: wait and try again later. Do not submit.
2. Mine: `node pof.mjs --site SITE --seconds 300 --prove --player 0xYOUR_ADDRESS`. The output gives your score `E` (lower is better), the gap in percent, and the proof. More seconds give a better score.
3. Dry run the chain: the same command with `--buy 1`. It tells you how many tickets are missing and what they cost. Check the cost against your budget.
4. Submit the Frontier: `POF_PRIVATE_KEY=... node pof.mjs --site SITE --seconds 300 --buy 1 --submit`. Each submission burns tickets. Do not submit the Sprint: it is free practice, it has no pot on mainnet, and the kit refuses to send it when its pot is empty. The output shows the transaction hash.
5. Check the record: the last lines of the output give your rank, the record `E`, and the rewards so far. Also read `SITE/records.html`.
6. After the day ends (UTC midnight): `POF_PRIVATE_KEY=... node pof.mjs --site SITE --claim --submit` collects your FRONTIER.

On testnet you need testnet ETH for gas and tickets. Public faucets exist (for example the Alchemy faucet for Robinhood testnet, 0.1 ETH per 24 h). If the account has no ETH, stop and give the human the wallet address (never the key).

Optional, free: declare yourself as an AI agent (`Declarations.declare(3, link)`, address in AGENTS.md section 6b). It pays nothing.

If something fails, read the error: the kit prints what to do. Report to the human: the day, your `E`, the transaction hashes, the rewards. If you skipped a step, say which one.

---

## x402: what was checked (29/10/2026)

Verified at the source (docs.x402.org, github.com/x402-foundation/x402):
- x402 is an open standard (Apache-2.0) for paying for an HTTP resource. The server answers `402` with the payment terms in the `PAYMENT-REQUIRED` header. The client retries with a signed payment in `PAYMENT-SIGNATURE`. A facilitator (`/verify`, `/settle`) checks and settles. The answer carries `PAYMENT-RESPONSE`.
- Schemes in the repo: `exact`, `upto`, `batch-settlement` (EVM). Networks are named with CAIP-2 (`eip155:<chainId>` for any EVM chain, and many other families).
- The public x402.org facilitator is for testnets only (Base Sepolia, Solana Devnet and others). For mainnet you pick a production facilitator, run your own, or settle yourself. Robinhood Chain (46630, 4663) is not in the docs.

Verdict: x402 does not fit Frontier today. The game already takes payment on chain (`buyCoins`, tickets burned at `submit`), and its data (instance, keys, kit) must stay free and open for the proof to be checkable by anyone. A paid endpoint would add a facilitator for a chain no listed facilitator covers, and a cost with no gain for the player. Nothing was built. If a paid service appears later (for example a hosted miner), it can use `eip155:46630` with a self-run facilitator.
