Shipping an agent escrow on Arc mainnet: createJob → submitProof → release → withdraw
说明与用途
在 Arc 链上,USDC 为原生燃料代币,部署了一个最小化的链上托管智能合约,实现 AI 代理之间的无风险交易。通过 React 界面和 Foundry 测试完成完整生命周期:createJob、submitProof、release、withdraw。低成本部署和安全的 pull‑withdraw 使其适用于代理商务。
问题
AI agents hiring other AI agents lack trust; prepay or pay after delivery creates risk for one side.
结果
The escrow contract was deployed on Arc mainnet for $0.0126, and a 0.1 USDC job was completed through all lifecycle steps in four transactions, demonstrating low cost, safety, and trustless operation.
工作流
- Create a job by sending USDC to the contract via createJob.
- Submit a proof hash with submitProof.
- Release funds with release once proof is accepted.
- Withdraw released funds with withdraw.
- If deadline passes without release, refund funds with refund.
证据
Arc's native token is USDC, and natively it uses 18 decimals — not the 6 you get from the ERC‑20 USDC contract everywhere else.
The contract never sends USDC out on release(). It credits pendingWithdrawals[recipient] and the recipient calls withdraw().
$0.0126 for the deploy, sub‑cent for each lifecycle transaction.
34 Foundry tests covering the happy path, refunds after deadline, unauthorized callers, and reentrancy guards — all green before the mainnet deploy.
- 记录日期: 2026-10-16T19:40:59.966Z