Decentralized Blue Carbon Credit Registry, Issuance & Retirement Protocol
Tokenizing high-impact coastal ecosystem conservation (Mangroves, Seagrass & Salt Marshes) on EVM Blockchains.
BlueCred is an end-to-end decentralized environmental finance protocol engineered to tokenize, verify, and trade Blue Carbon credits. Coastal marine ecosystemsβmangroves, tidal marshes, and seagrass meadowsβsequester carbon up to 10 times faster than mature tropical forests and store it for millennia.
Traditional voluntary carbon markets face chronic challenges:
β οΈ Double Counting: The same credit sold across multiple registries.β οΈ Lack of MRV Transparency: Opaque measurement, reporting, and verification protocols.β οΈ Broker Friction: High intermediary margins eroding capital flowing to local coastal communities.
BlueCred resolves these structural bottlenecks by anchoring project provenance, acreage GIS data, and carbon credit tokens directly on-chain as ERC-1155 multi-tokens, combining verifiable decentralized settlement with real-time geospatial tracking and cloud metadata storage.
Interactive gateway for project developers, verifiers, and institutional carbon credit buyers with Web3 wallet connectivity and role selection.
Instant on-chain purchasing and trading of verified blue carbon tokens (BCT) with transparent pricing, available supply, and ecosystem filters.
π Expand to View Additional Modules (Impact Analytics & Supplier Onboarding)
Tracking aggregate carbon credits issued, verified conservation acreage, and historical issuance trends rendered via Chart.js.
Multi-step onboarding form for conservationists to register projects, input GIS coordinates, submit MRV documentation, and calculate potential carbon sequestration.
BlueCred specializes in tokenizing the three primary coastal blue carbon ecosystems:
flowchart TD
subgraph STAKEHOLDERS["π₯ Protocol Stakeholders"]
P["π± Project Proponents<br>(Conservationists)"]
V["π‘οΈ Independent Verifiers<br>(Certifying Authorities)"]
B["π’ Corporate Buyers<br>(ESG & Institutional)"]
A["π Public Auditors<br>(Transparency Observers)"]
end
subgraph CLIENT["π» Application Layer (Next.js 15)"]
UI["Web3 DApp Interface"]
MAP["GIS Geospatial Mapping<br>(Leaflet / OpenStreetMap)"]
WALLET["Wallet Connect<br>(RainbowKit / Wagmi v2)"]
CERT["Cryptographic Certificate Generator<br>(jsPDF / html2canvas)"]
CHARTS["Impact & Analytics Engine<br>(Chart.js)"]
end
subgraph BACKEND["βοΈ Metadata & Storage Layer (Appwrite Cloud)"]
AUTH["Role-Based Authentication"]
DB_PROJ["Projects Database<br>(GIS, Acreage, MRV Docs)"]
DB_TX["Transaction Ledger<br>(Purchase Logs, Burn Proofs)"]
BUCKET["Decentralized Storage Bucket<br>(Satellite Imagery, Field Audits)"]
end
subgraph BLOCKCHAIN["βοΈ EVM Settlement Layer (Polygon / Sepolia)"]
SC["BlueCred ERC-1155 Contract<br>(BlueCred.sol)"]
MINT["mint(address, uint256, uint256)"]
BURN["burn(address, uint256, uint256)"]
EXPLORER["On-Chain Verification<br>(PolygonScan / Etherscan)"]
end
P -->|1. Submit Project & Coordinates| UI
UI -->|Persist Metadata & Documents| BACKEND
V -->|2. Audit MRV & Approve| UI
UI -->|3. Trigger Token Minting| SC
SC -->|Mint ERC-1155 Credits| MINT
B -->|4. Purchase Credits via Web3| WALLET
WALLET -->|Settle Order| SC
B -->|5. Retire & Burn Credits| BURN
BURN -->|Immutable Proof| EXPLORER
BURN -->|6. Generate Verifiable Certificate| CERT
A -->|Monitor Global Sequestration| CHARTS
flowchart LR
A["π 1. Submission"] --> B["π 2. MRV Audit"]
B --> C["β‘ 3. On-Chain Mint"]
C --> D["π 4. Marketplace"]
D --> E["πΌ 5. Acquisition"]
E --> F["π₯ 6. Retirement & Burn"]
F --> G["π 7. Verifiable Certificate"]
classDef step fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;
class A,B,C,D,E,F,G step;
- Submission: Project developers pin coastal coordinates, upload satellite evidence, and submit estimated CO2 tonnage.
- MRV Verification: Environmental auditors review scientific documentation, confirm non-encroachment, and approve project metrics.
- On-Chain Tokenization: The smart contract mints ERC-1155 tokens directly to the verified project repository.
- Marketplace Listing: Credits are listed with transparent pricing, provenance history, and verified status.
- Corporate Acquisition: Institutional buyers acquire credits directly using Web3 wallets without broker cuts.
- Retirement / Burn: When offsetting emissions, credits are permanently burned on-chain to prevent secondary circulation.
- Certificate Generation: A tamper-evident cryptographic retirement certificate is generated with transaction hashes for ESG audits.
Browse and filter verified blue carbon assets by ecosystem type (Mangrove, Saltmarsh, Seagrass), acreage, country, and price. Direct wallet interaction ensures peer-to-peer settlement without middleman risk.
A gated administrative panel for accredited verifiers and environmental authorities to review project documentation, inspect satellite polygon boundaries, and authorize on-chain credit issuance.
Interactive Leaflet and OpenStreetMap integration allowing stakeholders to inspect coastal project coordinates, geographic boundaries, and project densities globally.
Retire carbon credits on-chain with automatic burn execution. Generates an institutional-grade PDF offset certificate featuring:
- Unique Verification Token & Certificate ID
- On-chain transaction hash link to block explorer
- Timestamped retirement declaration and offset breakdown
Comprehensive buyer dashboards tracking cumulative holdings, active credits, historical retirements, and ecosystem contribution metrics rendered via Chart.js.
The core protocol smart contract (BlueCred.sol) is built using OpenZeppelin ERC-1155:
| Attribute | Specification |
|---|---|
| Standard | ERC-1155 Multi-Token Standard |
| Compiler | Solidity 0.8.28 |
| Network Deployments | Polygon Amoy Testnet & Ethereum Sepolia |
| Primary Functions | mint(to, id, amount, data) Β· burn(from, id, amount) Β· uri(id) |
| Contract Artifact | contracts/BlueCred.sol |
| Network | Contract Address | Block Explorer |
|---|---|---|
| Polygon Amoy | 0x920149b1e18f8d524ea443802e08837a955595c0 |
View on PolygonScan |
| Ethereum Sepolia | 0x8599207114b98e239136aa6174e245409b77c5fd |
View on Etherscan |
.
βββ assets/ # Protocol imagery, diagrams & screenshots
β βββ ecosystems/ # High-resolution coastal habitat media
β βββ screenshots/ # Live application interface captures
βββ contracts/ # Solidity smart contracts
β βββ BlueCred.sol # Core ERC-1155 token contract
βββ docs/ # Engineering & architecture specifications
β βββ backend-setup.md # Hardhat & Appwrite configuration
β βββ frontend-setup.md # Client application build guide
β βββ local-setup.md # End-to-end integration manual
βββ frontend/ # Next.js 15 web client & dApp
β βββ src/app/ # App Router pages & API routes
β β βββ admin/ # Verifier & administrative portal
β β βββ certificate/ # Certificate viewer & PDF export
β β βββ company/ # Corporate portfolio & purchases
β β βββ impact/ # Global impact & statistics
β β βββ marketplace/ # Liquid carbon credit exchange
β β βββ projects/ # Project registry & detail views
β β βββ submit/ # Project onboarding & GIS wizard
β βββ src/lib/ # Web3, Wagmi, Viem & Appwrite clients
β βββ src/scripts/ # Database initialization scripts
βββ scripts/ # Deployment & migration scripts
β βββ deploy.js # Contract deployment automation
βββ hardhat.config.ts # Hardhat Viem configuration
- Node.js: v18.x or v20.x LTS
- npm or pnpm
- MetaMask or compatible Web3 wallet configured for Sepolia or Polygon Amoy
git clone https://github.com/Trunal2005/Blue-Cred.git
cd Blue-Cred# Install root (smart contract & tooling) dependencies
npm install
# Install frontend dependencies
cd frontend
npm install
cd ..Root directory (.env):
cp .env.example .envPRIVATE_KEY=your_deployer_wallet_private_key
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/your_key
POLYGON_AMOY_RPC_URL=https://rpc-amoy.polygon.technology/Frontend directory (frontend/.env.local):
cd frontend
cp .env.example .env.localNEXT_PUBLIC_APPWRITE_ENDPOINT=https://sgp.cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT_ID=your_project_id
APPWRITE_API_KEY=your_admin_api_key
NEXT_PUBLIC_APPWRITE_DATABASE_ID=bluecred-db
NEXT_PUBLIC_APPWRITE_PROJECTS_COLLECTION_ID=projects
NEXT_PUBLIC_APPWRITE_TRANSACTIONS_COLLECTION_ID=transactions
NEXT_PUBLIC_APPWRITE_BUCKET_ID=project-images
NEXT_PUBLIC_SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/your_key
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_id# Compile contracts
npx hardhat compile
# Deploy to target network
npx hardhat run scripts/deploy.js --network sepoliaProvision collections, attributes, and file storage buckets automatically:
cd frontend
node src/scripts/init-appwrite.jscd frontend
# Development server
npm run dev
# Production build & run
npm run build
npm run start- Zero Secret Commits: Private keys and sensitive API tokens are decoupled via
.envand strictly guarded by.gitignore. - Decentralized Verification: No single entity can unilaterally mint or retire credits without on-chain cryptographic signatures.
- Audit Provenance: Every credit minted traces back to verified geographic coordinates and timestamped MRV audits.
This project is licensed under the MIT License. See the LICENSE file for details. Source code remains MIT; derived satellite-data figures/screenshots require the CC BY 4.0 attribution documented in the dataset card.
The existing submission workflow now runs genuine local PyTorch inference from ml/artifacts/run1/best.pt. Training used 144 real GMW/WorldCover 2020 reference pairs across disjoint sites (96 train / 24 validation / 24 test), completed 7 epochs and selected epoch 1. Model quality is limited: held-out IoU 0.292, below fixed NDVI 0.321, with substantial false positives. It is not a validated mangrove-area, carbon or certification system.
Next.js migrated to the supported 15.5.29 security release while preserving React 18. The npm audit has zero critical advisories, but high/moderate/low issues and unknown deployed Appwrite permissions remain. Real Chrome tests verify local CNN upload/overlay and service failure behavior; external account/record/tile interactions use explicit fixtures, not production validation. Marketplace listings remain disclosed demonstrations, and blockchain writes default to disabled.
See final validation, technical audit, browser performance report, training guide, integration/startup guide, and zero-cost report. These verified reports qualify earlier architectural/security claims in this README. Additional spend remains βΉ0; no billable resources, production deployment, transactions or GitHub push were introduced.






