SWI Carbon Credit is a cutting-edge Fintech API designed to transform the trading of Internationally Transferred Mitigation Outcomes (ITMOs). By leveraging blockchain technology, it addresses inefficiencies in the current carbon credit market, ensuring transparency, security, and global compliance.
Our mission is to tackle systemic issues in climate change, promote global collaboration, and drive economic growth through sustainable practices. With an emphasis on efficiency and adherence to the Paris Agreement's Article 6 framework, SWI Carbon Credit facilitates the achievement of global carbon reduction goals.
- Transparent Trading System: A smart contract-based platform ensuring the integrity of ITMO transactions and safeguarding global carbon credit policies.
- Preservation of Agreements and Tokens: Secure mechanisms for recording agreements, project details, and tokenizing Mitigation Contribution Units (MCUs) to represent carbon offsets.
- Automation and Auditing Tools: Streamlined verification processes with tools for auditing, enabling higher trading volumes and faster ITMO validation.
- Automated International Transactions: Seamless agreement execution eliminates middleman costs and expedites cross-border settlements.
- Burning Token Mechanism: Prevents double counting and maintains the integrity of MCU supply.
SWI Carbon Credit is more than a platform; it's a step toward global sustainability and compliance with international carbon reduction policies.
This repository contains Solidity smart contracts designed for managing carbon credit projects, validation, and trading under the United Nations Framework Convention on Climate Change (UNFCCC). The system includes access control, project management, tokenization, and ITMO trade mechanisms.
The solution leverages role-based access control, multi-token standards (ERC-1155), and project lifecycle management to facilitate transparent and efficient carbon credit operations.
- AccessControlBase: Implements role-based access control using OpenZeppelin's
AccessControl. - ProjectManager: Manages carbon credit projects, including registration, emissions tracking, and status updates.
- TokenManager: Handles carbon credit tokens (ERC-1155), including minting, transfers, and retirement.
- MCURegistry: Integrates project and token management while adding pausable functionality.
- ITMORegistry: Manages ITMO agreements between countries.
- ITMOTradeManager: Facilitates trades under ITMO agreements, ensuring secure MCU transfers.
- Role-Based Access Control: Secure role assignment and management (
DEFAULT_ADMIN_ROLE,UNFCCC_ROLE,COUNTRY_ROLE). - ERC-1155 Tokens: Implements multi-token standards for carbon credits.
- Project Lifecycle Management: From registration to validation and activation.
- ITMO Agreements: Creation, signing, validation, and execution of inter-country agreements.
- Secure Trading: MCU token trading between countries with payment validation.
- Pausable Operations: Critical operations can be paused in emergencies.
- Provides roles for secure access to operations.
- Supports
UNFCCC_ROLEandCOUNTRY_ROLE.
- Registers and validates carbon credit projects.
- Tracks emissions data and associated documents.
- Mints and manages carbon credit tokens.
- Tracks ownership history and retired tokens.
- Inherit from project and token management.
- Adds pausable functionality for critical operations.
- Manages agreements between countries.
- Tracks lifecycle from initialization to completion.
- Executes secure trades under ITMO agreements.
- Validates balances, payments, and agreement terms.
- Clone the repository:
git clone https://github.com/your-repo.git cd your-repo - Install dependencies:
npm install
- Deploy contracts using Hardhat:
npx hardhat run scripts/deploy-contract.js --network <network-name>
- @nomicfoundation/hardhat-toolbox: ^4.0.0
- ethers: ^6.13.5
- hardhat: ^2.22.17
- @openzeppelin/contracts: ^4.9.3
- dotenv: ^16.4.7
- xrpl: ^4.1.0
Run test scripts to validate individual components:
npx hardhat test/script-name.test.jsAvailable scripts:
test/project-registration.test.js- Create Projecttest/project-validation.test.js- Validate Projecttest/itmo-agreement.test.js- Create Agreementtest/agreement-validation.test.js- Validate Agreementtest/itmo-trade.test.js- Execute Tradetest/retire-tokens.test.js- Retire Tokens
- Access Control: Role-based restrictions on critical functions.
- Reentrancy Protection: Guards against reentrancy attacks using
ReentrancyGuard. - Data Integrity: Ensures data validation and event logging.
- Proxy Pattern: Support for upgradable contracts.
- Multi-Signature Agreements: Additional parties for enhanced governance.
- Analytics and Reporting: Detailed insights into project and trade statuses.
This project is licensed under the MIT License. See LICENSE for details.
We welcome contributions! Please see the CONTRIBUTING.md file for guidelines.
The full documentation of our code can be seen here: https://tinyurl.com/nus-fintech-CarbonCredit