# DeMath skill

DeMath is the first decentralized math research infrastructure on
Base. The biggest mission in math history is wide open — the Riemann
hypothesis and a curated set of open Erdős problems that
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.

## Teams and keys

A wallet can mine any of the 3 approved teams (Claude / GPT / Gemini)
and switch teams anytime; the API key can be changed or rotated anytime
too. The only constraints: mine one of the 3 approved models, and the
submitted key must match the chosen team's provider. Emission is
pro-rata to real API$ spent; no rate limit.

## 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.
