-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add ERC: ATF-AI Governance Framework for ESG Compliance #10682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
agronetlabs
wants to merge
17
commits into
ethereum:master
Choose a base branch
from
agronetlabs:eip-agrocrypto-quantum
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+172
−1
Open
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
08800ff
Add badges for project verification and deployment status
agronetlabs 57fd7c3
feat: add AgroCrypto Quantum Governance EIP draft
agronetlabs b99b972
Add AgroCrypto Quantum Governance EIP
agronetlabs d83e335
Update README with AgroCrypto EIP details
agronetlabs 02177f0
Remove AgroCrypto Quantum Governance draft details
agronetlabs 644a19b
Fix link formatting in README.md
agronetlabs e65ec37
Change title to 'EIP: AgroCrypto Quantum Governance'
agronetlabs a21f213
Update README header for EIPs repository
agronetlabs b7550f7
Fix typo in README title from 'Proposal' to 'Proposals'
agronetlabs ed9ce81
EIP: fix Markdown formatting, add Motivation, correct JSON-RPC exampl…
agronetlabs 3f93098
Revise AgroCrypto Quantum Governance EIP details
agronetlabs 355810b
Rename eip-agrocrypto-quantum.md to eip-8040.md
agronetlabs 40e7045
fix: correct struct order, update references, and improve formatting
agronetlabs e62a91f
fix: update discussions-to link to correct Ethereum Magicians thread
agronetlabs b315459
Revise EIP-8040 for ESG Tokenization Protocol
agronetlabs a67d3e8
Change category from ERC to Core in EIP-8040
agronetlabs 1c16d7b
fix(readme): add blank line after heading for MD022 compliance
agronetlabs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| --- | ||
| eip: 8040 | ||
| title: ESG Tokenization Protocol | ||
| 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/25846 | ||
| status: Draft | ||
| type: Standards Track | ||
| category: ERC | ||
|
Check failure on line 9 in EIPS/eip-8040.md
|
||
| created: 2025-09-06 | ||
| requires: 20, 721, 1155 | ||
| --- | ||
|
|
||
| ## Abstract | ||
|
|
||
| This ERC defines an AI-native protocol for ESG-compliant asset tokenization, with quantum auditability, compliance-grade metadata, and lifecycle integrity. | ||
|
|
||
| ## Specification | ||
|
|
||
| ### Metadata Structure | ||
|
|
||
| Tokens MUST expose a metadata JSON with the following minimum fields: | ||
|
|
||
|
|
||
| ```json | ||
| { | ||
| "standard": "ERC-ESG/1.0", | ||
| "category": "carbon", | ||
| "geo": "BR-RS", | ||
| "carbon_value": 12.5, | ||
| "cycle": "2025-Q3", | ||
| "digest": "sha3-512:...", | ||
| "physical_id": "seal:XYZ123", | ||
| "attestation": { | ||
| "atf_digest": "sha3-512:...", | ||
| "signer": "did:atf:ai:..." | ||
| }, | ||
| "status": "issued|audited|retired", | ||
| "evidence": "cid:Qm..." | ||
| } | ||
| ``` | ||
|
|
||
| ### Smart Contract Interface | ||
|
|
||
| Contracts implementing this standard MUST support the following interface: | ||
|
|
||
| ```solidity | ||
|
|
||
| pragma solidity ^0.8.0; | ||
|
|
||
| interface IERC8040 { | ||
| /// @notice Metadata structure for ESG tokens | ||
| /// @dev All digest fields use bytes to support SHA3-512 (64 bytes) | ||
| struct Metadata { | ||
| string standard; | ||
| string category; | ||
| string geo; | ||
| uint256 carbon_value; | ||
| string cycle; | ||
| bytes digest; // SHA3-512 digest (64 bytes) | ||
| string physical_id; | ||
| Attestation attestation; | ||
| string status; | ||
| string evidence; | ||
| } | ||
|
|
||
| /// @notice Attestation structure for AI-native validation | ||
| /// @dev atf_digest uses bytes to support SHA3-512 (64 bytes) | ||
| struct Attestation { | ||
| bytes atf_digest; // SHA3-512 attestation digest (64 bytes) | ||
| string signer; | ||
| } | ||
|
|
||
| /// @notice Mints a new ESG token with provided metadata | ||
| /// @param metadata The ESG metadata structure | ||
| /// @return tokenId The ID of the newly minted token | ||
| function mintESGToken(Metadata memory metadata) external returns (uint256 tokenId); | ||
|
|
||
| /// @notice Audits an existing ESG token | ||
| /// @param tokenId The token to audit | ||
| /// @param auditDigest SHA3-512 digest of the audit report (64 bytes) | ||
| function auditESGToken(uint256 tokenId, bytes memory auditDigest) external; | ||
|
|
||
| /// @notice Retires an ESG token permanently | ||
| /// @param tokenId The token to retire | ||
| /// @param reason Human-readable retirement reason | ||
| function retireESGToken(uint256 tokenId, string memory reason) external; | ||
|
|
||
| /// @notice Returns the ESG metadata URI for a token | ||
| /// @param tokenId The token ID | ||
| /// @return The URI string pointing to off-chain metadata | ||
| function esgURI(uint256 tokenId) external view returns (string memory); | ||
|
|
||
| /// @notice Returns the complete on-chain metadata for a token | ||
| /// @param tokenId The token ID | ||
| /// @return The complete Metadata structure | ||
| function getMetadata(uint256 tokenId) external view returns (Metadata memory); | ||
|
|
||
| /// @notice Emitted when a new ESG token is minted | ||
| /// @param tokenId The ID of the minted token | ||
| /// @param category The ESG category (e.g., "carbon") | ||
| /// @param geo Geographic identifier (e.g., "BR-RS") | ||
| event Minted(uint256 indexed tokenId, string category, string geo); | ||
|
|
||
| /// @notice Emitted when a token is attested by AI validator | ||
| /// @param tokenId The ID of the attested token | ||
| /// @param atfDigest SHA3-512 digest of the attestation (64 bytes) | ||
| /// @param esgURI The URI of the ESG metadata | ||
| event Attested(uint256 indexed tokenId, bytes atfDigest, string esgURI); | ||
|
|
||
| /// @notice Emitted when a token is permanently retired | ||
| /// @param tokenId The ID of the retired token | ||
| /// @param timestamp The retirement timestamp | ||
| /// @param reason Human-readable retirement reason | ||
| event Retired(uint256 indexed tokenId, uint256 timestamp, string reason); | ||
| } | ||
| ``` | ||
|
|
||
| ### JSON-RPC Example | ||
|
|
||
| ```json | ||
|
|
||
| { | ||
| "method": "eth_call", | ||
| "params": [ | ||
| { | ||
| "to": "0xContractAddress", | ||
| "data": "0x..." | ||
| } | ||
| ], | ||
| "example_metadata": { | ||
| "category": "carbon", | ||
| "geo": "BR-RS", | ||
| "carbon_value": 12.5, | ||
| "digest": "sha3-512:abc123def456...", | ||
| "attestation": { | ||
| "atf_digest": "sha3-512:xyz789...", | ||
| "signer": "did:atf:ai:validator-001" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Mapping & Compatibility | ||
|
|
||
| - [ERC-20](./eip-20.md): Each unit represents a standardized fraction (e.g., 1e18 = 1 tCO2e). | ||
| - [ERC-721](./eip-721.md): Single credit with unique esgURI and immutable metadata. | ||
| - [ERC-1155](./eip-1155.md): Homogeneous batch with common URI, metadata, and fungible amounts. | ||
|
|
||
| ## Rationale | ||
|
|
||
| - **Deterministic flows**: Lifecycle follows strict state transitions (issued → audited → retired). | ||
| - **Immutable metadata**: SHA3-512 digest ensures tamper-proof records with 512-bit security. | ||
| - **Machine-verifiable audit trails**: ATF-AI validates compliance deterministically. | ||
| - **Post-quantum readiness**: SHA3-512 hash functions provide quantum-resistant cryptography. | ||
| - **Full hash storage**: Using bytes instead of bytes32 allows complete SHA3-512 digest storage (64 bytes). | ||
|
|
||
| ## 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 (64 bytes) ensures audit-trail integrity. Implementations MUST use bytes type to store complete 512-bit digests. | ||
| 4. **Post-quantum cryptography**: Hash functions and signature schemes MUST be quantum-resistant. SHA3-512 provides 512-bit security suitable for post-quantum scenarios. | ||
| 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 using SHA3-512 and publicly referenced on-chain. | ||
| 8. **Hash truncation prevention**: Implementations MUST NOT truncate SHA3-512 digests. The bytes type MUST be used instead of bytes32 to prevent loss of cryptographic security. | ||
|
|
||
| ## Copyright | ||
|
|
||
| Copyright and related rights waived via CC0-1.0. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.