Inspiration

The global carbon credit market is plagued by fundamental trust issues. Traditional carbon registries operate as opaque, centralized systems where double-counting of credits, fraudulent issuance, and lack of transparency have eroded confidence in carbon offsetting as a tool for climate action. High-profile scandals involving major registries have exposed how credits can be sold multiple times across different platforms, verification decisions remain hidden from public scrutiny, and intermediaries extract value at every step while slowing down cross-border transactions.

We were inspired to ask: what if the carbon credit market was built on a foundation of trustless, immutable infrastructure from the ground up? What if every issuance, verification, trade, and retirement was permanently recorded on a public blockchain, eliminating the need to trust any single entity? Veritas was born from this vision: to create a blockchain-native carbon credit marketplace where smart contracts are the source of truth, not centralized databases controlled by intermediaries.

What it does

Veritas is a fully decentralized carbon credit marketplace built on Ethereum that manages the complete lifecycle of carbon credits on-chain:

On-Chain Credit Issuance: Authorized issuers mint ERC-1155 carbon credit tokens with comprehensive metadata including project ID, vintage year, serial number, and registry information. All data is permanently stored on the blockchain.

Transparent Verification: Third-party verifiers approve credits through smart contract calls, with verification status stored on-chain and publicly auditable through emitted events. Unverified credits cannot be listed on the marketplace.

Trustless Trading: A peer-to-peer marketplace with atomic swaps ensures payment and credit transfer happen in a single transaction. The escrow pattern guarantees no risk of payment without delivery or vice versa.

Permanent Retirement: When credits are used for offsetting, tokens are permanently burned through ERC-1155 burn functions. An ERC-721 retirement certificate is automatically minted as on-chain proof, and retirement reasons are immutably recorded.

Role-Based Access Control: OpenZeppelin AccessControl enforces permissions entirely on-chain. Only addresses with ISSUER_ROLE can mint credits, only VERIFIER_ROLE can approve them, and admin functions are restricted to DEFAULT_ADMIN_ROLE holders.

How we built it

Smart Contract Layer (Solidity 0.8.20):

CarbonCredit.sol : An ERC-1155 multi-token contract inheriting from OpenZeppelin's ERC1155, AccessControl, ERC1155Supply, and ERC1155Burnable. Stores credit metadata, tracks verification status, handles retirement with automatic certificate minting, and enforces transfer restrictions on retired credits. CarbonMarketplace.sol : Implements trustless trading with ReentrancyGuard protection, ERC1155Holder for safe token reception, and escrow-based atomic swaps. Includes verification gating to prevent unverified credits from being listed. RetirementCertificate.sol : An ERC-721 contract that mints non-fungible certificates as permanent proof of carbon credit retirement. Frontend (React 18 + TypeScript + Vite):

Modern React with TypeScript for type safety Framer Motion for smooth animations TailwindCSS for utility-first styling Ethers.js v6 for MetaMask integration and contract interactions React Three Fiber for 3D visual elements Role-specific dashboards: User Dashboard, Issuer Panel, Verifier Dashboard, Admin Panel, Marketplace, and Retirement interface Backend (Node.js + Express):

REST API for off-chain metadata caching and user authentication MongoDB Atlas for storing supplementary data JWT-based authentication with role management Blockchain event indexer for syncing on-chain state Deployment:

Smart contracts deployed to Ethereum Sepolia testnet Hardhat development environment with deployment scripts Verified contracts on Etherscan for transparency

Challenges we ran into

Smart Contract Security: Implementing the escrow pattern for atomic swaps required careful consideration of reentrancy attacks. We had to ensure ReentrancyGuard was properly applied to all state-changing functions in the marketplace contract.

Verification Gating Logic: Ensuring the marketplace contract correctly checked verification status from the CarbonCredit contract required implementing an interface-based approach with try-catch blocks to handle potential contract compatibility issues.

Transfer Restrictions: Overriding the ERC-1155 safeTransferFrom and safeBatchTransferFrom functions to prevent retired credits from being transferred required understanding the OpenZeppelin inheritance hierarchy and ensuring we called the parent implementation correctly.

Role Synchronization: Managing roles both on-chain (via AccessControl) and off-chain (for UI state) needed careful coordination to ensure users saw accurate permissions and could only access authorized features.

Gas Optimization: Storing comprehensive credit metadata on-chain while keeping gas costs reasonable required balancing between on-chain storage and IPFS references for extended metadata.

Accomplishments that we're proud of

Complete On-Chain Lifecycle: Every stage of the carbon credit lifecycle from issuance to retirement is enforced by smart contract logic and permanently recorded on the blockchain. This creates an unbreakable audit trail that eliminates the trust issues plaguing traditional carbon markets.

Atomic Trading Guarantees: Our marketplace implements true atomic swaps where payment and credit transfer happen in the same transaction or neither happens. This eliminates counterparty risk entirely.

Production-Ready Smart Contracts: Our contracts inherit from battle-tested OpenZeppelin implementations and include comprehensive security measures including reentrancy protection, role-based access control, and transfer restrictions.

Retirement Certificate System: The automatic minting of ERC-721 certificates upon credit retirement provides permanent, transferable proof of carbon offsetting that can never be disputed or altered.

Verification Gating: The marketplace enforces that only verified credits can be traded, preventing fraudulent or unreviewed credits from entering the market. This verification status is publicly queryable by anyone.

What we learned

ERC-1155 Advantages: The multi-token standard proved ideal for carbon credits, allowing efficient batch operations and the ability to represent multiple credit types from a single contract while maintaining unique metadata per token ID.

Blockchain as Source of Truth: Designing with the blockchain as the primary data store rather than a secondary sync target fundamentally changes architecture decisions. Every critical operation must be a transaction first, with the frontend reflecting chain state.

OpenZeppelin Patterns: Leveraging audited implementations like AccessControl, ReentrancyGuard, and ERC1155Supply dramatically accelerated development while providing security guarantees we could not have achieved alone.

Event-Driven Indexing: Emitting comprehensive events for every state change enables building responsive frontends that can react to on-chain activity and maintain accurate UI state.

User Experience with Blockchain: Balancing the decentralized nature of blockchain with user-friendly interfaces required careful consideration of wallet connection flows, transaction status feedback, and role-based access patterns.

What's next for Veritas

Mainnet Deployment: Deploying to Ethereum mainnet or a Layer 2 solution like Polygon or Arbitrum for production use with real carbon credits.

IPFS Metadata Integration: Storing extended credit metadata and project documentation on IPFS with on-chain CID references for complete decentralization.

Cross-Registry Standards: Implementing standardized interfaces to bridge credits from major registries like Verra and Gold Standard onto the blockchain.

DAO Governance: Transitioning role management to a decentralized autonomous organization where stakeholders can vote on issuer and verifier approvals.

Carbon Credit Derivatives: Enabling the creation of carbon credit baskets, futures, and other financial instruments on top of the base credit tokens.

Multi-Chain Expansion: Bridging carbon credits across multiple blockchain networks to increase liquidity and accessibility.

Real-Time Verification: Integrating IoT data streams and satellite imagery for continuous, automated verification of carbon reduction projects.

Github and Deployment Links

https://github.com/AryanSaxenaa/veritas https://veritas-ten-psi.vercel.app/

Presentation/Slideshow Link

https://docs.google.com/presentation/d/1fwKNaCZ1XKznU5Sxigsrw9L0_JCCd1sE/edit?usp=sharing&ouid=115700425064953318575&rtpof=true&sd=true

Detailed Blockchain Description and Experimental Data Link

https://drive.google.com/drive/folders/1S4-s9m_aHagmUs362Uto6qDyyK9LDHAK?usp=sharing

Share this project:

Updates