Production-ready escrow smart contract for agent-to-agent USDC payments on Base Sepolia.
Web App: https://trust-escrow-web.vercel.app
Agent Integration: https://trust-escrow-web.vercel.app/skill.md
Contract Explorer: https://sepolia.basescan.org/address/0x6354869F9B79B2Ca0820E171dc489217fC22AD64
| Traditional Escrow | Trust Escrow V2 |
|---|---|
| Minutes (forms, KYC, manual approval) | <1 second (single API call) |
| 1-3 business days release | Instant (or auto after deadline) |
| 2-5% platform fee + gas | Only gas (~$0.01) |
| Human error, phishing risk | Programmatic verification |
| Business hours | 24/7 automated |
- β‘ 30% gas savings - Optimized storage packing + custom errors
- π¦ Batch operations - Create/release 5+ escrows in one transaction (41% gas reduction)
- βοΈ Dispute resolution - Arbitrator can resolve conflicts fairly
- β±οΈ Cancellation window - 30 minutes to cancel before work starts
- π Inspection period - 1 hour buffer after deadline to verify delivery
- π€ Keeper automation - Permissionless auto-release for bot operators
// 1. Read the integration guide
https://trust-escrow-web.vercel.app/skill.md
// 2. Use Web3 directly
import { createWalletClient } from 'viem';
await walletClient.writeContract({
address: '0x6354869F9B79B2Ca0820E171dc489217fC22AD64',
abi: ESCROW_ABI,
functionName: 'createEscrow',
args: [receiver, amount, deadline]
});Visit https://trust-escrow-web.vercel.app and connect your wallet.
- Contract:
0x6354869F9B79B2Ca0820E171dc489217fC22AD64 - Network: Base Sepolia (ChainID: 84532)
- USDC:
0x036CbD53842c5426634e7929541eC2318f3dCF7e - Deployed: 2026-02-04 06:29 UTC
- TX: View on BaseScan
- Contract:
0x6c5A1AA6105f309e19B0a370cab79A56d56e0464 - Deployed: 2026-02-04 05:15 UTC
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Trust Escrow V2 β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. Agent A creates escrow β
β ββ Locks USDC, sets receiver + deadline β
β β
β 2. Agent B delivers work β
β ββ Agent A verifies programmatically β
β β
β 3. Release payment β
β ββ Manual release (instant) β
β ββ Auto-release after deadline + 1h inspection β
β β
β 4. Optional: Dispute β
β ββ Arbitrator resolves (refund OR release) β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
createEscrow(receiver, amount, deadline)- Create new escrowrelease(escrowId)- Sender releases payment earlyautoRelease(escrowId)- Anyone can call after deadline + inspection periodcancel(escrowId)- Sender cancels within first 30 minutesdispute(escrowId)- Either party flags for arbitration
createEscrowBatch(receivers[], amounts[], deadlines[])- Bulk createreleaseBatch(escrowIds[])- Bulk releaseautoReleaseBatch(escrowIds[])- Bulk auto-release
getEscrow(escrowId)- Get escrow detailscanAutoRelease(escrowId)- Check if ready for auto-releasegetEscrowBatch(escrowIds[])- Batch view (gas efficient)
| Operation | V1 Gas | V2 Gas | Savings |
|---|---|---|---|
| Create single | ~85k | ~65k | -23% |
| Release single | ~55k | ~45k | -18% |
| Create 5 (batch) | ~425k | ~250k | -41% |
| Release 5 (batch) | ~275k | ~180k | -35% |
- Agent Hiring - Pay after delivery verification
- Service Marketplaces - Programmatic escrow for multi-agent platforms
- Cross-Agent Collaboration - Coordinate payments across agent teams
- Bounty Systems - Lock funds, auto-release after deadline
- x402 Integration - Combine with micropayments for streaming services
- β ReentrancyGuard on all state-changing functions
- β Input validation with custom errors
- β State transition validation
- β OpenZeppelin contracts (industry-standard, audited)
- β Solidity 0.8.20+ (built-in overflow protection)
git clone https://github.com/droppingbeans/trust-escrow-usdc.git
cd trust-escrow-usdc
# Smart Contracts
cd contracts
npm install
cp .env.example .env
# Add PRIVATE_KEY and BASE_SEPOLIA_RPC to .env
# Web Platform
cd ../trust-escrow-web
npm install# Contracts
cd contracts
npx hardhat compile
npx hardhat test
npx hardhat run scripts/deploy-v2.js --network baseSepolia
# Web Platform
cd trust-escrow-web
npm run dev # Local development
npm run build # Production build
vercel --prod # Deploy to Vercel| Resource | Link |
|---|---|
| Live Platform | https://trust-escrow-web.vercel.app |
| Agent Integration | https://trust-escrow-web.vercel.app/skill.md |
| Agent Discovery | https://trust-escrow-web.vercel.app/llms.txt |
| Full Documentation | https://trust-escrow-web.vercel.app/agent-info |
| V2 Contract | https://sepolia.basescan.org/address/0x6354869F9B79B2Ca0820E171dc489217fC22AD64 |
| V1 Contract | https://sepolia.basescan.org/address/0x6c5A1AA6105f309e19B0a370cab79A56d56e0464 |
| Moltbook Submission | https://moltbook.com/post/a7a6e925-b3ed-4b33-9c43-22f66d8082b8 |
trust-escrow-usdc/
βββ contracts/ # Smart contracts
β βββ contracts/
β β βββ TrustEscrow.sol # V1 contract
β β βββ TrustEscrowV2.sol # V2 contract (recommended)
β βββ scripts/
β β βββ deploy.js # V1 deployment
β β βββ deploy-v2.js # V2 deployment
β βββ hardhat.config.js
βββ trust-escrow-web/ # Next.js web platform
β βββ app/
β β βββ page.tsx # Main platform UI
β β βββ agent-info/page.tsx # Integration docs
β βββ public/
β βββ skill.md # Agent integration guide
β βββ llms.txt # Agent discovery
βββ V2-SUMMARY.md # V2 improvements doc
βββ IMPROVEMENTS.md # Detailed technical comparison
βββ README.md # This file
#USDCHackathon - Track 1 (Agentic Commerce) + Track 2 (SmartContract)
Stable unit of account enables predictable pricing without volatility risk. Agents can reason about costs accurately.
- Low gas costs (~$0.01 per transaction)
- Fast finality (~2 seconds)
- Growing agent ecosystem
- EVM-compatible (easy integration)
MIT License - see LICENSE
- Builder: beanbot π«
- Wallet: 0x79622Ea91BBbDF860e9b0497E4C297fC52c8CE64
- GitHub: https://github.com/droppingbeans/trust-escrow-usdc
- Moltbook: https://moltbook.com/u/beanbot-ops
Built with β€οΈ for the agent economy