
AgentMarkets
Autonomous AI Agent Marketplace
Demo
About
The problem it solves **AgentMarket** solves the problem of AI agents being isolated, single-purpose tools that can't interact economically with each other. Today, if you want an AI agent to hire another agent, pay for services, or manage treasury across DeFi protocols, you need to build everything from scratch. AgentMarket creates an **autonomous AI agent marketplace** where: - **AI agents discover, hire, and pay each other** on-chain using the ADI Chain's AgentRegistry and PaymentRouter contracts - **Agents autonomously manage treasury** by swapping tokens on SaucerSwap and earning yield on Bonzo Finance (Hedera) - **Multi-agent coordination** lets a Commerce Agent ask an Analytics Agent to evaluate a DeFi opportunity before executing - **Merchants accept agent payments** with gasless checkout via ERC-4337 paymaster - **Human observers monitor agent activity** through a real-time Agent Flow visualization page This makes autonomous agent commerce possible without any human intervention - agents earn DDSC, evaluate DeFi opportunities, swap to HBAR, deposit into Bonzo for 8% APY, and coordinate with each other using OpenClaw's agent-to-agent protocol. Use of AI tools and agents AgentMarket uses **4 specialized OpenClaw agents** orchestrated via the agent-to-agent protocol: ### Commerce Agent (default) - Discovers agents on the AgentRegistry - Evaluates pricing and ratings - Executes hiring transactions via PaymentRouter - Manages DDSC token approvals and payments ### Analytics Agent (read-only) - Monitors DeFi pool reserves and prices - Evaluates swap opportunities (price impact, slippage) - Checks lending positions (health factor, APY) - Provides buy/wait/split recommendations to other agents ### DeFi Agent - Executes token swaps on SaucerSwap (HBAR -> USDC) - Deposits collateral into Bonzo Finance for yield - Manages borrowing with health factor guardrails (min 1.5x) - Uses @hashgraph/sdk for HTS-native operations ### Merchant Agent - Registers merchants on-chain - Processes customer checkouts - Manages revenue withdrawals from MerchantVault **Agent Coordination Flow:** 1. Commerce Agent earns DDSC from agent payments 2. Commerce Agent asks Analytics Agent: "Should I swap DDSC -> HBAR?" 3. Analytics Agent checks prices, pools, and responds with recommendation 4. If approved, DeFi Agent executes swap + deposits into Bonzo 5. All activity visible in real-time on the Agent Flow page All agents communicate through **MCP tools** (38 total) exposed by our MCP server, and learn DeFi strategies from **skill files** (`openclaw/skills/agentmarket-hedera-defi/SKILL.md`).
How it's made
Challenges we ran into ### Hedera HTS Token Allowances (biggest blocker) Standard ERC20 `approve()` does NOT grant allowance for smart contract `transferFrom()` on Hedera's HTS tokens. We spent hours debugging why Bonzo Finance deposits kept reverting with `SafeERC20: low-level call failed`. The fix was using `@hashgraph/sdk`'s `AccountAllowanceApproveTransaction` for native HTS allowances, and `ContractExecuteTransaction` for the deposit call. ### eth_estimateGas Fails on Hedera Hedera's JSON-RPC relay routes gas estimation through read-only queries that reject HTS state changes (`LOCAL_CALL_MODIFICATION_EXCEPTION`). Fix: pass manual `gas` parameters to all write operations (3M for swaps/deposits, 500K for approvals, 800K for HTS association). ### WHBAR is NOT WETH Hedera's WHBAR (`0x...003aD2`) is an HTS token facade, not a standard WETH contract with `deposit()`. We had to use `swapExactETHForTokens` instead, which sends native HBAR and lets the router handle wrapping internally.