Skip to content

Commit e26fc45

Browse files
committed
Address ERC-8040 review feedback
1 parent 3ae6373 commit e26fc45

1 file changed

Lines changed: 63 additions & 46 deletions

File tree

ERCS/erc-8040.md

Lines changed: 63 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
eip: 8040
33
title: ESG Tokenization Protocol
4-
description: ESG-compliant, AI-native asset tokenization with quantum auditability and lifecycle integrity.
4+
description: Environmental, Social, and Governance (ESG) asset tokenization with metadata, attestations, and lifecycle integrity.
55
author: Leandro Lemos (@agronetlabs) <leandro@agronet.io>
66
discussions-to: https://ethereum-magicians.org/t/erc-8040-esg-tokenization-protocol/25846
77
status: Draft
@@ -13,18 +13,22 @@ requires: 20, 721, 1155
1313

1414
## Abstract
1515

16-
This ERC defines an AI-native protocol for ESG-compliant asset tokenization, with quantum auditability, compliance-grade metadata, and lifecycle integrity.
16+
This ERC defines an overlay interface and metadata schema for representing Environmental, Social, and Governance (ESG) assets with existing token standards. Compliant contracts expose ESG metadata through a token-specific URI and an optional on-chain metadata view, record attestations as cryptographic digests, and emit events when assets are minted, audited, attested, or retired. The interface is intended to be implemented alongside [ERC-20](./eip-20.md), [ERC-721](./eip-721.md), or [ERC-1155](./eip-1155.md) so that ESG assets can keep their normal transfer semantics while adding machine-readable lifecycle state.
1717

1818
## Specification
1919

20+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119) and [RFC 8174](https://www.rfc-editor.org/rfc/rfc8174).
21+
22+
This ERC is an overlay for tokenized ESG assets. Implementations maintain normal token ownership and transfer behavior through a base token standard, and add this ERC's functions for ESG metadata retrieval, audit recording, attestation recording, and retirement. Each token has a lifecycle status of `issued`, `audited`, or `retired`.
23+
2024
### Metadata Structure
2125

22-
Tokens MUST expose a metadata JSON with the following minimum fields:
26+
Tokens MUST expose a metadata JSON document with the following minimum fields. Implementations MUST make this document available from `esgURI(uint256 tokenId)`. Implementations MAY also return the same values through `getMetadata(uint256 tokenId)` when storing the metadata on-chain.
2327

2428

2529
```json
2630
{
27-
"standard": "ERC-ESG/1.0",
31+
"standard": "ERC-8040/1.0",
2832
"category": "carbon",
2933
"geo": "BR-RS",
3034
"carbon_value": 12.5,
@@ -40,86 +44,97 @@ Tokens MUST expose a metadata JSON with the following minimum fields:
4044
}
4145
```
4246

47+
The `standard` field identifies the metadata version. The `category` field describes the ESG asset class. The `geo` field identifies the geographic area for the asset. The `carbon_value` field represents the asset value for carbon assets. The `digest`, `physical_id`, `attestation`, and `evidence` fields bind the token to source records, external attestations, and supporting documentation. The `status` field records the lifecycle state.
48+
4349
### Smart Contract Interface
4450

4551
Contracts implementing this standard MUST support the following interface:
4652

4753
```solidity
48-
4954
pragma solidity ^0.8.0;
5055
5156
interface IERC8040 {
52-
/// @notice Metadata structure for ESG tokens
53-
/// @dev All digest fields use bytes to support SHA3-512 (64 bytes)
57+
/// @notice Metadata structure for Environmental, Social, and Governance tokens.
58+
/// @dev Digest fields use bytes to support SHA3-512 values without truncation.
5459
struct Metadata {
5560
string standard;
5661
string category;
5762
string geo;
5863
uint256 carbon_value;
5964
string cycle;
60-
bytes digest; // SHA3-512 digest (64 bytes)
65+
bytes digest; // SHA3-512 digest of the metadata or source document.
6166
string physical_id;
6267
Attestation attestation;
6368
string status;
6469
string evidence;
6570
}
6671
67-
/// @notice Attestation structure for AI-native validation
68-
/// @dev atf_digest uses bytes to support SHA3-512 (64 bytes)
72+
/// @notice Attestation structure for an external audit or validation result.
73+
/// @dev atf_digest is a SHA3-512 digest of the attestation record.
6974
struct Attestation {
70-
bytes atf_digest; // SHA3-512 attestation digest (64 bytes)
75+
bytes atf_digest;
7176
string signer;
7277
}
7378
74-
/// @notice Mints a new ESG token with provided metadata
75-
/// @param metadata The ESG metadata structure
79+
/// @notice Mints a new ESG token with provided metadata.
80+
/// @dev The caller MUST be authorized by the implementation to issue ESG assets.
81+
/// The initial lifecycle status MUST be issued.
82+
/// @param metadata The ESG metadata structure.
7683
/// @return tokenId The ID of the newly minted token
7784
function mintESGToken(Metadata memory metadata) external returns (uint256 tokenId);
7885
79-
/// @notice Audits an existing ESG token
80-
/// @param tokenId The token to audit
81-
/// @param auditDigest SHA3-512 digest of the audit report (64 bytes)
86+
/// @notice Records an audit for an existing ESG token.
87+
/// @dev The caller MUST be authorized by the implementation to audit ESG assets.
88+
/// The lifecycle status MUST become audited after a successful audit.
89+
/// @param tokenId The token to audit.
90+
/// @param auditDigest SHA3-512 digest of the audit report.
8291
function auditESGToken(uint256 tokenId, bytes memory auditDigest) external;
8392
84-
/// @notice Retires an ESG token permanently
85-
/// @param tokenId The token to retire
86-
/// @param reason Human-readable retirement reason
93+
/// @notice Retires an ESG token permanently.
94+
/// @dev The caller MUST be the token owner, an approved operator, or otherwise
95+
/// authorized by the implementation. Retired tokens MUST NOT be reactivated.
96+
/// @param tokenId The token to retire.
97+
/// @param reason Human-readable retirement reason.
8798
function retireESGToken(uint256 tokenId, string memory reason) external;
8899
89-
/// @notice Returns the ESG metadata URI for a token
90-
/// @param tokenId The token ID
91-
/// @return The URI string pointing to off-chain metadata
100+
/// @notice Returns the ESG metadata Uniform Resource Identifier (URI) for a token.
101+
/// @param tokenId The token ID.
102+
/// @return The URI string pointing to the metadata JSON document.
92103
function esgURI(uint256 tokenId) external view returns (string memory);
93104
94-
/// @notice Returns the complete on-chain metadata for a token
95-
/// @param tokenId The token ID
96-
/// @return The complete Metadata structure
105+
/// @notice Returns the complete on-chain metadata for a token.
106+
/// @param tokenId The token ID.
107+
/// @return The complete Metadata structure.
97108
function getMetadata(uint256 tokenId) external view returns (Metadata memory);
98109
99-
/// @notice Emitted when a new ESG token is minted
100-
/// @param tokenId The ID of the minted token
101-
/// @param category The ESG category (e.g., "carbon")
102-
/// @param geo Geographic identifier (e.g., "BR-RS")
110+
/// @notice Emitted when a new ESG token is minted.
111+
/// @param tokenId The ID of the minted token.
112+
/// @param category The ESG category, such as carbon.
113+
/// @param geo Geographic identifier, such as an ISO 3166-2 subdivision code.
103114
event Minted(uint256 indexed tokenId, string category, string geo);
115+
116+
/// @notice Emitted when an ESG token is audited.
117+
/// @param tokenId The ID of the audited token.
118+
/// @param auditDigest SHA3-512 digest of the audit report.
119+
event Audited(uint256 indexed tokenId, bytes auditDigest);
104120
105-
/// @notice Emitted when a token is attested by AI validator
106-
/// @param tokenId The ID of the attested token
107-
/// @param atfDigest SHA3-512 digest of the attestation (64 bytes)
108-
/// @param esgURI The URI of the ESG metadata
121+
/// @notice Emitted when a token receives an external attestation.
122+
/// @param tokenId The ID of the attested token.
123+
/// @param atfDigest SHA3-512 digest of the attestation record.
124+
/// @param esgURI The URI of the ESG metadata.
109125
event Attested(uint256 indexed tokenId, bytes atfDigest, string esgURI);
110126
111-
/// @notice Emitted when a token is permanently retired
112-
/// @param tokenId The ID of the retired token
113-
/// @param timestamp The retirement timestamp
114-
/// @param reason Human-readable retirement reason
127+
/// @notice Emitted when a token is permanently retired.
128+
/// @param tokenId The ID of the retired token.
129+
/// @param timestamp The retirement timestamp.
130+
/// @param reason Human-readable retirement reason.
115131
event Retired(uint256 indexed tokenId, uint256 timestamp, string reason);
116132
}
117133
```
118134

119135
### JSON-RPC Example
120136

121137
```json
122-
123138
{
124139
"method": "eth_call",
125140
"params": [
@@ -143,22 +158,24 @@ interface IERC8040 {
143158

144159
### Mapping & Compatibility
145160

146-
- [ERC-20](./eip-20.md): Each unit represents a standardized fraction (e.g., 1e18 = 1 tCO2e).
147-
- [ERC-721](./eip-721.md): Single credit with unique esgURI and immutable metadata.
161+
This ERC does not replace [ERC-20](./eip-20.md), [ERC-721](./eip-721.md), or [ERC-1155](./eip-1155.md). A compliant contract implements this ERC in addition to at least one base token standard.
162+
163+
- [ERC-20](./eip-20.md): Each unit represents a standardized fraction, such as 1e18 units representing one metric tonne of carbon dioxide equivalent (tCO2e).
164+
- [ERC-721](./eip-721.md): Single credit with unique `esgURI` and immutable metadata.
148165
- [ERC-1155](./eip-1155.md): Homogeneous batch with common URI, metadata, and fungible amounts.
149166

150167
## Rationale
151168

152-
- **Deterministic flows**: Lifecycle follows strict state transitions (issuedauditedretired).
153-
- **Immutable metadata**: SHA3-512 digest ensures tamper-proof records with 512-bit security.
154-
- **Machine-verifiable audit trails**: ATF-AI validates compliance deterministically.
155-
- **Post-quantum readiness**: SHA3-512 hash functions provide quantum-resistant cryptography.
169+
- **Deterministic flows**: Lifecycle follows strict state transitions (`issued` to `audited` to `retired`).
170+
- **Immutable metadata**: SHA3-512 digests bind metadata and evidence documents to the token record.
171+
- **Machine-verifiable audit trails**: Attestation digests and events allow off-chain systems to verify audit records deterministically.
172+
- **Post-quantum readiness**: SHA3-512 hash functions provide preimage resistance suitable for long-lived audit records.
156173
- **Full hash storage**: Using bytes instead of bytes32 allows complete SHA3-512 digest storage (64 bytes).
157174

158175
## Security Considerations
159176

160177
1. **Metadata immutability**: All metadata fields MUST be cryptographically sealed after minting.
161-
2. **Zero-trust validation**: ATF-AI provides deterministic validation; all attestations are timestamped.
178+
2. **Validation independence**: Implementations MUST NOT rely on unauthenticated off-chain statements. Attestations MUST be represented by verifiable digests and events.
162179
3. **Digest integrity**: SHA3-512 (64 bytes) ensures audit-trail integrity. Implementations MUST use bytes type to store complete 512-bit digests.
163180
4. **Post-quantum cryptography**: Hash functions and signature schemes MUST be quantum-resistant. SHA3-512 provides 512-bit security suitable for post-quantum scenarios.
164181
5. **Irreversible retirement**: Once retired, tokens cannot be reactivated.
@@ -168,4 +185,4 @@ interface IERC8040 {
168185

169186
## Copyright
170187

171-
Copyright and related rights waived via CC0-1.0.
188+
Copyright and related rights waived via [CC0](../LICENSE.md).

0 commit comments

Comments
 (0)