This standard defines an event-based compliance framework for Real World Asset (RWA) tokens on ERC-20, providing:
This standard is intentionally minimal and does not prescribe business-specific RWA workflows, off-chain settlement mechanisms, minting policies, or specific transfer patterns.
Real World Asset tokenization requires compliance observability that existing ERC-20 tokens do not provide:
This standard adopts an event-driven approach rather than enforcement through reverts:
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 and RFC 8174.
Compliant implementations MUST provide an entity classification registry that assigns each address to one of three categories.
interface IERC8106EntityRegistry {
enum EntityType { DECENTRALIZED_ENTITY, COMPLIANCE_ENTITY }
event EntityTypeUpdated(
address indexed entity,
EntityType entityType,
bytes32 indexed reasonHash,
address indexed operator
);
/// @notice Returns the entity type of an address
/// @dev MUST return DECENTRALIZED_ENTITY for addresses not explicitly registered as COMPLIANCE_ENTITY
function entityTypeOf(address entity) external view returns (EntityType);
}
Implementations MUST satisfy the following requirements:
entityTypeOf function MUST return DECENTRALIZED_ENTITY for any address not explicitly registered as COMPLIANCE_ENTITYCOMPLIANCE_ENTITYEntityTypeUpdated eventsreasonHash parameter MUST reference off-chain documentation (e.g., KYC records, legal entity registration)operator parameter MUST identify the address that authorized the updateThe registry MAY be: - Embedded within the token contract itself - Implemented as a separate contract referenced by the token - Shared across multiple tokens within an ecosystem
Compliant implementations MUST emit standardized events that capture compliance-relevant transfer information, including entity classifications, compliance flags, and business correlation identifiers.
interface IERC8106ComplianceEvents is IERC8106EntityRegistry {
enum ComplianceFlag {
OK,
DIRECT_DE_TO_CE, // DE -> CE observed
DIRECT_CE_TO_DE, // CE -> DE observed
POLICY_CUSTOM // project-defined policy
}
event ComplianceObserved(
bytes32 indexed bizId,
address indexed token, // the ERC-20 token contract address
address indexed from,
address to,
uint256 amount,
EntityType fromType,
EntityType toType,
ComplianceFlag flag,
bytes32 policyTag // project-defined categorization tag
);
}
Implementations MUST satisfy the following requirements:
ComplianceObserved event MUST include all specified parametersfromType and toType MUST reflect the actual entity types at the time of the transferbizId valuetoken parameter MUST be the address of the ERC-20 token contractImplementations SHOULD apply the following flagging heuristics:
DIRECT_DE_TO_CE: When fromType == DECENTRALIZED_ENTITY and toType == COMPLIANCE_ENTITYDIRECT_CE_TO_DE: When fromType == COMPLIANCE_ENTITY and toType == DECENTRALIZED_ENTITYOK: When transfer does not cross compliance boundaries (DE↔DE or CE↔CE)POLICY_CUSTOM: For project-specific compliance scenariosImplementations SHOULD NOT revert transactions solely based on compliance flags. This event-based approach enables:
Compliance actions (transaction reversals, account freezes, regulatory reporting) SHOULD be handled through separate mechanisms such as:
Events rather than reverts because:
Compliance flags are informational, not enforced:
Auditors reconstruct transaction flows using:
ComplianceObserved event corresponds to a real ERC-20 balance changeFor a given bizId, auditors can query all ComplianceObserved events, build directed graphs from from/to/amount fields, check for direct CE/DE transfers using the flag field, and cross-reference reasonHash with off-chain KYC/AML systems.
Embedded Registry: Store entity types in the token contract itself
contract RWAToken is ERC20, IERC8106ComplianceEvents {
mapping(address => bool) private _isComplianceEntity;
function entityTypeOf(address entity) public view returns (EntityType) {
return _isComplianceEntity[entity]
? EntityType.COMPLIANCE_ENTITY
: EntityType.DECENTRALIZED_ENTITY;
}
// ...
}
Separate Registry: Share registry across multiple tokens
contract EntityRegistry is IERC8106EntityRegistry {
mapping(address => bool) private _isComplianceEntity;
function entityTypeOf(address entity) external view returns (EntityType) {
return _isComplianceEntity[entity]
? EntityType.COMPLIANCE_ENTITY
: EntityType.DECENTRALIZED_ENTITY;
}
function registerComplianceEntity(address entity, bytes32 reasonHash) external onlyAdmin {
_isComplianceEntity[entity] = true;
emit EntityTypeUpdated(entity, EntityType.COMPLIANCE_ENTITY, reasonHash, msg.sender);
}
// ...
}
Policy Tag Conventions: Use consistent hashes for interoperability
bytes32 constant TAG_PAYMENT = keccak256("PAYMENT");
bytes32 constant TAG_TREASURY = keccak256("TREASURY");
bytes32 constant TAG_REFUND = keccak256("REFUND");
Compliance Monitoring: A regulated stablecoin tracks all CE↔DE flows for monthly regulatory reports without blocking transactions.
Atomic Multi-Leg Transfers: While not part of this standard, projects can build on these primitives to implement atomic multi-hop transfers:
// User pays → Treasury → Operational account (single transaction)
function purchaseRWA(bytes32 orderId, uint256 amount) external {
// Leg 1: DE → CE
token.transferFrom(msg.sender, treasury, amount);
emit ComplianceObserved(orderId, token, msg.sender, treasury, amount,
DE, CE, DIRECT_DE_TO_CE, TAG_PAYMENT);
// Leg 2: CE → CE
token.transferFrom(treasury, operational, amount);
emit ComplianceObserved(orderId, token, treasury, operational, amount,
CE, CE, OK, TAG_TREASURY);
}
This pattern enables single user-facing transactions, unified bizId for audit correlation, and per-leg compliance events.
Time-Delayed Enforcement: Detect suspicious patterns in events, then freeze accounts off-chain or via governance after review.
Event Integrity: Implementations MUST emit ComplianceObserved events only after actual ERC-20 balance changes. Emitting events without value movement compromises auditability.
Copyright and related rights waived via CC0.