Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 30 additions & 147 deletions ERCS/erc-8040.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
---
eip: 8040
title: ESG Tokenization Protocol
description: AI-native ESG asset tokenization protocol ensuring lifecycle integrity and quantum-grade auditability.
description: ESG-compliant, AI-native asset tokenization with quantum auditability and lifecycle integrity.
author: Leandro Lemos (@agronetlabs) <[email protected]>
discussions-to: https://ethereum-magicians.org/t/erc-8040-esg-tokenization-protocol/19840
discussions-to: https://ethereum-magicians.org/t/erc-8040-esg-tokenization-protocol/25846
status: Draft
type: Standards Track
category: ERC
created: 2025-09-06
requires: 20, 721, 1155
license: CC0
---

# Abstract
## Abstract

This EIP defines a compliance-grade, AI-native protocol for ESG-compliant asset tokenization, governed by ATF-AI and protected by post-quantum cryptography. It codifies lifecycle, metadata, and auditability for compliance-grade deployment, aligns with UN SDGs, and enforces machine-verifiable governance for public, audit-ready markets.
This ERC defines an AI-native protocol for ESG-compliant asset tokenization, with quantum auditability, compliance-grade metadata, and lifecycle integrity.

# Motivation
## Specification

ESG tokenization requires:
- Immutable audit trails
- Machine-verifiable compliance
- Post-quantum cryptographic security
- Deterministic lifecycle management
- Integration with AI-governed DAOs

# Specification

## Metadata Structure
### Metadata Structure

Tokens MUST expose a metadata JSON with the following minimum fields:

Expand All @@ -49,15 +39,14 @@ Tokens MUST expose a metadata JSON with the following minimum fields:
}
```

## Smart Contract Interface
### Smart Contract Interface

Contracts implementing this standard MUST support the following interface:

```solidity
pragma solidity ^0.8.0;

interface IESCG8040 {

interface IERC8040 {
struct Metadata {
string standard;
string category;
Expand All @@ -70,43 +59,32 @@ interface IESCG8040 {
string status;
string evidence;
}

struct Attestation {
bytes32 atf_digest;
string signer;
}

// Core Functions

function mintESGToken(Metadata memory metadata) external returns (uint256 tokenId);

function auditESGToken(uint256 tokenId, bytes32 auditDigest) external;

function retireESGToken(uint256 tokenId, string memory reason) external;

function esgURI(uint256 tokenId) external view returns (string memory);

function getMetadata(uint256 tokenId) external view returns (Metadata memory);

// Events

event Minted(uint256 indexed tokenId, string category, string geo);

event Attested(uint256 indexed tokenId, bytes32 atfDigest, string esgURI);

event Retired(uint256 indexed tokenId, uint256 timestamp, string reason);
}
```

## Events
### Events

```solidity
event Minted(uint256 indexed tokenId, string category, string geo);

event Attested(uint256 indexed tokenId, bytes32 atfDigest, string esgURI);

event Retired(uint256 indexed tokenId, uint256 timestamp, string reason);
```

## JSON-RPC Example
### JSON-RPC Example

```json
{
Expand All @@ -126,124 +104,29 @@ event Retired(uint256 indexed tokenId, uint256 timestamp, string reason);
}
```

## Mapping & Compatibility

- **ERC-20**: Each unit represents a standardized fraction (e.g., 1e18 = 1 tCO2e).
- **ERC-721**: Single credit with unique esgURI and immutable metadata.
- **ERC-1155**: Homogeneous batch with common URI, metadata, and fungible amounts.

# Rationale

This protocol enforces:

- **Deterministic Flows**: Lifecycle follows strict state transitions (issued → audited → retired)
- **Immutable Metadata**: SHA3-512 digest ensures tamper-proof records
- **Machine-Verifiable Audit Trails**: ATF-AI validates compliance deterministically
- **Post-Quantum Readiness**: Hash functions support quantum-resistant cryptography

### AI-Compliance Definition
### Mapping & Compatibility

**AI-Compliance = AI-Governed DAO**
- **[ERC-20](https://eips.ethereum.org/EIPS/eip-20)**: Each unit represents a standardized fraction (e.g., 1e18 = 1 tCO2e).
- **[ERC-721](https://eips.ethereum.org/EIPS/eip-721)**: Single credit with unique esgURI and immutable metadata.
- **[ERC-1155](https://eips.ethereum.org/EIPS/eip-1155)**: Homogeneous batch with common URI, metadata, and fungible amounts.

Governance is executed through an AI-Governed DAO rather than discretionary human oversight. This establishes a deterministic, audit-ready compliance mechanism across all jurisdictions.
## Rationale

### Technical Rationale
- Deterministic flows: Lifecycle follows strict state transitions (issued → audited → retired).
- Immutable metadata: SHA3-512 digest ensures tamper-proof records.
- Machine-verifiable audit trails: ATF-AI validates compliance deterministically.
- Post-quantum readiness: Hash functions support quantum-resistant cryptography.

- `atfDigest` and `buildDigest` unite off-chain audit with on-chain proof
- Protocol is extensible via optional interfaces to prevent hard-forks
- Zero-trust validation ensures all attestations are timestamped and verifiable
## Security Considerations

# Backwards Compatibility
1. Metadata immutability: All metadata fields MUST be cryptographically sealed after minting.
2. Zero-trust validation: ATF-AI provides deterministic validation; all attestations are timestamped.
3. Digest integrity: SHA3-512 ensures audit-trail integrity.
4. Post-quantum cryptography: Hash functions and signature schemes MUST be quantum-resistant.
5. Irreversible retirement: Once retired, tokens cannot be reactivated.
6. Physical seal validation: On-chain digest MUST match physical seal cryptographic hash.
7. Input validation: All off-chain documents MUST be hashed and publicly referenced on-chain.

This standard does not break ERC-20/721/1155 compatibility.

- Legacy tokens may reference metadata externally but lack full ATF-AI compliance
- Migration tools can wrap legacy tokens with compliant metadata
- Gradual adoption is supported through optional interface implementation

# Test Cases

| Test Case | Expected Outcome |
|-----------|------------------|
| Mint token with valid metadata | Token created with immutable metadata |
| Mint token with invalid digest | Transaction reverts |
| Audit token with ATF-AI digest | Token status transitions to "audited" |
| Retire token with valid reason | Token irreversibly marked as "retired" |
| Validate physical seal against digest | Seal verification succeeds/fails deterministically |
| Query esgURI for audited token | Returns immutable URI reference |

# Security Considerations

1. **Metadata Immutability**: All metadata fields MUST be cryptographically sealed after minting
2. **Zero-Trust Validation**: ATF-AI provides deterministic validation; all attestations are timestamped
3. **Digest Integrity**: SHA3-512 ensures audit-trail integrity
4. **Post-Quantum Cryptography**: Hash functions and signature schemes MUST be quantum-resistant
5. **Irreversible Retirement**: Once retired, tokens cannot be reactivated
6. **Physical Seal Validation**: On-chain digest MUST match physical seal cryptographic hash
7. **Input Validation**: All off-chain documents MUST be hashed and publicly referenced on-chain

# Reference Implementation

- **Repository**: [agrocrypto-core](https://github.com/AgroCryptoLabs/agrocrypto-core)
- **Version**: v2.0.0
- **Authors**: AgroCrypto Labs LLC
- **License**: CC0-1.0

### Reference Hashes (for auditability)

```
201672f1605f30a361254cacbb073d8de7b806ba392ef82ca4723e17f4d39dd6
f81783bcda0f70958b05732651fb7ca30a0cef4c3acf0bf45ca4dfa3e7a23645
```

**Timestamp**: 2025-09-06T08:21:00 PDT

# Copyright
## Copyright

Copyright and related rights waived via CC0-1.0.

© 2023–2025 AgroCrypto Labs LLC — compliance-grade framework.

# Changelog

All changes to this protocol are treated as compliance-grade events. Each entry is timestamped and hashed for public auditability.

## [1.0.0] — 2025-09-06

**Added**
- Initial publication of ERC-8040 ESG Tokenization Protocol
- Lifecycle methods: `mintESGToken`, `auditESGToken`, `retireESGToken`
- Metadata structure with SHA3-512 digest and optional physical seal
- JSON-RPC examples for AI-native minting
- Reference implementation: agrocrypto-core v2.0.0
- Security considerations: PQC readiness, zero-trust validation, seal verification
- Comprehensive test cases for all lifecycle transitions
- AI-Compliance definition and AI-Governed DAO integration

**Hashes**:
```
201672f1605f30a361254cacbb073d8de7b806ba392ef82ca4723e17f4d39dd6
f81783bcda0f70958b05732651fb7ca30a0cef4c3acf0bf45ca4dfa3e7a23645
```

## [1.0.1] — Planned

**Planned Features**
- Integration with AgroPay for ESG token lifecycle tracking
- Visual seal registry with cryptographic linkage to metadata
- Expanded test cases for multi-jurisdiction audit flows
- Optional bridge module for multi-chain deployment
- Enhanced JSON-RPC documentation

# Compliance Notes

- All corrections are treated as compliance-grade events
- Hashes are published publicly and timestamped
- No retroactive edits permitted without changelog entry
- All amendments require consensus from ATF-AI governance

---

**© 2023–2025 AgroCrypto Labs LLC — compliance-grade framework**

---