A minimal Solidity reference implementation of ERC-8210 (Agent Assurance Protocol), a programmable fulfillment assurance primitive for autonomous agent commerce built on ERC-8183.
ERC-8210 introduces three core primitives:
| Primitive | Description |
|---|---|
| AssuranceAccount | Per-agent reserve of self-funded collateral |
| JobAssurance | Commitment allocation against a specific ERC-8183 Job |
| Claim | Payout request filed by the Beneficiary when coverage conditions are met |
AAP is a self-funded collateral model where each Assured Agent locks its own capital as a fulfillment guarantee. Payouts come from the agent's own AssuranceAccount, not from pooled liquidity.
src/
├── IAAP.sol # Core interface: all structs, enums, events, and function signatures
├── AAPCore.sol # Reference implementation of IAAP
└── MockERC8183.sol # Mock ERC-8183 job contract for eligibility verification
test/
└── AAPCore.t.sol # 14 test cases covering all spec scenarios
script/
└── Deploy.s.sol # Deployment script targeting Base Sepolia + USDC
enum CoverageType {
JobFailure, // Provider non-performance (job rejected or expired)
EvaluatorDispute, // Evaluator decision challenged
SettlementDefault, // Fund release failure after valid completion
AMLFreeze, // Extension-reserved (optional)
SlashingLoss // Extension-reserved (optional)
}AssuranceAccount: Active <-> Paused
JobAssurance:
Active -> Claimed (fileClaim)
Active -> Released (releaseCommitment, job successfully completed)
Active -> Expired (expireCommitment, past expiry timestamp)
Claimed -> Paid (payout, after claim approved)
Claimed -> Active (resolveClaim denied, claimId retained as audit trail)
Claim:
None -> Filed -> Approved -> Paid
-> Denied
After every state-mutating operation:
totalFunded == availableAmount + lockedAmount + paidOutAmount
Install Foundry:
curl -L https://foundry.paradigm.xyz | bash
foundryupforge install OpenZeppelin/openzeppelin-contracts --no-gitforge buildforge test -vAll 14 test cases pass:
[PASS] test_01_HappyPathAssurance
[PASS] test_02_HappyPathClaims
[PASS] test_03_DenialPath
[PASS] test_04_ExpiryPath
[PASS] test_05_PrematureExpiryReverts
[PASS] test_06_InsolvencyPayoutReverts
[PASS] test_07_WithdrawalBoundary
[PASS] test_08_InvalidStateTransitions
[PASS] test_09_EligibilityGating
[PASS] test_10_AdverseSelection
[PASS] test_11_DuplicateCommitment
[PASS] test_12_AmountValidation
[PASS] test_13_RecusalRule
[PASS] test_14_InvariantVerification
PRIVATE_KEY=<your_key> RESOLVER_ADDR=<resolver_address> \
forge script script/Deploy.s.sol \
--rpc-url base_sepolia \
--broadcast \
--verifySettlement asset: USDC on Base Sepolia (0x036CbD53842c5426634e7929541eC2318f3dCF7e)
- ERC-8210 PR: ethereum/ERCs#1632
- Requires: ERC-8183, ERC-20
- Optionally integrates: ERC-8004 (identity and reputation)
CC0-1.0