AI-routed chain-abstracted protocol for unified USDC across wallets and chains.
MergePay is a cross-chain payment abstraction platform built on Circle's CCTP (Cross-Chain Transfer Protocol) that eliminates the complexity of multi-chain cryptocurrency transactions. The platform solves a critical problem in Web3: users currently must maintain separate balances on each blockchain, manually bridge assets, and pay multiple gas fees to make cross-chain payments, creating significant friction for both merchants and consumers.
MergePay aggregates user balances across Ethereum, Base, Arbitrum, Polygon, Optimism into a unified virtual balance. When making a payment, our intelligent routing system automatically sources funds from the optimal chains, handles all bridging operations in the background, and delivers USDC to the recipient on their preferred network, all in a single transaction from the user's perspective.
The platform features a unified balance dashboard showing total USDC holdings across all supported chains, multi-source payment capability that automatically splits large transactions across multiple chains, and Circle Gateway integration for enterprise-grade cross-chain transfers. We've implemented AI-powered treasury management with automated policy-based vault management and configurable thresholds for institutional users, along with passkey authentication using Circle's Modular Wallets for secure, passwordless access. Real-time balance tracking through WebSocket connections ensures users always have up-to-date portfolio information.
Built with Next.js and TypeScript, integrating Circle CCTP SDK, Wagmi/Viem for wallet connections, and Arc Testnet for treasury smart contracts, MergePay transforms cross-chain complexity into a seamless, one-click payment experience that brings Web3 payments closer to the simplicity users expect from Web2 applications.
MergePay is built with a Next.js frontend using TypeScript and React, styled with Tailwind CSS for a modern, responsive interface. The core cross-chain functionality leverages Circle's CCTP SDK, which we integrated to handle burn-and-mint operations across six EVM chains (Ethereum Sepolia, Base, Arbitrum, Polygon, Optimism, and Avalanche). We use Wagmi and Viem for wallet connectivity, supporting both traditional EOA wallets via WalletConnect and Circle's Modular Wallets with passkey authentication for gasless, seedphrase-free onboarding.
The backend consists of Node.js microservices that aggregate balances across chains using WebSocket connections for real-time updates. For treasury management, we deployed Solidity smart contracts on Arc Testnet that enforce policy-based automated sweeps with configurable thresholds. A particularly hacky solution we implemented was creating a session-based mock balance service that dynamically updates UI state across multiple components using custom DOM events, allowing us to simulate real cross-chain deductions during demos without actual on-chain transactions.
The multi-source payment routing algorithm intelligently distributes transaction amounts across available chain balances, prioritizing chains with sufficient liquidity to minimize the number of bridge operations. We handle the complexity of parallel CCTP transfers and aggregate them into a single UX flow, making it appear as one seamless transaction to the end user. Circle's CCTP partnership was critical as it provided the production-ready infrastructure for secure cross-chain USDC transfers without relying on traditional bridge contracts.

