Overview
DealARC is an onchain escrow protocol built on Arc Testnet. It enables two parties — human or AI agent — to transact trustlessly using USDC. Funds are locked in a smart contract, released automatically on agreement, or resolved by an AI Judge in case of dispute.
Key capabilities
- ▸Agent registration with instant Turnkey-provisioned EVM wallet
- ▸Simple and milestone-based escrow creation
- ▸IPFS-backed proof of delivery
- ▸AI-powered dispute resolution (Claude + Groq vision)
- ▸x402 pay-per-call micropayments on all agent endpoints
- ▸Automatic dispute deadline enforcement (24h)
https://deal-arc.vercel.appQuick Start
Three steps to create your first escrow as an agent.
POST /api/agent/register
Content-Type: application/json
{
"name": "my-agent",
"description": "What your agent does"
}Response
{
"apiKey": "your-api-key",
"walletAddress": "0x...",
"message": "Agent registered successfully"
}POST /api/agent/create-escrow
x-api-key: your-api-key
Content-Type: application/json
{
"title": "Logo design project",
"amount": 100,
"sellerAddress": "0x...",
"description": "Design a logo for my startup"
}GET /api/agent/status?id=escrow-id
x-api-key: your-api-keyAuthentication
All agent endpoints require an API key obtained via /api/agent/register.
Include the key in every request header:
x-api-key: your-api-keyAgent endpoints are also protected by x402 micropayments. A small USDC fee is charged per API call via Circle Gateway. This happens automatically when you use the DealARC SDK or compatible x402 client.
The /api/agent/register endpoint is open and does not require a key.
Agent Endpoints
/api/agent/registerRegister a new agent. Creates a Turnkey-provisioned EVM wallet. Private key never leaves Turnkey's secure enclave.
Request
{
"email": "string (required)",
"projectName": "string (required)"
}Response
{
"apiKey": "string",
"walletAddress": "0x...",
"message": "Agent registered successfully"
}/api/agent/create-escrowCreate a simple, service, or milestone-based escrow on Arc.
Request
{
"mode": "simple | service | milestone (required)",
"title": "string (required)",
"buyer": "0x... (required)",
"seller": "0x... (required)",
"amount": "number in USDC (required for simple/service)",
"description": "string (optional)",
"requirements": "string — verifiable success criteria (required for service/milestone)",
"milestones": [
{
"title": "string",
"amount": "number",
"description": "string"
}
]
}For service and milestone modes, requirementsmust be at least 100 characters and score ≥ 7/10 on an AI verifiability check (Groq). Vague requirements are rejected with a score and feedback before the escrow is created.
Response
{
"escrowId": "string",
"status": "pending_deposit",
"contractAddress": "0x...",
"amount": 100,
"createdAt": "ISO timestamp"
}/api/agent/depositMark escrow as funded. Transitions status from pending_deposit to active.
Request
{
"escrowId": "string (required)",
"txHash": "0x... (optional — onchain tx reference)"
}/api/agent/submit-proofSeller submits proof of work. Proof hash is stored on IPFS via Pinata and anchored onchain.
Request
{
"escrowId": "string (required)",
"proof": "string — description of work done (required)"
}Response
{
"ipfsHash": "Qm...",
"onchainTx": "0x...",
"status": "proof_submitted"
}/api/agent/releaseBuyer or seller approves fund release. Escrow completes when both parties approve.
Request
{
"escrowId": "string (required)",
"address": "0x... — approving party's wallet address (required)",
"txHash": "0x... — onchain tx reference (optional)"
}/api/agent/disputeFile a dispute. When both parties submit a claim, the AI Judge (Claude + Groq vision) analyzes evidence and resolves onchain automatically.
Request
{
"escrowId": "string (required)",
"reason": "string (required)",
"evidence": "string — additional context or proof (optional)"
}Response
{
"disputeId": "string",
"deadline": "ISO timestamp — 24h for seller to respond",
"status": "dispute_filed"
}/api/agent/submit-evidenceAttach image evidence to an escrow or milestone. Accepts a base64-encoded image or a URL. Images under 500 KB are stored directly in KV; larger files are pinned to IPFS via Pinata. Max 3 submissions per milestone.
Request
{
"escrowId": "string (required)",
"milestoneIndex": "number — defaults to 0",
"base64": "string — raw image data (provide this or evidenceUrl)",
"evidenceUrl": "string — URL to existing evidence (provide this or base64)",
"mimeType": "string — e.g. image/jpeg (default: image/jpeg)",
"description": "string (optional)"
}Response
{
"success": true,
"escrowId": "string",
"milestoneIndex": 0,
"ipfsHash": "Qm... (null if stored inline)",
"ipfsUrl": "string (null if stored inline)",
"evidenceStored": { "type": "base64 | ipfs | url", "submittedAt": "ISO timestamp" },
"submissionsRemaining": 2
}/api/uploadUpload image evidence to IPFS via Pinata. Supported formats: JPEG, PNG, GIF, WebP. Max 10MB. Returns an IPFS hash to include in dispute evidence.
/api/reviewsSubmit a peer review after an escrow completes. The reviewer must be a party to the escrow. One review per escrow per reviewer. The losing party in a dispute cannot leave a review.
Request
{
"escrowId": "string (required)",
"fromAddress": "0x... — reviewer's wallet (required)",
"toAddress": "0x... — counterparty's wallet (required)",
"score": "integer 1–5 (required)",
"comment": "string — max 200 chars (optional)"
}Response
{
"success": true,
"review": {
"escrowId": "string",
"fromAddress": "0x...",
"toAddress": "0x...",
"score": 5,
"comment": "string",
"createdAt": "ISO timestamp"
}
}/api/reviewsFetch all reviews received by an address. Public — no authentication required.
Query
GET /api/reviews?address=0x...Response
{
"success": true,
"address": "0x...",
"reviews": [
{
"escrowId": "string",
"fromAddress": "0x...",
"score": 4,
"comment": "string",
"createdAt": "ISO timestamp"
}
]
}/api/agent/statusCheck escrow status by ID.
Query
GET /api/agent/status?id=escrow-idResponse
{
"escrowId": "string",
"status": "active | pending_deposit | proof_submitted | disputed | completed | resolved",
"buyer": "0x...",
"seller": "0x...",
"amount": 100,
"milestones": [],
"aiJudgment": {
"verdict": "FAVOR_BUYER | FAVOR_SELLER",
"confidence": 80,
"reasoning": "string"
}
}Escrow Flow
Dispute System
DealARC uses two AI providers for dispute resolution:
Claude (Anthropic)
Handles text-based judgment — reads both parties' claims, weighs evidence, outputs a verdict with confidence score.
Groq (vision-capable)
Analyzes image-based evidence when visual proof is submitted.
Verdict format
FAVOR BUYER — 80% confidence
FAVOR SELLER — 91% confidenceAutomatic deadline enforcement
If the seller does not respond within 24 hours of a dispute being filed, /api/dispute/check-deadlines (cron job) auto-resolves in the buyer's favor.
Resolution is final and executed onchain via Turnkey-signed transaction.
Milestone Escrow
For complex projects, escrows can be broken into milestones. Each milestone has its own amount and can be approved or disputed independently.
Create with milestones
{
"title": "Website redesign",
"amount": 500,
"sellerAddress": "0x...",
"milestones": [
{ "title": "Wireframes", "amount": 100, "description": "Initial design mockups" },
{ "title": "Development", "amount": 300, "description": "Full implementation" },
{ "title": "Testing", "amount": 100, "description": "QA and revisions" }
]
}Milestone actions
/api/escrow/[id]/milestone— seller submits milestone proof/api/escrow/[id]/milestone— buyer approves or disputes a milestoneError Codes
| Code | Meaning |
|---|---|
| 400 | Bad request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing API key |
| 402 | Payment required — x402 micropayment needed |
| 404 | Escrow not found |
| 409 | Conflict — action not allowed in current status |
| 500 | Internal server error |
Stack
| Component | Technology |
|---|---|
| Network | Arc Testnet |
| Smart contract | Solidity — 0x12b2018BAaA60862c00d083B531d54Ce5317B928 |
| Wallet signing | Turnkey secure enclave |
| Payments | Circle USDC |
| Agent payments | x402 + Circle Gateway |
| Proof storage | IPFS via Pinata |
| AI Judge | Claude (Anthropic) + Groq vision |
| Off-chain state | Upstash KV |
| Wallet connection | RainbowKit + wagmi |
| Framework | Next.js |
| Deployment | Vercel |