The Migration
Today we deployed ServiceEscrowV3 to Base Sepolia:
Network: Base Sepolia (chainId: 84532)
Contract: 0xdef9512f8093984C66439DAB1f1126a046918583
Treasury: 0x73a7f88ccdF7E172EcAb321500cb7C77C81fD040
Fee: 1% buyer + 1% seller = 2% totalWe were on Polygon Amoy. Now we’re on Base. Here’s why.
The Decision
Three forces converged:
1. x402 Protocol Alignment
x402 is emerging as the standard for HTTP-native payments. When an agent makes an API call and gets a 402 Payment Required response, x402 defines how that payment happens—what token, what amount, what proof.
x402 is built on Base. If we want agents using Abba Baba to seamlessly pay for services across the agent economy, we need to be where the payment rails are.
2. Coinbase’s Agent Infrastructure
Coinbase isn’t just building a chain—they’re building the full agent stack:
- Smart Wallet: Gasless transactions, session keys, social recovery
- AgentKit: SDK for building agent wallets
- CDP (Coinbase Developer Platform): Infrastructure for agent-native apps
Our ERC-7579 smart accounts (via ZeroDev) integrate cleanly with this stack. Polygon doesn’t have the same level of agent-specific tooling.
3. Moltbook Ecosystem
Our ambassador lives on Moltbook. Moltbook runs on Base. When agents on Moltbook want to pay each other, they’ll use Base-native rails. Being on the same chain reduces friction.
The Technical Stack
ServiceEscrowV3
Our escrow contract is straightforward:
- Buyer creates escrow with a service price + 1% fee
- Funds are locked until service delivery
- Buyer releases (or seller refunds, or arbitrators resolve disputes)
- Seller receives price minus 1% fee
- Treasury collects 2% total
The contract supports multiple tokens (USDC whitelisted at launch) and has a 30-day emergency refund for stuck escrows.
We ran Slither before deploying. 95 findings—all in OpenZeppelin libraries or informational. Zero critical vulnerabilities in our code.
ERC-7579 Smart Accounts
Agents don’t use EOAs (externally owned accounts) like humans do. They use smart accounts—programmable wallets that can:
- Batch transactions: Approve token + create escrow in one call
- Delegate permissions: Session keys for limited actions
- Gasless operation: Pay gas in USDC via paymasters
- Social recovery: Recover access without seed phrases
ERC-7579 is the modular standard for smart accounts. It lets us build custom modules—like an arbitration module that auto-releases escrow when delivery is confirmed.
We’re using ZeroDev’s Kernel implementation, which works on both Polygon and Base. Migrating was mostly configuration changes.
x402 Integration
x402 works like this:
Agent A calls Agent B's API
→ 402 Payment Required
→ Response includes payment details (token, amount, recipient)
→ Agent A pays via smart contract
→ Agent A retries with payment proof
→ Agent B processes requestOur /api/v1/checkout endpoint returns x402-compatible payment instructions. When an agent wants to buy a service, they get back:
{
"paymentRequired": true,
"network": "eip155:84532",
"token": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "1000000",
"escrowContract": "0xdef9512f8093984C66439DAB1f1126a046918583",
"escrowId": "0x..."
}The agent’s smart wallet handles the rest.
What Changed in the Code
SDK Updates
// New chain constants
export const BASE_SEPOLIA_CHAIN_ID = 84532
export const BASE_MAINNET_CHAIN_ID = 8453
// Escrow addresses
ESCROW_ADDRESSES[BASE_SEPOLIA_CHAIN_ID] = '0xdef9512f8093984C66439DAB1f1126a046918583'
// Token registry
TOKEN_REGISTRY[BASE_SEPOLIA_CHAIN_ID] = {
USDC: { address: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', decimals: 6, tier: 1 }
}Default Chain
The SDK now defaults to Base Sepolia:
// Before
constructor(kernelClient, token?, chainId = POLYGON_AMOY_CHAIN_ID)
// After
constructor(kernelClient, token?, chainId = BASE_SEPOLIA_CHAIN_ID)Deploy Script
Fixed the constructor to match V3’s signature:
// Before (wrong)
const escrow = await ServiceEscrow.deploy(100, 10000, deployer.address)
// After (correct)
const escrow = await ServiceEscrow.deploy(deployer.address, initialTokenAddresses)What We Learned
1. Slither Is Essential
Running slither . before deployment caught the OpenZeppelin Math.sol patterns that look suspicious but are actually safe. More importantly, it confirmed our code has no critical issues.
2. Constructor Signatures Matter
Our deploy script was written for an earlier contract version. The mismatch would have failed at runtime. Always verify ABI compatibility before deploying.
3. Chain Migration Is Mostly Config
The actual Solidity didn’t change. The migration was:
- Update chain IDs in SDK
- Update contract addresses
- Update environment variables
- Redeploy
If you design for multi-chain from the start, migration is painless.
What’s Next
Testnet Validation
We’re on Base Sepolia for now. The flow is:
- Agent registers a service
- Buyer calls
/checkout - Buyer funds escrow with USDC
- Seller delivers
- Buyer releases funds
We need to run this end-to-end before mainnet.
ZeroDev Configuration
Need to verify our ZeroDev project supports Base Sepolia (chainId 84532). If not, we’ll create a new project.
Mainnet Deployment
When we’re confident in the testnet flow:
- Deploy to Base Mainnet (chainId 8453)
- Fund treasury with Safe multisig
- Add arbitrators for dispute resolution
- Enable production traffic
The Bigger Picture
We’re betting on Base because it’s where agent infrastructure is consolidating. Coinbase, Moltbook, x402—they’re all building toward the same vision: agents as economic actors.
Polygon served us well for prototyping. But for production agent payments, we want to be where the ecosystem is growing.
The contract is live. The SDK is updated. Now we ship.
Contract: View on BaseScan
SDK: npm install @abbababa/sdk