EIPs Explained

ERC-8106 · Draft · ERC · 2025-12-16

ERC-8106: RWA Event-based Compliance Framework

A minimal ERC-20 add-on for real-world-asset tokens that labels addresses as regulated or decentralized and emits standard compliance events instead of blocking transfers.

What problem does it solve?

Tokenized real-world assets (bonds, funds, stablecoins backed by off-chain reserves) live under regulators who want to know who moved value to whom. Plain ERC-20 says nothing about that, and existing permissioned token standards such as ERC-3643 mostly enforce rules by reverting transfers. Hard reverts bake one jurisdiction's rules into the contract and need upgrades whenever the rules change.

ERC-8106 takes the opposite approach: it does not stop transfers. It classifies addresses and emits a uniform, machine-readable event for every compliance-relevant movement, so auditors and off-chain monitoring can decide what to do.

How it works

Entity registry. Every address is one of two types:

  • Compliance Entity (CE) – a regulated legal entity such as a corporate treasury or custody account.
  • Decentralized Entity (DE) – everything else: end users, routers, settlement contracts.

entityTypeOf(address) MUST return DECENTRALIZED_ENTITY unless the address was explicitly registered as a CE. Each classification change emits EntityTypeUpdated with a reasonHash pointing to off-chain documentation (e.g. KYC or company registration) and the operator who made the change. The registry can live inside the token, in a separate contract, or be shared by several tokens.

Compliance events. For each transfer the token (or a wrapper) emits:

ComplianceObserved(bizId, token, from, to, amount, fromType, toType, flag, policyTag)
  • bizId ties together all legs of one business workflow (for example "user pays treasury, treasury forwards to operations").
  • flag is a soft label: OK (DE↔DE or CE↔CE), DIRECT_DE_TO_CE, DIRECT_CE_TO_DE, or POLICY_CUSTOM.
  • policyTag is a project-defined category, typically keccak256("PAYMENT") and similar.

Implementations SHOULD NOT revert just because of a flag. Freezes, reversals and reporting are left to separate systems: off-chain monitoring, governance modules or dedicated compliance contracts.

Sample code

An embedded registry that emits the compliance event on each transfer (illustrative, no access control):

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract RWAToken is ERC20 {
    enum EntityType { DECENTRALIZED_ENTITY, COMPLIANCE_ENTITY }
    enum ComplianceFlag { OK, DIRECT_DE_TO_CE, DIRECT_CE_TO_DE, POLICY_CUSTOM }

    event EntityTypeUpdated(address indexed entity, EntityType entityType,
        bytes32 indexed reasonHash, address indexed operator);
    event ComplianceObserved(bytes32 indexed bizId, address indexed token,
        address indexed from, address to, uint256 amount,
        EntityType fromType, EntityType toType, ComplianceFlag flag, bytes32 policyTag);

    bytes32 constant TAG_PAYMENT = keccak256("PAYMENT");
    mapping(address => bool) private _isCE;

    constructor() ERC20("RWA", "RWA") {}

    function entityTypeOf(address a) public view returns (EntityType) {
        return _isCE[a] ? EntityType.COMPLIANCE_ENTITY : EntityType.DECENTRALIZED_ENTITY;
    }

    function transferWithBizId(address to, uint256 amount, bytes32 bizId) external {
        _transfer(msg.sender, to, amount); // value moves first
        EntityType f = entityTypeOf(msg.sender);
        EntityType t = entityTypeOf(to);
        ComplianceFlag flag = f == t ? ComplianceFlag.OK
            : (f == EntityType.DECENTRALIZED_ENTITY ? ComplianceFlag.DIRECT_DE_TO_CE
                                                    : ComplianceFlag.DIRECT_CE_TO_DE);
        emit ComplianceObserved(bizId, address(this), msg.sender, to, amount, f, t, flag, TAG_PAYMENT);
    }
}

Things to know

  • Status: Draft. Interfaces and names may still change.
  • Events must only be emitted after a real ERC-20 balance change; an event without value movement breaks the audit trail the standard relies on.
  • This is observability, not enforcement. If your regulator needs transfers blocked up front, look at ERC-3643 or ERC-7943; the two approaches can be combined.
  • ERC-8328 is a related event-log proposal that links compliance events to subjects rather than tokens.
  • Who may register CEs, and how reasonHash maps to off-chain records, is left to the implementer.

#rwa #compliance #token #events #erc20

Details

Authors
Andrew Wang (@wz14) <[email protected]>, Jack Yin (@0xjackey) <[email protected]>
Status
Draft
Type
Standards Track / ERC
Created
2025-12-16
Requires

Machine-readable: Markdown · JSON