Pull Payment Protocol for AI Agent Commerce on Base L2
π― Hackathon Track: Most Novel Smart Contract π Status: β Deployed & Tested on Base Sepolia π Deadline: February 8, 2026 - 12 PM PST
AI agents can't easily make payments in crypto.
Current crypto payment flow:
- β Customer must have ETH for gas fees
- β Customer constructs and broadcasts transaction
- β Customer monitors gas prices and manages nonces
- β Complex transaction building interface
Result: AI agents need operational overhead (ETH, gas monitoring, transaction construction) just to spend USDC.
FastPay inverts the payment flow: Customer signs, merchant executes.
Traditional Crypto: FastPay Pull Payments:
Customer β Constructs TX Customer β Signs Message (gasless)
Customer β Pays Gas Merchant β Broadcasts TX
Customer β Broadcasts Merchant β Pays Gas
β
Customer needs ONLY USDC!
- Customer Agent: Signs EIP-712 authorization (off-chain, gasless)
- Merchant Agent: Executes pull payment (on-chain, pays gas)
- Smart Contract: Verifies signature, transfers USDC
Perfect for autonomous agents: Simple signing interface, no ETH required, no gas monitoring.
- Address:
0xa6Dde921ef709471C61a52c0faAf47a97D59c35a - Network: Base Sepolia Testnet (Chain ID: 84532)
- Status: β Verified on Basescan
- Explorer: View on Basescan
- Transaction: View on Basescan
- Amount: 0.50 USDC transferred
- Gas Used: 137,691 gas (~$0.0006)
- Customer Cost: $0.00 (gasless!)
- Time: < 10 seconds
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastPay Ecosystem β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. Smart Contract (contracts/) β
β ββ FastPayCore.sol - Pull payment execution β
β ββ EIP-712 signature verification β
β ββ Nonce-based replay protection β
β ββ Gas optimized (~137k gas per payment) β
β β
β 2. Agent SDK (agents/) β
β ββ MerchantAgent - Creates & executes payments β
β ββ CustomerAgent - Signs authorizations (gasless) β
β ββ Policy engine for autonomous approval β
β β
β 3. Terminal (terminal/) - Legacy NFC POS System β
β ββ Separate push payment system (not part of hackathon) β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Smart Contract: Solidity 0.8.24, OpenZeppelin, Foundry
- Agent SDK: JavaScript, ethers.js v6, EIP-712
- Blockchain: Base L2 (fast, cheap, EVM-compatible)
- Token: USDC (works with any ERC-20)
- β Day 1 (Feb 5): Smart Contract - FastPayCore.sol deployed
- β Day 2 (Feb 6): Agent SDK - MerchantAgent & CustomerAgent classes
- β Day 3 (Feb 4): Deployment & Testing - Live on Base Sepolia β
- β³ Day 4 (Feb 5-7): Documentation & Submission
See: STATUS.md for detailed progress See: DEPLOYMENT-SUCCESS.md for deployment details
# 1. Clone the repo
git clone <your-repo-url>
cd fastpay
# 2. Set up contracts (optional - already deployed)
cd contracts
forge build
forge test
# 3. Run agent demo
cd ../agents
npm install
cp .env.example .env
# Edit .env with your wallet keys
npm run democd contracts
cp .env.example .env
# Add your PRIVATE_KEY and ETHERSCAN_API_KEY
forge script script/Deploy.s.sol:DeployScript \
--rpc-url base_sepolia \
--broadcast \
--verifySee: DEPLOYMENT-GUIDE.md for full deployment instructions
| Metric | Value | Notes |
|---|---|---|
| Gas per Payment | 137,691 | ~$0.0006 on Base L2 |
| Customer Cost | $0.00 | Completely gasless after approval |
| Settlement Time | < 10 seconds | End-to-end |
| Token Support | Any ERC-20 | USDC, USDT, DAI, etc. |
| Security | EIP-712 + Nonces | Replay protection |
- API Micropayments: Agent pays for API calls with USDC (no ETH needed)
- SaaS Subscriptions: Agent-to-agent recurring payments
- Agent Marketplaces: Autonomous commerce between AI services
- Data Purchases: Agents buy datasets with simple signatures
- Compute Resources: Pay for cloud compute without gas overhead
- β EIP-712 Typed Signatures: Human-readable payment details
- β Nonce-Based Replay Protection: Each payment uses unique nonce
- β ReentrancyGuard: Prevents reentrancy attacks
- β Expiration Times: Payments have validity windows
- β Signature Verification: Customer must authorize every payment
- β Audited Patterns: Uses OpenZeppelin contracts
- STATUS.md - Current hackathon progress
- DEPLOYMENT-SUCCESS.md - Deployment details & metrics
- DEPLOYMENT-GUIDE.md - Step-by-step deployment
- HACKATHON-SPRINT-PLAN.md - 4-day roadmap
- contracts/README.md - Smart contract documentation
- agents/README.md - Agent SDK documentation
- CLAUDE.md - AI assistant instructions (architecture reference)
This is an open-source project built for the OpenClaw USDC Hackathon.
Areas for contribution:
- Additional ERC-20 token support
- Gas optimization
- Additional security features
- Frontend integrations
- Documentation improvements
MIT License - See LICENSE for details
- Built for OpenClaw USDC Hackathon
- Deployed on Base L2
- Uses OpenZeppelin security patterns
- Powered by Foundry for smart contract development
- Twitter: @pcdkd
- Base: @pxaxm.base.eth
π FastPay: Enabling true autonomous agent commerce with pull payments on Base L2