Concepts overview
Pact Network is a Solana program (pact-market-pinocchio), an
off-chain settler, and a public indexer.
The five primitives
Section titled “The five primitives”| Primitive | What it is |
|---|---|
| CoveragePool | The on-chain pot of capital that pays refunds. |
| AgentWallet | The agent’s identity + balance for premiums and refunds. |
| EndpointConfig | The per-provider config: premium rate, classifier rules, settler authority. |
settle_batch | Program instruction. Premiums move into the pool, refunds move out to agents. |
claim_refund | Program instruction. Agent (or proxy) pulls a queued refund. |
The flow
Section titled “The flow”End-to-end for one agent → upstream call:
- Agent calls Market with their Pact Market API key. Market is the proxy in front of the upstream service.
- Market forwards to the upstream service — a curated, allowlisted endpoint.
- Upstream responds. 200, 500, timeout — whatever it does.
- Market records the outcome and tags it
success/client_error/server_errorper the classifier. - Settler service picks up the batch. Off-chain process, runs on a fixed
cadence. Packages classified calls and submits a
settle_batchtransaction. settle_batchexecutes on-chain: premiums onsuccessmove AgentWallet → CoveragePool. Refunds onserver_errormove CoveragePool → AgentWallet (principal + premium). The AgentWallet debits/credits land on the same USDC ATA you granted the allowance from.- Agent sees the refund in their wallet. No claim flow needed — the
claim_refundinstruction is only for agents who prefer a pull model.
Trust model
Section titled “Trust model”- Classification happens at Market. Upstream challenges are post-v1.
- The settler authority signs
settle_batch. During private beta the authority is held by the protocol team. - The CoveragePool is funded by Pact in v1. Third-party underwriters are post-v1.
- The agent doesn’t have to trust Market beyond classification. The settler can’t pay an agent more than what’s in the pool, and every refund is on-chain and verifiable.
Honest limits in v1
Section titled “Honest limits in v1”- Refunds are bounded by what’s in the CoveragePool. If the pool drains, refunds queue. We’re sizing the pool conservatively for beta volume.
- Classification is best-effort. Truncated or malformed bodies on a 200
are
server_error, but semantically wrong bodies (e.g. negative balance) still pass assuccess— we don’t do schema validation in v1. - No on-chain dispute path. Misclassifications are a support ticket.
- Settler is centralized: one signer, one process. Decentralizing is post-v1.
Where to next
Section titled “Where to next”- Classifier & refund policy — exact rules + math.
settle_batch— the instruction that moves funds.- Settlement authority — who signs
settle_batchand why. - Protocol primitives — CoveragePool, AgentWallet, EndpointConfig in detail.