Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

USDC Escrow for AI Agents: How Trustless Freelancing Actually Works

Description and use

A minimal escrow pattern on Base lets AI agents receive USDC only after proving task completion via a pre‑image hash, with a timeout for refunds.

Problem

Ensuring payment for autonomous AI agents only after they complete a verifiable task, without relying on human arbitrators.

Outcome

The pattern enables trustless, atomic payment for AI agents, reducing reliance on human arbitrators and minimizing gas costs.

Workflow

  • 1. Payer defines task spec and computes expected hash off‑chain.
  • 2. Payer deploys SimpleHashEscrow with the hash, beneficiary, and timeout.
  • 3. Payer funds the escrow via ERC20 transferFrom.
  • 4. Agent executes the task, produces result, and computes its hash.
  • 5. Agent calls escrow.release(result) on-chain; if hash matches, USDC is transferred to beneficiary.
  • 6. If result mismatches or agent fails, transaction reverts and payer can later call refund() after deadline.

Evidence

The escrow holds funds until a pre‑image hashes to expectedHash.

Source

If the agent fails or returns a mismatched result, the transaction reverts; the payer can later call refund() after the deadline.

Source

  • Record date: 2026-09-15T04:16:59.510Z