ERC-8328 · Last Call · ERC · 2026-07-05
ERC-8328: Subject-Linked Compliance Event Log
A standard append-only on-chain log for compliance records (issuance, freezes, KYC changes, forced transfers) keyed by subject, with attribution, evidence hashes and fork-free corrections.
What problem does it solve?
Regulated token systems record compliance actions in incompatible ways: custom events, token-specific state, generic attestations or off-chain databases. Auditors, indexers and other contracts have no common place to ask "what compliance actions happened to this asset or account, who recorded them, and under what claimed authority?"
ERC-8328 defines a shared, stored log for those records. It is a reporting interface only: it does not enforce transfer rules or verify identities, and a record is an attributable claim, not proof that something happened or was lawful. A token, compliance module, multisig or governance executor can call it without changing its own interface.
How it works
recordEvent(...) appends a ComplianceEvent under an application-defined subjectId (with an optional subjectType such as token, address, asset or case). Each record holds:
eventType(e.g.ISSUANCE,FREEZE,KYC_APPROVED,FORCED_TRANSFER,REGULATORY_HOLD) and anoutcome(APPROVED,DENIED,EXECUTED…);actor, always set tomsg.sender, kept separate fromauthority, the claimed basis such as internal policy, court order or regulator;- up to 10
parties, each an address with a role (sender, receiver, target…); - a required non-zero
evidenceHashand an optionalevidenceURI, so confidential evidence can be distributed privately; - a
payloadup to 2048 bytes plus apayloadProfileIdthat says how to decode it; occurredAt(must not be in the future) andrecordedAt(block time).
All identifiers are namespaced hashes such as keccak256("ERC-8328:EVENT_TYPE:FREEZE:V1").
Corrections, never edits. Records are immutable and cannot be deleted. To fix one, you append an EVT_CORRECTION event pointing to it via correctsIndex; the old record's correctedByIndex is set to the new one. Each record can be corrected only once, so history is a straight chain, and currentEventIndex follows it to the latest version.
Records live in storage (not only in logs) so other contracts can read them. Indexes per subject and per event type avoid scanning a whole history. The log must support ERC-165.
Sample code
Recording a freeze with the standard payload profile (Solidity, inside an authorized compliance module):
bytes32 constant SUBJECT_ADDRESS = keccak256("ERC-8328:SUBJECT_TYPE:ADDRESS");
bytes32 constant EVT_FREEZE = keccak256("ERC-8328:EVENT_TYPE:FREEZE:V1");
bytes32 constant OUTCOME_EXECUTED = keccak256("ERC-8328:OUTCOME:EXECUTED");
bytes32 constant AUTHORITY_POLICY = keccak256("ERC-8328:AUTHORITY:INTERNAL_POLICY:V1");
bytes32 constant ROLE_TARGET = keccak256("ERC-8328:PARTY_ROLE:TARGET");
bytes32 constant PAYLOAD_FREEZE_V1 = keccak256("ERC-8328:PAYLOAD:FREEZE:V1");
function _logFreeze(address target, uint256 amount, bytes32 reason, bytes32 evidenceHash) internal {
IComplianceEventLog.Party[] memory parties = new IComplianceEventLog.Party[](1);
parties[0] = IComplianceEventLog.Party(target, ROLE_TARGET);
complianceLog.recordEvent(
keccak256(abi.encode(address(this), salt, target)), // opaque, salted subject id
SUBJECT_ADDRESS, EVT_FREEZE, OUTCOME_EXECUTED, AUTHORITY_POLICY,
parties, evidenceHash, "", // evidence kept off-chain
PAYLOAD_FREEZE_V1, abi.encode(target, amount, uint64(0), reason),
bytes32(0), uint64(block.timestamp), type(uint256).max // NO_CORRECTION
);
}
Things to know
- Status: Last Call. Its last-call deadline is 2026-10-19; the interface is close to final but could still change.
- Everything written is public forever. Do not put personal or confidential data on-chain; use salted subject IDs, minimal parties and evidence hashes whose preimages are shared under access control.
authority,occurredAtand the event itself are self-asserted. Consumers must verify them independently and should not assume the log validated event-type/outcome combinations.- Who may record and who may correct are left to the implementation, but must be documented. A weak correction policy lets one recorder override another.
- Complements enforcement standards such as ERC-3643 and ERC-7943; compare ERC-8106, which emits per-transfer compliance events for ERC-20 RWA tokens.