# ecoLedger

## ecoLedger Protocol Specification

### Version 1.0

#### Introduction

The ecoLedger protocol defines a standardized approach to recording, verifying, and displaying transactions related to environmental credits across multiple blockchain platforms. It aims to ensure the integrity of environmental tokens from issuance to retirement, providing a trustworthy and transparent system for all participants.

#### System Overview

The ecoLedger operates as a bridge between disparate blockchain ecosystems, facilitating the transfer and retirement of carbon credits in a secure and verifiable manner. This protocol encapsulates the processes of carbon credit lifecycle management, cross-chain interactions, and user engagement within a decentralized framework.

<br>

Core functionality:

ecoCredit Tokenization: Enhances the capabilities of off-chain registries and new projects that want to be web3 native by enabling the tokenization of their environmental credits. This process integrates credits into various blockchain networks, offering Web3 capabilities through ecoLedger's advanced protocol. It ensures efficient issuance, management, purchase, and retireability of CrossChain environmental credits.

<br>

ecoCredit Bridging: Designed for projects with existing tokenized credits, aiming to enhance their interoperability and reach through CrossChain blockchain features. This service, exclusively provided through ecoLedger, ensures adherence to strict protocols, providing a secure and structured approach. It enables a seamless transition for projects and Registries looking to leverage CrossChain functionalities to expand their capabilities within the blockchain ecosystem.

\
Protocol Stakeholders

Credit Issuers: These are the entities responsible for the initial creation and issuance of carbon credits. They play a crucial role in the ecoLedger ecosystem by introducing new credits into the market.

<br>

Credit Holders: These include individuals or organizations that own carbon credits. Within the ecoLedger system, they have the capability to manage their credits, including the ability to retire or transfer them as needed.

<br>

Validators: Participants entrusted with the task of verifying transactions within the ecoLedger system. They ensure the integrity and authenticity of the credits being transferred or retired.

<br>

Auditors: Independent third-party entities that regularly review and audit the ecoLedger records. Their role is to ensure that all transactions comply with established standards and regulations, maintaining the system's credibility and transparency.

\
Protocol Operations

Issuance: This operation involves the creation of credits on their native blockchains, followed by their recording on ecoLedger. Each credit is recorded with comprehensive details including project information and a unique identifier.\
Service: bridge.ecotoken.earth

<br>

Transfer: Credits can be transferred between users or across different blockchains. This operation ensures that there is a clear and auditable trail of ownership for each credit, safeguarding against fraudulent activities.\
Service: bridge.ecotoken.earth

<br>

Retirement: The retirement operation is critical. It involves the removal of credits from circulation, a process that is meticulously recorded on ecoLedger. This includes capturing transaction hashes to confirm the finality of the retirement.\
Service: retire.ecotoken.earth

<br>

Reporting: ecoLedger provides transparent transaction reports, allowing stakeholders to analyze the flow of credits and their retirement. These reports are vital for ensuring trust in the system.\
Service: ledger.ecotoken.earth

\
Protocol Components

1. Cross-Chain Communication Layer: This advanced system enables the seamless transfer of environmental credit data across diverse blockchain networks. It ensures that credits from both on-chain and off-chain registries can be tracked, retired, and audited, to provide composability regardless of the origin.\
   Purpose: Bridging, Minting, and Retirement services.

Components: APIs, Smart Contracts, Oracles, ecoLedger, ecoToken Retire, Minting, and Bridging services\ <br>

2. Credit Tracking Layer: A robust system that meticulously tracks the journey of each carbon credit from its on-chain creation through to its retirement. This system ensures that every step in the life of a credit is immutably recorded, providing a transparent and verifiable trail for stakeholders.\
   Purpose: Auditing, Impact Verification, Leaderboards, Rewards\
   Components: Blockchain Registries, Off-chain Registries, ecoLedger&#x20;

&#x20;

3. Project Minting Layer: Designed to integrate environmental credit projects into the ecoLedger ecosystem. It supports three key use cases: existing projects on blockchain registries, existing projects on off-chain registries, and new projects initiated directly on ecoLedger. This system enables the digitization and tokenization of credits, facilitating their management, trading, and retirement across various blockchain networks and registries.\
   Purpose: Digitize projects and credits directly with ecoLedger.

Components: ecoLedger, ecoToken Bridging service\ <br>

4. dApp Layer: A decentralized application with a user-centric interface that offers easy access to interact with ecoLedger. This includes purchasing and initiating their retirement via cryptocurrencies or fiat. The interface is designed to be intuitive, catering to users with varying levels of blockchain expertise.\
   Purpose: Purchasing, Minting, and Retiring Cross-Chain ecoCredits.\
   Components: app.ecoToken.earth\ <br>

Verra (Web2) Use Case

Tokenization: Credits from projects on Verra are digitized and tokenized when registered through our Projects Minting Layer for compatibility with the ecoLedger system, enabling them to participate in Web3 functionalities.\ <br>

Bridging and Retirement: Credits are bridged through ecoLedger’s bridge.ecoToken.earth service, allowing them to be managed, traded, and retired within the ecoLedger ecosystem. This process includes steps to ensure regulatory compliance and maintain the integrity of the original credit attributes.\
\
Integration Process: For Verra-registered projects, ecoLedger utilizes its API integration to synchronize data, including credit issuance, status updates, and retirement records.

\ <br>

REGEN (Web3) Use Case

Blockchain Interaction: Direct interaction with the REGEN blockchain allows for real-time management of credits. ecoLedger handles smart contract calls for credit issuance, transfers, and retirement.

<br>

Cross-Chain Functionality: Utilizing ecoLedger’s technology, REGEN credits can be bridged to other blockchains, enhancing their liquidity and market accessibility.

<br>

Retirement Process: The retirement of REGEN credits involves blockchain-specific commands, ensuring that credits are appropriately retired or invalidated within the ecosystem, maintaining transparency and traceability.

#### ecoLedger Data Schema

The ecoLedger protocol's database is structured to efficiently manage and track environmental credit transactions. The schema is designed to support the protocol's core functionalities, ensuring data integrity and facilitating cross-chain interactions.\
\
Use Cases Supported

<br>

Multiple Token Pools Management:

* The TokenPool and CreditEvent models support the tracking and management of multiple token pools, aligning with the CarbonTokenPool class logic.

Leaderboards:

* Aggregated data from CreditTransaction and CreditRetirement, linked to User and WalletAddress, support leaderboard displays.

User Portfolios:

* Users can view their purchased and retired credits, sourced from CreditTransaction and CreditRetirement.

Auditing:

* Detailed records in CreditTransaction provide extensive data for auditing, including credit amounts, values, blockchain details, and transaction specifics

Schema Overview\
\
This comprehensive Prisma schema lays the foundation for the ecoLedger system, enabling efficient data management and supporting a wide range of functionalities. It is well-prepared to handle the complexities of environmental credit transactions and tokenomics in a blockchain environment.

**Schema Models and Their Roles**\
\
**The ecoLedger database schema comprises several models, each tailored to capture specific aspects of environmental credit transactions and tokenomics.**\ <br>

User

Fields:

* id: A unique identifier for each user.
* email: User's email address, optional for anonymity. Unique across the system.

Purpose:

* Represents users in the ecoLedger system.
* Links to wallet addresses, transactions, and credit events.

WalletAddress

Fields:

* id: Unique identifier for each wallet address entry.
* userId: Links the wallet address to a specific user.
* address: The blockchain wallet address.

Purpose:

* Stores blockchain wallet addresses associated with users.
* Essential for tracking transactions and leaderboards.

ProjectBasicInfo

Fields:

* projectId: Unique identifier for each environmental project.
* title, location, creditType, creditClass, registry: Provide detailed project information.
* url: Optional web reference for more information.

Purpose:

* Represents environmental projects within ecoLedger.
* Links to transactions related to the project.

CreditTransaction

Fields:

* transactionId: Unique identifier for each transaction.
* userId, projectId, quantity, transactionHash, price, source, sourceName, chain, transactionDate: Capture transaction details.

Purpose:

* Records details of credit transactions.
* Links to users, projects, retirement records, and credit events.

CreditRetirement

Fields:

* retirementId: Unique identifier for each retirement record.
* transactionId: Links to the associated credit transaction.
* retirementHash, retirementPrice, source, sourceName, retirementDate: Provide retirement details.

Purpose:

* Details the retirement process of credits.
* Links to the corresponding credit transaction.

TokenPool

Fields:

* id: Unique identifier for each token pool.
* poolValue: Total value of the pool.
* totalTokens: Total number of tokens in the pool.

Purpose:

* Represents a pool of tokens in ecoLedger.
* Linked to credit events that affect the pool's value and token count.

CreditEvent

Fields:

* id: Unique identifier for each credit event.
* creditValue, tokensMinted, dateAdded: Capture event details.
* userId, transactionId, tokenPoolId: Links to user, transaction, and token pool.

Purpose:

* Tracks credit events affecting token pools.
* Links to users, transactions, and specific token pools.

**Schema Design Considerations**\ <br>

Data Integrity and Relations:

* The schema ensures data integrity through unique identifiers and relational links between models.
* The one-to-one and one-to-many relationships are carefully structured to reflect real-world scenarios and data requirements.

Performance Optimization:

* Indexes are added to key foreign key fields for optimized query performance, crucial for leaderboards and transaction history retrieval.

Flexibility and Scalability:

* The schema is designed to accommodate a variety of use cases, including multiple token pools, diverse transaction types, and user interactions.
* It is scalable and capable of handling a large volume of data and transactions.

Auditing and Reporting:

* The detailed transaction records and credit events provide comprehensive data for auditing and reporting purposes.
* Leaderboards and user portfolios can be generated by aggregating data from relevant models.

Protocol Tokenomics

<figure><img src="https://lh7-us.googleusercontent.com/jAE_-2gF5rP-mWymsJuBxnAMq3SWMInOhRD0hJlOKTTejCYeExkio-caiMMsiN8Zfo407UcAbdrPE1_wkrejSfpbNIapjBEiMU4N80lOOGhCPIwRXbjfM6T5KHDn0w8jOVxx5qrBcNDxwtszJwhajVw" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-us.googleusercontent.com/Idsktx7ttrJQEDfy71BPSCLXKNc90xfVvg8wtsFLTn9cBJeJISqrudtgQ9yTRojSSPtPJpDLNdBQOOTIxAjXFyLWxYIY8Z2wkGaroAPy5rTl7MYyvnlxRgKHuG_q6_LlsVePgW_08Duo-3e_XkNfuMM" alt=""><figcaption></figcaption></figure>

PLACEHOLDER: White-label and Customizable Platform Offering

Offering a white-label version of the ecoLedger platform, tailored for organizations looking to provide environmental credit management services under their brand.

\
Features and Customization

* Includes all core functionalities of ecoLedger such as ecoCredit Tokenization, Bridging, and Lifecycle Management.
* Allows for customization of user interfaces, reports, and data integration to align with the branding and operational needs of the client.

\
Support and Integration

* Provides comprehensive support for integration with existing systems and registries.
* Ensures seamless adoption of ecoLedger’s technology under the client’s brand, maintaining the underlying robust security and functionality.

<br>

Security Considerations\
The ecoLedger protocol integrates advanced cryptographic techniques to ensure the authenticity and non-repudiation of transactions across blockchains. Data integrity and privacy are upheld through the implementation of secure smart contracts and privacy-preserving protocols.

#### Governance

The ecoLedger protocol is overseen by a decentralized autonomous organization (DAO), ensuring democratic decision-making and continuous improvement of the system based on stakeholder feedback and evolving market needs.

#### Conclusion

The ecoLedger protocol is a pioneering step towards a unified, cross-chain carbon credit market that upholds the principles of environmental stewardship. It is a testament to the power of blockchain technology to foster transparency, efficiency, and collaboration in the fight against climate change

<br>
