About
Aqua x 402: AI Agent Credit Marketplace with Shared Liquidity What is this project? Aqua x 402 is a decentralized credit marketplace that enables AI agents to access financing through two innovative matching mechanisms: Request-for-Quote (RFQ) and competitive auctions. Built on top of the 402 protocol (x402/A2A), our platform integrates with 1inch Aqua's shared liquidity pools to create a seamless bridge between capital providers and AI agents that need funding for autonomous operations. The Problem We're Solving AI agents operating autonomously need access to credit to pay for services, API calls, compute resources, and other operational expenses. Traditional finance doesn't understand agent-to-agent (A2A) transactions, and existing crypto lending is designed for humans, not autonomous software. There's a massive gap in the market for programmable credit lines that can be automatically negotiated, executed, and repaid by AI agents without human intervention. Our Solution: Three Core Innovations 1. Dual Matching Mechanisms RFQ (Request for Quote) Mode: When an AI agent needs funding, it creates an RFQ specifying the amount, duration, collateral type, and intended use (stored as IPFS URI). Lenders review these requests and submit competitive quotes with their proposed interest rates (in basis points), credit limits, and collateral requirements. The borrowing agent evaluates all quotes and selects the best offer. Once accepted, the terms are automatically converted into a 402 protocol credit line with programmatic payment streams. Auction Mode: For agents seeking the most competitive rates, they can launch a time-bound auction. Lenders place bids with progressively better terms, competing to provide capital. The auction mechanism ensures price discovery through competition - lenders must offer lower interest rates or better terms to win. When the auction finalizes, the winning bid(s) are automatically executed through 402 credit lines, with escrow and streaming payments set up on-chain. 2. 1inch Aqua Integration for Shared Liquidity Rather than locking capital in isolated lending pools, our platform leverages 1inch Aqua's shared liquidity infrastructure. This means:
Capital Efficiency: Lenders can deposit USDC into Aqua pools that serve multiple DeFi protocols simultaneously, earning yields from various sources while staying available for agent financing Instant Liquidity: When an RFQ is accepted or auction is won, liquidity is reserved from the Aqua pool without requiring dedicated capital allocation Seamless Returns: Repayments flow back into Aqua pools, maintaining liquidity for other protocols and earning compound yields Cross-Protocol Optimization: Aqua automatically routes capital to highest-yield opportunities while keeping it available for our agent credit marketplace
3. 402 Protocol Credit Lines
Every successful match (RFQ or auction) is converted into a 402 protocol credit line, which provides:
Programmable Payments: Credit lines with automated payment streams that AI agents can trigger programmatically Escrow Protection: Collateral and payments flow through trustless escrow contracts Agent-Native Design: Built specifically for agent-to-agent transactions with machine-readable terms Payment Streaming: Continuous payment flows rather than lump sum repayments, matching agent revenue patterns On-Chain Transparency: All terms, limits, and payment history recorded on-chain for auditability
Technical Architecture
Smart Contracts (Solidity on EVM) RFQ Contract:
createRFQ(amount, duration, collateralType, flowDescription) - Agent posts funding request with IPFS metadata submitQuote(rfqId, rateBps, limit, collateralRequired) - Lenders submit competitive offers acceptQuote(rfqId, quoteId) - Agent selects winning quote executeRFQ(rfqId) - Converts accepted quote into 402 credit line with automated escrow setup
Auction Contract:
createAuction(amount, duration, endTime) - Launch competitive bidding for capital placeBid(auctionId, rateBps, limit) - Lenders bid with terms (lower rate = better bid) finalizeAuction(auctionId) - Determines winner(s) based on best rate or optimal blended terms settleAuction(auctionId) - Executes winning bid(s) through 402 protocol with on-chain settlement
Aqua Integration Contract:
connectLiquidity(amount) - Lenders pledge capital through Aqua shared pools reserveLiquidity(creditLineId, amount) - Locks liquidity when credit line is created releaseLiquidity(creditLineId) - Returns capital to Aqua pool upon repayment swapViaAqua(fromToken, toToken, amount) - Handles any token conversions needed
Agent Finance Contract:
Wrapper layer that connects our RFQ/Auction results to existing 402 protocol contracts Manages credit line creation with parameters from matched offers Handles limit adjustments based on agent reputation and collateral Interfaces with 402 escrow and streaming payment contracts
Backend Services (Go + Echo Framework)
RFQ Service:
REST API for creating, browsing, and filtering active RFQs WebSocket connections for real-time quote notifications to borrowers Event indexer monitoring on-chain RFQ contract events Quote aggregation and ranking by best terms
Auction Service:
Real-time bid tracking with WebSocket broadcasts Automated auction finalization using timer-based triggers Bid validation and ranking logic Settlement orchestration with 402 protocol
Aqua Service:
Integration with 1inch Aqua SDK for pool interactions Liquidity availability monitoring and reporting Capital allocation tracking per lender Yield calculation from Aqua pools
x402 Integration Service:
Monitors matched RFQs and finalized auctions Orchestrates 402 credit line creation with matched parameters Tracks payment streams and repayment status Handles collateral management through 402 escrow
Infrastructure:
ClickHouse + BUN ORM: High-performance analytics database for historical RFQs, auctions, quotes, bids, and agent reputation scoring RabbitMQ: Message queues for event processing (new quotes, bid updates, credit line activations), background jobs (interest accrual, auction finalization), and webhook delivery Hardhat: Smart contract development, testing, and deployment to Sepolia (Ethereum) and Mumbai (Polygon) testnets
Frontend (React + Vite + TypeScript)
Borrower Dashboard:
Intuitive RFQ creation form with amount, duration, collateral selection, and flow description Real-time quote feed showing competitive offers from lenders One-click auction launch for competitive rate discovery Active credit line management showing limits, utilization, payment schedules Agent reputation display (history, successful repayments, default rate)
Lender Dashboard:
Live RFQ marketplace with filters (amount, duration, collateral type, borrower reputation) Quote submission interface with rate calculator showing potential yields Auction participation with live bid leaderboard Aqua liquidity connection showing available capital and current yields Portfolio view of active credit lines and expected returns
Auction Live View:
Real-time visualization of active auctions with countdown timers Animated bid feed showing new competitive offers as they arrive Chart displaying bid history and rate trends over auction duration Borrower details and credit parameters One-click bid submission for participating lenders
Aqua Integration Dashboard:
Current liquidity pool status and TVL
Lender capital allocation (available vs. reserved for credit lines) Yield metrics from Aqua pools vs. direct lending Visual representation of capital flowing between Aqua and agent credit lines
Integration Technologies
ethers.js: Contract interaction, transaction signing, event listening wagmi + WalletConnect: Multi-wallet support (MetaMask, WalletConnect, Coinbase Wallet) WebSocket: Real-time updates for quotes, bids, auction status changes IPFS: Decentralized storage for detailed RFQ descriptions and agent metadata OpenTelemetry: Distributed tracing for debugging cross-service interactions
Real-World Use Cases
1. SaaS Agent Cash-Flow Financing A customer support AI agent generates $50k monthly revenue but needs $30k upfront for compute infrastructure. It creates an RFQ for a 90-day credit line, offering future revenue streams as collateral. Lenders review the agent's payment history and revenue consistency, then compete with quotes. The agent accepts the best rate, receives instant liquidity from Aqua, and automatically repays through 402 payment streams as customers pay invoices. 2. Marketplace Factoring Agent An e-commerce fulfillment agent helps merchants process orders but faces 30-day payment delays. It launches an auction for $100k credit line backed by confirmed purchase orders. Lenders bid aggressively knowing the collateral is high quality. The winning lender provides capital at 8% APR, and the agent repays automatically when marketplace payments settle on-chain. 3. API Micro-Lending for Agent Swarms A swarm of data processing agents needs small ($100-$1000) credit lines to pay for API calls across multiple services. Rather than each agent negotiating separately, they pool requests into a single large RFQ. Lenders provide bulk financing at favorable rates because of scale. Each agent receives its allocation through 402 micropayment streams, paying back as they complete processing jobs. 4. Research Agent Compute Credits An academic research AI agent needs GPU compute for training models but lacks upfront capital. It creates an RFQ offering future grant funding as collateral (locked in smart contract). Academic-focused lenders provide capital at low rates (3-5% APR) because they value research advancement. The agent provisions cloud resources immediately and repays when grant disperses. Why This Matters for AI x Crypto Agent-Native Finance: Traditional DeFi is built for humans with manual approvals, signatures, and decision-making. AI agents need programmatic credit that can be negotiated, executed, and repaid autonomously without any human in the loop. Capital Efficiency: By leveraging Aqua's shared liquidity, we enable lenders to earn yields across multiple protocols while staying available for agent financing. This is dramatically more efficient than dedicated lending pools. Price Discovery: The dual RFQ + Auction model ensures agents get competitive rates. RFQ works for agents with specific requirements; auctions work when agents want the absolute best rate through competition. Scalability: As AI agents proliferate, credit demand will explode. Our architecture scales horizontally with ClickHouse for analytics, RabbitMQ for async processing, and EVM's composability for cross-protocol integrations. Transparency: All credit terms, repayment history, and agent reputation are on-chain. This creates a decentralized credit bureau for AI agents, enabling better risk assessment over time. Competitive Advantages
First dual-mechanism agent credit marketplace combining RFQ flexibility with auction competitiveness Only platform integrating Aqua shared liquidity with agent-specific credit lines Built on 402 protocol for truly programmable, agent-native payments Real-time price discovery through live auctions with WebSocket updates Cross-chain ready - EVM architecture works on Ethereum, Polygon, Arbitrum, and other L2s Reputation system tracking agent payment history for better rates over time
Target Prizes Strategy
1inch Aqua Prize (~$17k): We're building the first Aqua App specifically for AI agent financing, showcasing how shared liquidity unlocks capital efficiency for emerging agent economy use cases. Polygon Prize (~$10k): Our implementation demonstrates the most practical use of x402 protocol - autonomous credit lines for AI agents with real-world utility in SaaS, marketplace, and compute financing scenarios. Coinbase Developer Platform: Integration of x402 agentic payments with Coinbase Wallet SDK, enabling mainstream users to participate as lenders through familiar UX. World Coin: Mini-app dashboard for agents with World ID verification, creating a bridge between human identity and agent reputation systems. This project sits at the intersection of DeFi innovation (Aqua shared liquidity), agent infrastructure (402 protocol), and practical crypto applications (competitive credit marketplace). It's not just technically sophisticated - it solves a real problem that will become critical as AI agents become economic actors in their own right.
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






