---
eip: 8040
label: ERC-8040
title: ESG Tokenization Protocol
status: Draft
type: Standards Track
category: ERC
created: 2025-09-06
requires: 20, 721, 1155
official: https://eips.ethereum.org/EIPS/eip-8040
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8040.md
canonical: https://eips.huatuo.xyz/eip-8040/
lang: en
tldr: An overlay interface that adds ESG metadata, audit and attestation digests, and an issued-audited-retired lifecycle to ERC-20, ERC-721 or ERC-1155 tokens representing assets such as carbon credits.
tags: [esg, carbon, rwa, metadata, tokenization]
---

# ERC-8040: ESG Tokenization Protocol

> Environmental, Social, and Governance (ESG) asset tokenization with metadata, attestations, and lifecycle integrity.

**TL;DR:** An overlay interface that adds ESG metadata, audit and attestation digests, and an issued-audited-retired lifecycle to ERC-20, ERC-721 or ERC-1155 tokens representing assets such as carbon credits.

## What problem does it solve?

Tokenized environmental, social and governance (ESG) assets, carbon credits being the obvious example, need more than ownership and transfers. Buyers and registries want to know where the asset comes from, whether it has been audited, which documents back it, and whether it has already been **retired** (consumed to offset emissions) so it cannot be counted twice. Each project tends to model this differently.

ERC-8040 adds a common layer for that information on top of the token standards people already use, so wallets, marketplaces and auditors can read ESG lifecycle state in one way.

## How it works

A compliant contract implements one base standard, [ERC-20](/eip-20/), [ERC-721](/eip-721/) or [ERC-1155](/eip-1155/), for ownership and transfers, **plus** the `IERC8040` interface:

- **Metadata**: `esgURI(tokenId)` must return a JSON document with at least `standard` (`"ERC-8040/1.0"`), `category` (for example `carbon`), `geo` (for example an ISO 3166-2 code), `carbon_value`, `cycle`, `digest`, `physical_id`, `attestation {atf_digest, signer}`, `status` and `evidence`. `getMetadata(tokenId)` may return the same data on-chain.
- **Lifecycle**: every token is `issued` → `audited` → `retired`.
  - `mintESGToken(metadata)` by an authorised issuer; status starts as `issued`.
  - `auditESGToken(tokenId, auditDigest)` by an authorised auditor; status becomes `audited`.
  - `retireESGToken(tokenId, reason)` by the owner, an approved operator or an authorised party. Retirement is permanent.
- **Digests**: documents, audits and attestations are referenced by full 64-byte SHA3-512 digests stored as `bytes` (never truncated to `bytes32`).
- **Events**: `Minted`, `Audited`, `Attested` and `Retired` give indexers an auditable trail.

How each base standard maps: with ERC-20 a unit is a fraction (for example 1e18 units for one tonne of CO2e); with ERC-721 each token is one credit; with ERC-1155 an id is a homogeneous batch.

## Sample code

Reading a token's ESG state and retiring it (ethers v6):

```ts
import { Contract } from "ethers";

const esg = new Contract(tokenAddress, [
  "function esgURI(uint256) view returns (string)",
  "function retireESGToken(uint256 tokenId, string reason)",
  "event Retired(uint256 indexed tokenId, uint256 timestamp, string reason)",
], signer);

const uri = await esg.esgURI(42n);
const meta = await (await fetch(uri)).json();
console.log(meta.category, meta.geo, meta.status); // e.g. "carbon" "BR-RS" "audited"

if (meta.status === "audited") {
  await (await esg.retireESGToken(42n, "Offset 2025 scope-1 emissions")).wait();
}
```

## Things to know

- Status is **Draft**.
- The draft leaves some details open: `carbon_value` is a `uint256` in Solidity but shown as a decimal (`12.5`) in the JSON example, and there is no function that emits `Attested`. Clarify these before building on it.
- Solidity has no native SHA3-512 (`keccak256` is 256-bit), so digests are computed off-chain and stored as bytes.
- On-chain digests prove that documents were not altered, not that the underlying environmental claim is true. Trust still depends on the issuer, auditors and attestation signers.
- Carbon and ESG instruments are subject to registry rules and regulation outside this standard.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8040
