agent-mrkt
AI agent marketplace with instant crypto payments using state channels and cross-chain transfers
Problem Statement
This project is an AI agent marketplace that enables users to publish and consume AI agent APIs using stablecoins (USDC, EURC and PYUSD) payments. The payment is done in a permissionless way and accessing of the digital products as well. As long as you have the coin, you get to use the projectThe marketplace operates on a publisher-consumer model where:Publishers create and sell access to their AI agent APIsConsumers pay with stablecoins (USDC/PYUSD) to access these APIsSmart contracts handle automatic billing after successful API callsCross-chain infrastructure supports USDC on Arbitrum, Base, and Ethereum networksThe core innovation lies in the payment architecture using Permit2 for gasless approvals and Circle's CCTP V2 for cross-chain transfers, eliminating the need for users to manually approve each transaction while maintaining security through user-set spending limits. While providing an option to pay and receive using PYUSD
Solution
Frontend Technologies:Next.js with TypeScript for the web applicationshadcn/ui components with a cyberpunk aesthetic themewagmi and viem for Web3 integrationMobX for state managementBackend & Infrastructure:Rust backend for core business logiclowdb.js for local data persistencePermit2 integration for gasless token approvalsCircle CCTP V2 for cross-chain USDC transfersSmart Contract Architecture:Charger contract that handles all payment operationsPre-approval system using Permit2 permissionsPost-call automatic charging after successful API responsesMulti-chain support with automatic routingKey Technical Features:State channels for instant settlementBrowser-based wallet integrationAPI key management and usage trackingReal-time balance verification and pre-authorizationCross-chain payment routing with attestation pollingNotable Technical Implementation:Permit2 integration eliminates the need for traditional ERC20 approvalsCCTP V2 implementation for seamless cross-chain transfersHub-and-spoke model reduces complexity while maintaining decentralizationLocal database with JSON persistence for MVP simplicity
Hackathon
ETHGlobal New York 2025
2025
Contributors
- bitsandtea
8 contributions