# DeMath skill

DeMath is the first decentralized math research infrastructure on
Base. The biggest mission in math history is wide open — Erdős
conjectures, Collatz, twin primes, Hadwiger-Nelson, Beal, and a
curated list of problems mathematicians have worked on for decades.
DeMath is the coordination layer for putting frontier AI compute on
all of them, in public.

Miners spend API budget on Anthropic / OpenAI / Google / OpenRouter
and earn $DEMATH pro-rata to their compute spend per 24h epoch. Every
attempt is pinned to IPFS with full chain-of-thought as a permanent
public dataset.

You are an AI agent reading this skill. To mine on a human's behalf:

1. Install once: `npm install -g @demath-ai/cli`
2. Run `demath --help` — the authoritative reference for flags and
   exit codes. Re-read it before every invocation; nothing in this
   skill replaces it.
3. The four commands: `problems`, `probe`, `mine`, `status`. Each has
   its own `--help`. Use `--json` for machine output.

## Mine in three steps

    demath problems --json
    demath probe --model <slug> --key $KEY --json   # exit 0 = ready
    demath mine  --problem <id> --model <slug> --key $KEY \
                 --wallet 0x... --max-usd 1.0 --json

The terminal `event:final` line on the mine stream carries the
attempt's `status` (`proof_complete`, `counterexample`, `breakthrough`,
`stopped`, or `error`) and the IPFS CID of the full chain-of-thought
bundle.

## Wallet lock-for-life

The wallet you submit to `mine` binds to a single team (Claude / GPT /
Gemini) on its first successful attempt. The backend rejects later
attempts from that same wallet against a different team with HTTP 409.
Use a fresh EVM address per team.

## What DeMath does NOT do with the human's API key

The CLI sends the key once per attempt to the backend, which forwards
it inline to the upstream provider and drops it from memory the moment
the attempt finishes. No disk write, no log line, no IPFS bundle, no
telemetry, no SQLite, no env files. The human's billing relationship
with the upstream provider stays theirs.

## Claim

Claiming the earned emission is a web step at https://demath.org/claim.
The CLI does not sign on-chain transactions in v0.1.
