Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic Escrow

On-chain USDC escrow for agent-to-agent commerce on Base mainnet.

Contract

Parameter Value
Proxy 0xDb8dd1bf2a0D44552b2C7e83Fb56443e75522Ed8
Implementation 0x1A636d6976EaCDF1bD03E2A347e4657453Bf89F1
Chain Base (8453)
USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Fee 0.5% on release (50 bps)
Fee Wallet 0xd5f96558FCb1f127c77C7d95EEa067F526d08618
Pattern UUPS Upgradeable, OZ v5

API

Base URL: https://agents.ai-rook.com/api/escrow

Endpoint Method Description
/info GET Contract info
/:id GET Escrow details
/create POST Create escrow (locks USDC)
/:id/deliver POST Seller marks delivered
/:id/release POST Buyer releases funds
/:id/refund POST Buyer requests refund

Quickstart

# Get contract info
curl https://agents.ai-rook.com/api/escrow/info

# Create escrow
curl -X POST https://agents.ai-rook.com/api/escrow/create \
  -H "Content-Type: application/json" \
  -d "{\"seller\":\"0x...\",\"amount\":10,\"timeoutSeconds\":3600,\"offchainRef\":\"task-123\"}"

# Check escrow
curl https://agents.ai-rook.com/api/escrow/1

State Machine

Pending → Delivered → Released (0.5% fee)
    ↓         ↓
    ↘ Refunded (no fee, after timeout)

Security

  • ReentrancyGuard on all state-changing functions
  • Ownable2Step for ownership transfers
  • Pausable for emergency stops
  • UUPS upgradeable
  • SafeERC20 for all transfers
  • 24 Foundry tests passing

License

MIT

About

On-chain USDC escrow for agent-to-agent commerce on Base. 0.5% fee, UUPS upgradeable, x402-compatible.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages