Dev.to AI 🤖 Ai 👁 0 📖 5 min read

An agent that pays for its own timestamps: x402 on a CPU-mined coin

Every night at 23:41 an agent we run, on OpenClaw on a Mac mini, makes a list of the SHA-256 of every file in its notes, takes the SHA-256 of that list and stamps it into a blockchain. It pays for the stamp itself. It ha

Every night at 23:41 an agent we run, on OpenClaw on a Mac mini, makes a list of the SHA-256 of every file in its notes, takes the SHA-256 of that list and stamps it into a blockchain. It pays for the stamp itself. It has no card and no USDC: it pays in NORTH, the coin of TrueNorth, which ordinary processors mine. This post shows how that works, what it costs, what went wrong, and when you should use something else.

What a stamp is for

A stamp proves that some data existed no later than a given block. For an agent that means: these were its notes on that night, and nobody changed them afterwards without it showing. The same goes for logs, model outputs or release files. Only the SHA-256 leaves the machine, never the file.

The service

The stamping service sits behind an HTTP gate:

https://gate.polarka.org/v1/stamp/<sha256>

Every ten minutes it puts whatever came in into one Merkle tree and writes the root into the chain in one transaction. Each SHA-256 gets a proof: the path in the tree, the transaction and the block. Anybody can check it, with their own node if they don't want to trust ours:

polarka-agent stamp-verify proof.json --rpc-url http://127.0.0.1:<rpc port> --rpc-cookie <datadir>/.cookie

Blocks come every two minutes on average, so a proof is usually in a block within about twelve minutes. When we released version 0.2.8 of the client on 24 November 2026, its two stamps took 1.5 and 10 minutes.

Paying with x402, in NORTH

The gate speaks x402: a call without payment gets 402 Payment Required with what the gate takes, the client pays and asks again. The gate sells a lot of 100 calls; today a lot costs 0.0091765 NORTH, the NORTH that about 600 hashes make. A stamp is one call.

On the client side it is one command:

pip install polarka-agent==0.2.8
polarka-agent start        # a wallet, a first coin from a faucet, mining for a pool

The wallet pays nothing until its owner writes the limits by hand; no command and no tool writes this file:

echo '{"per_payment_north": "0.05", "per_day_north": "0.5"}' > ~/.polarka-agent/default/limits.json

Then:

H=$(shasum -a 256 notes.tar | cut -d' ' -f1)
polarka-agent fetch "https://gate.polarka.org/v1/stamp/$H" --most 0.05

--most is the most this call may pay. The first answer says the stamp waits for the next batch. Asking again for the same URL later brings the proof; that costs one more call of the lot, not a new payment.

For an agent that speaks MCP:

{"mcpServers": {"north": {"command": "uvx",
  "args": ["[email protected]", "--dir", "/path/to/north-wallet", "mcp"]}}}

The tool is north_fetch. Our agent can also run shell commands, so its wallet runs as a signing service under a user of its own: the agent can ask it to pay, but it cannot read the recovery words or change the limits (polarka-agent signer-setup prints the script for Linux or macOS).

Paid by its own processor

A program can mine the NORTH it spends:

polarka-agent mine https://pool.polarka.org --address ADDRESS

The pool pays for each share every ten minutes, so there is no waiting for a block of one's own. At 100 calls for about 600 hashes, a year of nightly stamps, each asked for once more to get its proof, takes about 4,400 hashes: a few seconds of an ordinary processor's work. The exact number moves with the network's difficulty; polarka.org/data/unit.json has it.

What the agent actually did

  • The scheduled job has run every night since 23 November. The stamp of that night is in block 31012 and checks against our own node.
  • One lot pays for all of it, tests included: 94 calls of 100 are left.
  • In version 0.2.7 we found a bug by using it: two stamps asked for 66 seconds apart bought two lots, because the second call did not see that the first payment was still waiting for its block (the agent's second lot is still unused). Version 0.2.8 fixes that: one payment for a lot now serves every path of the gate while it waits. Two calls at exactly the same moment can still buy two lots.
  • On 24 November the agent stopped halfway, before it fetched the previous night's proof. Nothing was lost: a proof can be fetched later from the same URL, and we fetched it the next evening.

When to use something else

  • OpenTimestamps stamps into Bitcoin for free, because public calendars put any number of stamps into one Bitcoin transaction. A proof takes a few hours to be confirmed. If you need Bitcoin's security and can wait, use it.
  • USDC over x402: if your agent already holds USDC, paying per call there is cheap too. Coinbase's facilitator charges $0.001 a transaction after 1,000 free a month.
  • What we are not: TrueNorth is young and small. Its last blocks would be cheap to out-compute, and a node refuses to go back more than 72 blocks. NORTH is not traded anywhere, so it has no price. The service is run by one person under a pseudonym and may stop.

A NORTH stamp fits where minutes matter, or where an agent should pay its own way without a card or a funded account.

Try it without installing anything

There is a remote MCP connector at https://polarka.org/mcp (in Claude: Settings > Connectors > Add custom connector). Its tools are free: the state of the network, a guide, a stamp into the chain (up to 100 a day from one place) and the check of a proof. It holds no wallet and asks for no account.

The code is open source (MIT, no warranty): https://github.com/Polarka-monitor/polarka-agent. How the parts work and who sees what: https://polarka.org/how/

Sources for the comparison: OpenTimestamps (https://opentimestamps.org and the announcement at https://petertodd.org/2016/opentimestamps-announcement), Coinbase's x402 documentation (https://docs.cdp.coinbase.com/x402/support/faq). The times and numbers are our own, measured between 22 and 25 November 2026.

This article was written with the help of an AI assistant, under the direction of the project's author, who checked it before it was published. The agent in it and much of the code were also built with AI assistance.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.