Architecture
The pieces, and how a submission becomes a payout.
Components
| Component | Role |
|---|---|
| Web app (Next.js) | Owner app, contributor pages, public audit pages and verification, APIs. Holds no signing key. |
| Worker | Runs the submission pipeline and the round job from a Postgres-backed queue. Owns the agent wallet. |
| Postgres | Programs, submissions, decisions, payouts, and an append-only audit log. |
| Circle | The agent's smart-contract wallet, gas sponsorship, and contract execution with idempotency keys. |
| Arc | The vault factory and one vault per program. Payouts and gas in USDC. |
A submission
A round
Every step reads the chain and the database before acting, so a crashed or retried job resumes where it stopped without paying twice.
Identifiers
| Value | Derivation |
|---|---|
programId, roundId, contributorId | keccak256("misthos:<kind>:" + uuid) |
payoutId | keccak256(abi.encode(programId, roundId, contributorId)) |
decisionHash | keccak256 of the record's canonical JSON |
Payout decisionHash | keccak256 of the sorted record hashes it pays, concatenated |
Round decisionRoot | The same, over every record in the round |