SmartMarket

A decentralized carbon credit marketplace on Ethereum for transparent, efficient trading of offsets

SmartMarket

Created At

ETHOnline 2025

Winner of

Hedera

Hedera - Best Use of Hederaย Agent Kitย & Google A2A 2nd place

Project Description

๐ŸŒฑ A2A Carbon Credit Marketplace - Complete Project Description

What This Project Is The A2A Carbon Credit Marketplace is a comprehensive, AI-powered carbon credit trading platform that bridges the physical world of carbon sequestration with the digital economy of blockchain payments. It's essentially a "smart marketplace" where companies can sell carbon credits generated from real environmental projects, and buyers can purchase them using cryptocurrency, all orchestrated by intelligent AI agents.

๐ŸŽฏ Core Concept Imagine a marketplace where:

  • IoT sensors in forests, farms, or carbon capture facilities monitor real-time carbon sequestration
  • AI agents analyze this data and predict how many carbon credits will be generated
  • Companies can pre-sell these future carbon credits at discounted rates
  • Buyers can purchase credits using cryptocurrency (HBAR, ETH, MATIC)
  • Everything is automated through AI agents that understand natural language

๐Ÿ—๏ธ System Architecture

The Three-Layer System

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ WEB INTERFACE โ”‚ โ”‚ (Next.js 15 + React 19 + Tailwind CSS) โ”‚ โ”‚ โ€ข Real-time chat with AI agents โ”‚ โ”‚ โ€ข Live agent status monitoring โ”‚ โ”‚ โ€ข Payment interface for blockchain transactions โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ AI AGENT ECOSYSTEM โ”‚ โ”‚ (8 Specialized Agents powered by Google ADK + Gemini) โ”‚ โ”‚ โ€ข OrchestratorAgent: Central routing hub โ”‚ โ”‚ โ€ข PaymentAgent: Multi-network blockchain payments โ”‚ โ”‚ โ€ข IoTCarbonAgent: Real-time sensor data processing โ”‚ โ”‚ โ€ข CarbonCreditAgent: Marketplace management โ”‚ โ”‚ โ€ข PrebookingAgent: Future credit prebooking โ”‚ โ”‚ โ€ข WalletBalanceAgent: Multi-network balance checking โ”‚ โ”‚ โ€ข HederaPaymentAgent: Autonomous HBAR transfers โ”‚ โ”‚ โ€ข TellTimeAgent & GreetingAgent: Utility services โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ PHYSICAL WORLD INTEGRATION โ”‚ โ”‚ โ€ข ESP32 IoT devices with CO2/humidity sensors โ”‚ โ”‚ โ€ข MQTT broker for real-time data transmission โ”‚ โ”‚ โ€ข PostgreSQL database for marketplace data โ”‚ โ”‚ โ€ข Redis for caching and session management โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿค– The AI Agent System How the AI Agents Work The system uses 8 specialized AI agents, each with a specific role, all coordinated by a central OrchestratorAgent that uses Google's Gemini LLM to understand user requests and route them to the appropriate specialist.

  1. OrchestratorAgent (The Brain) Port: 10002 Role: Central routing hub that understands user intent Technology: Google ADK + Gemini 2.5 Flash How it works: Listens to user requests like "Buy 100 carbon credits" Uses LLM to understand the intent Automatically routes to the right specialist agent Coordinates multi-agent workflows

PaymentAgent (The Bank) Port: 10005 Role: Executes real blockchain transactions Supported Networks: Hedera (HBAR), Ethereum (ETH), Polygon (MATIC) Real Transactions: Not simulations - actual cryptocurrency transfers Features: Address validation, transaction tracking, multi-network support

IoTCarbonAgent (The Environmental Monitor) Port: 10006 Role: Processes real-time sensor data from IoT devices Data Sources: MQTT messages from ESP32 devices Capabilities: Real-time carbon sequestration monitoring Carbon credit predictions based on sensor data Company-based data segregation Critical alert processing 4. CarbonCreditAgent (The Marketplace) Port: 10003 Role: Manages the carbon credit marketplace Database: PostgreSQL with company and credit data Features: Price analysis, negotiation, offer management AI Negotiation: Uses Gemini to find the best deals 5. PrebookingAgent (The Future Sales) Port: 10007 Role: Handles pre-sales of future carbon credits IoT Integration: Uses predictions from IoTCarbonAgent Discount System: 5% discount for early booking Confidence-Based: Only creates prebookings when prediction confidence > 70% HederaPaymentAgent (The Autonomous Bank) Port: 10009 Role: Autonomous HBAR transfers using natural language Technology: TypeScript + Hedera Agent Kit + LangChain Features: Natural language payment processing, autonomous execution WalletBalanceAgent (The Accountant) Port: 10004 Role: Multi-network balance checking Supported Networks: Hedera, Ethereum, Polygon Features: Real-time balance queries, transaction history

๐Ÿ’ฐ Blockchain Payment System

Multi-Network Support The system supports three major blockchain networks:

Hedera Network (Primary) Currency: HBAR Address Format: 0.0.123456 Benefits: Low fees, fast transactions (3-5 seconds) Real Transactions: Actual HBAR transfers with transaction IDs

Ethereum Network Currency: ETH + ERC20 tokens (USDC, USDT) Address Format: 0x... (40 hex characters) Features: Gas optimization, token support

๐Ÿข Company Onboarding & Marketplace

Business Model

For Carbon Credit Companies Registration: KYC/AML verification process IoT Integration: Connect their carbon sequestration devices Credit Inventory: Real-time tracking of available credits Pricing Tools: Dynamic pricing based on market conditions Direct Sales: B2B interface for corporate buyers

For Buyers Credit Categories: Forestry, renewable energy, energy efficiency, waste management Quality Ratings: AI-powered assessment of carbon credit quality Bulk Trading: Large-scale corporate purchases Payment Options: Multiple cryptocurrency payment methods

Revenue Streams Transaction Fees: 2-5% commission on carbon credit sales Subscription Plans: Premium features for enterprise clients API Licensing: Usage-based pricing for API access Consulting Services: Implementation and integration support

๐Ÿ”„ Data Flow Architecture

Complete User Journey User Request: "I want to buy 100 carbon credits" Web Interface: Sends request to OrchestratorAgent Orchestration: Gemini LLM routes to CarbonCreditAgent Marketplace: Searches database for available credits Payment: Routes to PaymentAgent for blockchain transaction Execution: Real HBAR/ETH/MATIC transfer executed Confirmation: Transaction ID returned to user IoT Monitoring: Concurrent real-time carbon sequestration tracking

IoT Data Pipeline ESP32 Sensors: Monitor CO2, humidity, carbon sequestration MQTT Transmission: Real-time data sent to broker IoTCarbonAgent: Processes data and makes predictions CarbonCreditAgent: Updates marketplace with new credits PrebookingAgent: Creates future sales based on predictions

๐Ÿ› ๏ธ Technical Implementation

Backend Technologies Python 3.11+: Core agent system Google ADK: Agent Development Kit for LLM integration Gemini 2.5 Flash: Large Language Model for natural language processing FastAPI/Starlette: Web framework for JSON-RPC endpoints PostgreSQL: Database for marketplace data Redis: Caching and session management MQTT: Real-time IoT communication

Blockchain Integration Hedera SDK: Python SDK for HBAR transactions Web3.py: Ethereum and Polygon integration Hedera Agent Kit: TypeScript-based autonomous payments Multi-network Support: Unified interface for different blockchains

IoT Hardware ESP32: Microcontroller with WiFi and sensors PlatformIO: Development environment MQTT Client: Real-time data transmission OLED Display: Local monitoring interface

๐Ÿš€ Key Innovations

  1. AI-Powered Agent Orchestration Natural Language Understanding: Users can interact in plain English Intelligent Routing: LLM automatically chooses the right agent Context Awareness: Maintains conversation history across agents Multi-Agent Coordination: Complex workflows across multiple agents

  2. Real-Time IoT Integration Live Carbon Monitoring: Real-time sensor data from physical devices Predictive Analytics: AI-powered carbon credit forecasting. Company Segregation: Multi-tenant data processing Critical Alerts: Immediate notification of environmental issues

  3. Multi-Network Blockchain Support Unified Interface: Single system supporting multiple blockchains Real Transactions: Actual cryptocurrency transfers, not simulations Autonomous Execution: Natural language to blockchain execution Transaction Tracking: Complete audit trail

๐ŸŽฏ Use Cases & Applications

For Environmental Companies Carbon Credit Sales: Monetize environmental projects IoT Integration: Connect physical carbon sequestration devices Marketplace Access: Reach global buyers Real-time Monitoring: Track carbon credit generation

For Corporate Buyers Carbon Offsetting: Purchase credits to offset emissions Bulk Trading: Large-scale corporate purchases Quality Assurance: AI-verified carbon credit quality Payment Flexibility: Multiple cryptocurrency options

For Developers API Access: Developer-friendly APIs for integration White-label Solutions: Customizable platform for partners Agent Development: Extend the system with new agents Blockchain Integration: Add support for new networks

๐Ÿ”ฎ Future Potential

This system demonstrates the future of AI-powered environmental markets where: Physical environmental projects are directly connected to digital marketplaces AI agents handle complex business logic automatically Blockchain technology ensures transparent and secure transactions IoT devices provide real-time environmental data Natural language interfaces make complex systems accessible

The A2A Carbon Credit Marketplace represents a paradigm shift in how environmental assets are traded, moving from manual, paper-based systems to intelligent, automated, blockchain-powered marketplaces that can scale globally while maintaining transparency and accountability.

How it's Made

Core Architecture & Technologies This is a sophisticated Agent-to-Agent (A2A) Carbon Credit Marketplace built using Google's Agent Development Kit (ADK) with Gemini LLM for intelligent orchestration. The system combines multiple cutting-edge technologies:

๐Ÿค– Multi-Agent AI System (Python Backend)

  • 8 Specialized AI Agents powered by Google ADK and Gemini 2.5 Flash
  • OrchestratorAgent (Port 10002): Central LLM-based routing hub that intelligently delegates tasks
  • JSON-RPC 2.0 Protocol: Standardized agent-to-agent communication
  • Session Management: Context-aware conversations across agents

๐ŸŒ Modern Web Frontend (Next.js 15)

  • React 19 with TypeScript for type safety
  • Tailwind CSS 4 for modern, responsive design
  • Real-time WebSocket communication with A2A backend
  • Agent status monitoring with live indicators

โ›“๏ธ Multi-Network Blockchain Integration

  • Hedera HBAR: Real transaction execution using Hedera SDK
  • Ethereum & Polygon: Web3.py integration for ETH/MATIC transfers
  • ERC20 Token Support: USDC, USDT compatibility
  • Autonomous Payment Agent: TypeScript-based using Hedera Agent Kit

๐ŸŒฑ Real-Time IoT Integration

ESP32 Hardware: PlatformIO-based carbon sequestration monitoring MQTT Broker: Mosquitto for real-time sensor data transmission Company-Based Data Segregation: Multi-tenant IoT data processing Carbon Credit Predictions: AI-powered forecasting from sensor data

๐Ÿš€ Key Technical Innovations

  1. LLM-Powered Agent Discovery The orchestrator automatically discovers child agents at startup and builds dynamic routing rules based on their capabilities.
  2. Real-Time IoT Integration ESP32 devices publish company-specific carbon sequestration data via MQTT, which the IoT Carbon Agent processes for predictions.
  3. Autonomous Blockchain Payments The Hedera Payment Agent uses natural language processing to execute real HBAR transfers without manual intervention.
  4. Multi-Network Wallet Support Single interface supporting Hedera, Ethereum, and Polygon networks with automatic address validation.
  5. Company-Based Carbon Credit System IoT data is segregated by company, enabling targeted carbon credit predictions and prebooking systems.

๐Ÿ› ๏ธ Partner Technologies & Benefits Google ADK & Gemini Intelligent Task Routing: LLM automatically delegates to appropriate agents Natural Language Processing: Users can interact in plain English Context Awareness: Maintains conversation history across agents Hedera Network Low-Cost Transactions: HBAR transfers with minimal fees Fast Settlement: 3-5 second transaction confirmation Real Transaction Execution: Not simulations - actual blockchain transactions

MQTT & IoT Integration Real-Time Data: Live carbon sequestration monitoring Scalable Architecture: Supports multiple companies and devices Predictive Analytics: AI-powered carbon credit forecasting

๐ŸŽฏ Notable Technical Achievements Real Blockchain Integration: Successfully executes actual HBAR, ETH, and MATIC transfers Multi-Agent Orchestration: 8 specialized agents working together seamlessly IoT-to-Blockchain Pipeline: From sensor data to carbon credit transactions Company Onboarding System: Complete B2B marketplace with KYC/AML features Autonomous Payment Processing: Natural language to blockchain execution ๐Ÿ“Š Performance Metrics Agent Response Time: <2 seconds Blockchain Transactions: 3-5 seconds (Hedera) MQTT Data Processing: Real-time Web Interface: <1 second load time This project showcases a sophisticated integration of AI agents, blockchain technology, IoT hardware, and modern web development to create a comprehensive carbon credit marketplace that bridges the physical world (utilizing IoT sensors) with the digital economy (enabling blockchain payments) through intelligent AI orchestration.

background image mobile

Join the mailing list

Get the latest news and updates

SmartMarket | ETHGlobal