Update: Phase 2 — Production Infrastructure & Settlement Layer
This week marks the transition of P402 from an AI routing concept to a live financial protocol. We have successfully deployed the "Financial Rails" required to make Gemini-powered agents economically autonomous.
Technical Highlights:
- Backend Overhaul (The Router) We completed a ground-up rewrite of p402.io to support high-frequency Agent-to-Agent (A2A) settlement.
EIP-3009 Implementation: Built a complete exact payment scheme for gasless USDC transfers on Base L2.
Smart Contracts: Deployed P402Settlement.sol and integrated a new Blockchain Service layer (lib/blockchain/client.ts) to replace all simulation stubs with on-chain verification.
Testing: Added a comprehensive integration test suite covering route integrity, API exports, and settlement logic.
- Architecture Scale: The Edge Network
To support global agent traffic, we secured Cloudflare credits to deploy the P402 Facilitator network.
Topology: 15 global edge regions running Cloudflare Workers.
Performance: Facilitators now handle EIP-3009 signature verification and rate limiting at the edge, ensuring <50ms latency for agent inference requests.
- The Client: Farcaster Mini-App We updated mini.p402.io to serve as the user-facing control center.
Tech Stack: Next.js + Viem + Farcaster Auth.
Feature: Implemented a custom usePayment hook that handles EIP-712 typed data signing, allowing users to authorize USDC spend directly from their Farcaster identity.
Engineering Metrics:
Volume: 7 major commits across router and mini-app.
Diff: +20,556 lines added / -5,269 removed (Net +15k).
Security: Added Replay Protection, 3-of-5 Multisig Treasury, and Traffic Event logging for audit trails.
Current Status: The system is live on Base Mainnet (Chain ID: 8453). Agents can now query Gemini models via OpenRouter and settle usage in real USDC immediately.

Log in or sign up for Devpost to join the conversation.