GreenAiDEX is an on-chain platform for registering, tokenizing, and trading real-world environmental credits in a transparent, secure, and accessible way.
The platform supports four types of environmental credits:
- π± Green Credits
- π§ Water Conservation Credits
- π Carbon Credits
- β‘ Renewable Energy Credits
GreenAiDEX enables verified environmental projects to convert these credits into ERC-1155 crypto assets, trade them directly using stablecoin settlement, and optionally make them DeFi-compatible by wrapping them into ERC-20 tokens tradable via a Uniswap V2βstyle AMM.
GreenAiDEX is designed to make green credit markets more efficient, accessible, and trustable for both small sustainability projects and large organizations.
Traditional green credit markets face major structural limitations:
- Centralized registries with low transparency
- Manual verification and settlement
- High entry barriers for small companies
- Poor liquidity and inefficient price discovery
- Limited global accessibility
As a result, green credits remain illiquid, opaque, and difficult to trade, reducing their real-world environmental impact.
GreenAiDEX moves the entire green credit lifecycle on-chain, removing intermediaries and enabling open participation.
- Transparency β Credit issuance, supply, and retirement are publicly verifiable
- Accessibility β Anyone can buy or sell credits on-chain
- Liquidity β Credits can be traded instantly or via DeFi pools
- Trust β Smart contracts enforce rules instead of centralized entities
- Low Cost β Built on Mantle L2 for fast, low-fee transactions
Real-World Environmental Credit
β
On-chain Registration
β
ERC-1155 Credit Token
β
Buy / Sell via Orderbook
β
(Optional) ERC-20 Wrapping
β
AMM Trading (Uniswap-style)
β
Retirement (On-chain Burn)
Each credit has full on-chain traceability from issuance to retirement.
ββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend β
β Next.js + Ethers.js + TailwindCSS β
β - Credit Registry UI β
β - Buy / Sell Credits β
β - Wrap / Unwrap Tokens β
β - Liquidity & Swap Interface β
β - AI Chat Assistant β
βββββββββββββββββββββββ¬βββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββ
β AI Backend β
β - User guidance logic β
β - Confidence score calculation β
β - Read-only blockchain access β
βββββββββββββββββββββββ¬βββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββ
β Mantle Sepolia (L2) β
β β
β βββββββββββββ ERC-1155 Credits βββββββββ β
β β GreenCreditToken β β
β βββββββββββββββββββ¬βββββββββββββββββββββ β
β βΌ β
β βββββββββββββ ERC-20 Wrappers ββββββββββ β
β β Wrapper Factory + Wrappers β β
β βββββββββββββββββββ¬βββββββββββββββββββββ β
β βΌ β
β βββββββββββββ AMM (Uniswap V2) βββββββββ β
β β Factory β’ Pair β’ Router β β
β βββββββββββββββββββ¬βββββββββββββββββββββ β
β βΌ β
β βββββββββββββ Orderbook ββββββββββββββββ β
β β Stablecoin-settled credit trades β β
β ββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββ
GreenAiDEX uses both an Orderbook and an AMM to support different trading needs.
| Feature | Orderbook (ERC-1155) | AMM (ERC-20 Wrapped) |
|---|---|---|
| Token type | Direct ERC-1155 credits | ERC-20 wrapped credits |
| Trading model | Fixed-price, peer-to-peer | Automated (x Β· y = k) |
| Liquidity requirement | No pooled liquidity | Requires liquidity providers |
| Price impact | No slippage | Slippage based on pool size |
| Execution | Match-based | Instant swap |
| Transaction size | Best for large trades | Best for small trades |
-
Orderbook
- Preserves native ERC-1155 credit structure
- Ideal for bulk and institutional trades
- Predictable pricing (no slippage)
-
AMM
- Enables DeFi composability via ERC-20
- Instant execution for retail users
- Always-on liquidity pools
Together, they balance precision trading and liquidity-driven trading.
GreenAiDEX integrates an AI-powered assistant to improve usability and reduce user errors.
- In-app chat guidance
- Step-by-step help for:
- Credit registration & minting
- Buying / selling credits
- Token approvals
- ERC-1155 β ERC-20 wrapping
- Liquidity provision & swaps
- Clear explanations of failed transactions
- Risk-aware insights using on-chain data
Before executing a swap, users are shown a Confidence Score (0β100) calculated from:
- Liquidity depth
- Trade size vs pool reserves
- Expected price impact
- User slippage tolerance
Example:
Confidence Score: 76 / 100 Liquidity: Strong Price Impact: Moderate Slippage Risk: Low
This helps users understand trade quality before execution.
Purpose: Tokenize verified environmental credits.
- ERC-1155 multi-token standard
- Credit registration & verification
- Supply and retirement tracking
- Freeze & revoke mechanisms
- Acts as the source of truth
Purpose: Enable DeFi compatibility.
- One wrapper per credit type
- Fully collateralized 1:1 backing
- Reentrancy-safe mint & burn
- Credit status validation
Purpose: Permissionless liquidity & swaps.
- Factory β’ Pair β’ Router architecture
- Constant product formula (
x * y = k) - 0.3% LP fee
- Slippage & deadline protection
Purpose: Fixed-price trading of credits.
- On-chain escrow
- Access-controlled actions
- Pausable & reentrancy-safe
- Supports direct ERC-1155 trades
- Uses Mock USDC (mUSDC)
- Faucet available on frontend
- Enables realistic testing
- Smooth onboarding for new users
- Solidity ^0.8.20
- OpenZeppelin libraries
- ERC-1155 & ERC-20 standards
- Uniswap V2βstyle AMM
- Next.js 14
- TailwindCSS
- Ethers.js
- LLM-based assistant
- On-chain data interpretation
- Confidence scoring
- Read-only execution
- Mantle Sepolia (L2)
- Chain ID: 5003
git clone https://github.com/Shivamd0608/GreenAiDEX.git
cd GreenAiDEX/frontend
npm install
npm run dev