Abstract
This proposal defines an ERC-165 discoverable kernel interface
that executes the six regulatory actions defined by ERC-8319
(FREEZE, SEIZE, CONFISCATE, LIQUIDATE, RESTRICT, RECOVER) on
fungible security tokens as typed commands, together with three typed
reversals (UNFREEZE, RELEASE, UNRESTRICT). A command binds its action,
its registered authority and authority epoch, its case, the current root of
the endpoint's external dependencies, a provenance commitment and any
action-specific commitments, replay protection, and a validity window. A
command either applies in full, records one receipt that anyone can recompute
from stored fields, and emits the receipt hash in its final event, or it
reverts and changes no state. A policy rejection and an operational dependency failure
revert with distinct errors.
The kernel builds on ERC-20 and the fungible interface of ERC-7943. ERC-7943 provides neutral freeze and forced-transfer mechanics; this proposal adds the action identity, case lifecycle, authorization, terminality, dependency binding, and receipt semantics that distinguish legally different uses of those mechanics. An existing ERC-3643 token whose code can show that the adapter is its only Agent can adopt the kernel through an adapter without being reissued. The proposal does not confer regulatory authority or establish the truth of any off-chain legal or factual claim.
Motivation
Fungible security-token implementations expose privileged mechanics such as
changing a frozen balance or forcing a transfer, and those mechanics do not
identify why an operation occurred. The same transfer primitive can serve a
custody seizure, a permanent confiscation, a liquidation, or a recovery,
although these differ in reversibility, ownership effect, finality,
supporting evidence, and permitted follow-up operations. ERC-7943 and
ERC-3643 expose them, by design, as forcedTransfer and freeze functions
that carry no action type, and ERC-8473, a policy interface
for ERC-7943 tokens, classifies every forced transfer as FORCED whatever its
reason.
Function names and ordinary token events are therefore insufficient for interoperable monitoring:
- an indexer cannot reliably infer a regulatory action from a generic privileged transfer;
- a relayer cannot determine whether an authorization was already consumed or whether the policy it was prepared under is still the current one;
- an auditor cannot always distinguish a rejected policy decision from an unavailable dependency; and
- a downstream application cannot recompute a regulatory receipt if each implementation chooses different fields and ordering.
An issuer or transfer agent needs the on-chain record to follow the legal act: a seized amount that the custodian holds for the declared prior holder and cannot spend, a freeze that only the reversal naming it can lift, and a confiscation, liquidation, or recovery that closes its matter permanently. An existing deployment needs a way to adopt these semantics without reissuing its token.
Because CONFISCATE, LIQUIDATE, and RECOVER have no reversal, an error in
how actions compose cannot be undone later. This proposal therefore takes the
legal semantics from ERC-8319, whose transition model is mechanically checked,
and fixes their on-chain composition in an explicit case transition table. It
does not standardize jurisdiction-specific policy, identity systems, legal
evidence formats, or who holds regulatory power.
The identifiers of this proposal use the short name TRUST (Typed Regulatory Uniformity for Security Tokens): two conforming implementations record the same action with the same typed fields, failure classes, and receipt formula, so one parser reads both. Jurisdiction-specific law and policy are not made uniform.
Specification
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.
Scope and conformance
A native conforming token MUST implement ERC-20,
ERC-165, and the fungible interface of
ERC-7943. The action meanings of this proposal are those of
ERC-8319. Each supported action and reversal MUST be a
distinct, separately observable operation, identified by its ActionKind or
ReversalKind value in its applied event and its receipt. An implementation
MUST NOT use an action name for an operation whose reversibility or effect on
ownership differs from the corresponding ERC-8319 definition, or whose
finality conflicts with it.
This version is limited to fungible tokens. Non-fungible and multi-token profiles require separate interfaces and are outside this proposal.
Every constant, identifier, and calldata layout below is normative.
Types and interface
Types
The following Solidity declarations define the canonical application binary interface (ABI) types. Enum values are part of the ABI and MUST NOT be reordered. Struct fields MUST be encoded, hashed, and laid out in calldata in the order listed.
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.36;
library TrustKernelTypes {
/// keccak256("ERC-TRUST/v2")
bytes32 internal constant DOMAIN = 0xb5303e4083d2781d6c7d6a68d30b6354ebda11f0a2a037b946d87b3eec40b74e;
uint8 internal constant STANDARD_VERSION = 2;
/// keccak256("ERC-TRUST/v2/dependency-root")
bytes32 internal constant DEPENDENCY_ROOT_TAG = 0x8dd0ff19b096a49997e6e0fa1eea2dee5d61291bb86d3d10640e517c9e6cbe18;
/// keccak256("ERC-TRUST/v2/native-full")
bytes32 internal constant PROFILE_NATIVE_FULL = 0x86ba25e1a29a74ad905fd84744be032fec9dc05645f58f7f1b7788dc60ae866b;
/// keccak256("ERC-TRUST/v2/erc3643-partial")
bytes32 internal constant PROFILE_ERC3643_PARTIAL =
0xa57a63d1a6def0dfce48359b5a32ef71ae339ac73fcb1cf8d123c03b7ada1fe6;
/// keccak256("ERC-TRUST/v2/erc3643-verified-full")
bytes32 internal constant PROFILE_ERC3643_VERIFIED_FULL =
0xad56e54f83cc255e391dd3838f7dc4befa1b0306b42d8ed7974588f27fec41ad;
enum ActionKind { FREEZE, SEIZE, CONFISCATE, LIQUIDATE, RESTRICT, RECOVER }
enum ReversalKind { UNFREEZE, RELEASE, UNRESTRICT }
enum ReceiptKind { NONE, ACTION, REVERSAL }
enum BindingKind { POLICY, IDENTITY, SETTLEMENT, ENTITLEMENT }
enum AssessmentOutcome { APPLICABLE, REJECTED, OPERATIONAL_FAILURE }
enum Lifecycle { NONE, PREPARED, APPLIED, REVERSED }
enum ProfileKind { UNSUPPORTED, NATIVE_FULL, VERIFIED_FULL, PARTIAL }
enum CasePhase { NONE, OPEN, TERMINAL }
enum CaseFamily { NONE, FREEZE, RESTRICT, CUSTODY, DISPOSITION }
/// Typed action command: 20 static words, 644 calldata bytes for a single-parameter call.
struct ActionRequest {
bytes32 domain;
bytes32 actionId;
ActionKind action;
address subject;
address source;
address destination;
address custodian;
uint256 amount;
bytes32 caseId;
bytes32 dependencyRoot;
uint64 dependencyEpoch;
bytes32 provenanceCommitment;
bytes32 settlementCommitment;
bytes32 proceedsCommitment;
bytes32 entitlementCommitment;
bytes32 authorityRef;
uint64 authorityEpoch;
uint256 nonce;
uint48 validAfter;
uint48 validBefore;
}
/// Typed reversal command: 12 static words, 388 calldata bytes.
struct ReversalRequest {
bytes32 domain;
bytes32 reversalId;
bytes32 actionId;
ReversalKind reversal;
bytes32 dependencyRoot;
uint64 dependencyEpoch;
bytes32 provenanceCommitment;
bytes32 authorityRef;
uint64 authorityEpoch;
uint256 nonce;
uint48 validAfter;
uint48 validBefore;
}
/// Stored and returned by receipt(commandId). Every field except receiptHash is a
/// preimage input, in this order, prefixed by DOMAIN.
struct Receipt {
ReceiptKind receiptKind;
bytes32 commandId;
uint8 commandKind;
bytes32 parentCommandId;
address subject;
address source;
address destination;
uint256 amount;
bytes32 caseId;
bytes32 authorityRef;
bytes32 dependencyRoot;
bytes32 provenanceCommitment;
bytes32 assessmentEvidence;
bytes32 preState;
bytes32 postState;
bytes32 externalCommitment;
bytes32 receiptHash;
}
/// Returned by actionRecord(actionId). An implementation record, not a hash preimage.
struct ActionRecord {
ActionKind action;
Lifecycle lifecycle;
address subject;
address source;
address destination;
address custodian;
uint256 amount;
uint256 priorAmount;
bool priorFlag;
bytes32 caseId;
bytes32 authorityRef;
uint64 authorityEpoch;
uint64 dependencyEpoch;
bytes32 commandHash;
bytes32 evidenceHash;
bytes32 receiptHash;
}
/// Returned by caseRecord(caseId).
struct CaseRecord {
CasePhase phase;
CaseFamily family;
bytes32 headActionId;
uint64 generation;
}
/// Returned by trustProfile().
struct ProfileDescriptor {
bytes32 profileId;
ProfileKind profileKind;
uint8 standardVersion;
uint256 actionMask;
uint256 reversalMask;
address underlyingToken;
bytes32 manifestHash;
bool full;
bool proxySupported;
}
}subject identifies the regulatory subject. source identifies the account
whose balance is debited by a transfer action. destination identifies the
account credited by SEIZE or a disposition. custodian is used only by
SEIZE. caseId names the case the command belongs to; a case groups one
regulatory matter's actions, its live effect, its custody, and its
terminality.
dependencyRoot and dependencyEpoch bind the command to the endpoint's
current external dependencies (see "Dependency root and epoch"). Commitment
fields bind external records without asserting that those records are true.
A conforming implementation MUST document the encoding and hash function used
to produce each commitment.
An endpoint MAY record Lifecycle.PREPARED for an action it has consumed but
not yet applied within the same transaction; once that transaction returns,
the action is APPLIED or has no record. The kernel defines no on-chain
cancellation, so no lifecycle value for a cancelled command exists.
Interface
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.36;
interface IERCTrustKernel is IERC165 {
event RegulatoryActionApplied(
bytes32 indexed actionId,
uint8 indexed action,
bytes32 indexed caseId,
bytes32 receiptHash
);
event RegulatoryReversalApplied(
bytes32 indexed reversalId,
uint8 indexed reversal,
bytes32 indexed actionId,
bytes32 receiptHash
);
event TrustDependencyChanged(
uint8 indexed kind,
bytes32 indexed previousBinding,
bytes32 indexed currentBinding,
bytes32 dependencyRoot,
uint64 dependencyEpoch
);
event TrustAuthorityChanged(bytes32 indexed authorityRef, address indexed account, uint64 epoch, bool active);
error TrustRejected(bytes32 commandId, uint16 reason);
error TrustOperationalFailure(bytes32 commandId, uint16 reason, bytes32 dependencyRef);
error TrustUnauthorized(address caller, bytes32 authorityRef);
error TrustReplay(bytes32 key);
error TrustInvalidCommand(bytes32 commandId, uint16 reason);
error TrustTerminal(bytes32 caseId);
function executeRegulatoryAction(TrustKernelTypes.ActionRequest calldata request)
external
returns (bytes32 receiptHash);
function executeRegulatoryReversal(TrustKernelTypes.ReversalRequest calldata request)
external
returns (bytes32 receiptHash);
function deriveActionId(TrustKernelTypes.ActionRequest calldata request) external view returns (bytes32 actionId);
function deriveReversalId(TrustKernelTypes.ReversalRequest calldata request)
external
view
returns (bytes32 reversalId);
function actionRecord(bytes32 actionId) external view returns (TrustKernelTypes.ActionRecord memory record);
function receipt(bytes32 commandId) external view returns (TrustKernelTypes.Receipt memory record);
function caseRecord(bytes32 caseId) external view returns (TrustKernelTypes.CaseRecord memory record);
function dependencyState() external view returns (bytes32 dependencyRoot, uint64 dependencyEpoch);
function trustProfile() external view returns (TrustKernelTypes.ProfileDescriptor memory descriptor);
}The ERC-165 identifier of IERCTrustKernel is the exclusive OR of the
selectors of the nine functions above, excluding the inherited
supportsInterface selector: 0x2b020308. The nine selectors are
0x2f4e0773 (executeRegulatoryAction), 0x2b892e8f
(executeRegulatoryReversal), 0xfc6a9112 (deriveActionId), 0xf3315a6c
(deriveReversalId), 0x330fcfde (actionRecord), 0x198a27aa
(receipt), 0x2a408631 (caseRecord), 0x7bf8f8b6 (dependencyState),
and 0x5ba37779 (trustProfile); a struct parameter is a tuple in the
canonical signature. A contract claiming conformance
MUST return true from supportsInterface(0x2b020308). It MUST return
false for 0xffffffff and for each identifier defined in this proposal
whose interface it does not implement completely.
Two profile interfaces accompany the kernel. Their identifiers are computed by
the same rule: 0x5cd8d207 for IERCTrustNativeRoute and 0xb2306fd2 for
ITrustBoundDependency. A native endpoint MUST return true for
0x2b020308, for the fungible ERC-7943 identifier 0x3edbb4c4, and for the
native route identifier 0x5cd8d207.
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.36;
/// Native profile only: same-transaction exact-use route for the sensitive ERC-7943 selectors.
interface IERCTrustNativeRoute {
error TrustRouteMismatch(bytes32 routeKey);
function executeERC7943Action(TrustKernelTypes.ActionRequest calldata request)
external
returns (bytes32 receiptHash);
function executeERC7943Reversal(TrustKernelTypes.ReversalRequest calldata request)
external
returns (bytes32 receiptHash);
}
/// Native profile dependency boundary. Read-only.
interface ITrustBoundDependency {
function configurationDigest() external view returns (bytes32 digest);
function assess(
bytes32 commandHash,
uint8 operation,
address subject,
address destination,
uint256 amount,
bytes32 bindingHash,
uint64 bindingEpoch
) external view returns (uint8 outcome, bytes32 commandEcho, bytes32 bindingEcho, bytes32 evidenceHash);
}Command validation
Canonical form and reentrancy
The typed command functions are executeRegulatoryAction and
executeRegulatoryReversal and, on an endpoint that implements
IERCTrustNativeRoute, executeERC7943Action and executeERC7943Reversal.
A request to a typed command function is in canonical form when:
- its calldata is the function selector followed by the canonical encoding of the request, 644 bytes in total for an action and 388 bytes for a reversal;
- none of its address,
uint64, oruint48fields carries bits outside its declared width; - every enum field holds a value declared by its enum; and
- the call carries zero value.
A typed command function MUST reject every request that is not in canonical
form. The rejection MUST be a full-state stutter (defined in "Outcomes and
full-state stutter" below), so it consumes nothing, and it MUST NOT make an
external call. An external call is a CALL, CALLCODE, DELEGATECALL, or
STATICCALL to an account other than the endpoint; for a proxy-fronted
endpoint, the DELEGATECALL by which the proxy runs its implementation is not
an external call.
This proposal does not specify the revert data of that rejection, or which defect is detected first when a request has several. The revert data can be empty, one of the errors defined here, or any other data, so a caller cannot rely on it to identify the defect.
A reentrant call is a call to a typed command function made while an earlier call to the same endpoint has not yet returned. An endpoint MAY reject a reentrant call before any other check, with any revert data, and that rejection is also a full-state stutter.
The other rules of this proposal that name an error or a reason code, including the validation order below, apply to a call to a typed command function only when the request is in canonical form and the call is not rejected as a reentrant call. An error returned by either of these two rejections carries none of the meanings this proposal gives to it.
Domain and identifiers
DOMAIN is keccak256("ERC-TRUST/v2"). Every hash defined by this proposal
is keccak256 of the ABI encoding (abi.encode) of the listed items in
order. A struct encodes as the static tuple of its fields in the order
declared above; every item occupies one 32-byte word, addresses and narrow
integers are left-padded with zero bytes, and enums are their uint8 value.
| Identifier | Preimage, in order |
|---|---|
actionId | DOMAIN, endpoint address, chain id, ActionRequest with actionId = 0 |
commandHash | DOMAIN, endpoint address, chain id, the completed ActionRequest |
reversalId | DOMAIN, endpoint address, chain id, ReversalRequest with reversalId = 0 |
reversalHash | DOMAIN, endpoint address, chain id, the completed ReversalRequest |
nonceKey | DOMAIN, authorityRef, authorityEpoch, nonce |
receiptHash | DOMAIN, then the first sixteen fields of Receipt in declared order |
The endpoint address is the address of the conformance endpoint that
executes the command: the token for the native profile, the adapter for an
ERC-3643 profile. It is the address a caller invokes, so for a proxy-fronted
endpoint it is the proxy address, never the implementation address (in
Solidity, address(this) of the executing contract). The chain id is the
identifier of the chain the endpoint is deployed on, as returned by
block.chainid.
The actionId field of a request MUST equal the derived value; the same
holds for reversalId. deriveActionId and deriveReversalId MUST return
exactly these derivations when they are called with zero value and their
calldata is their selector followed by the canonical encoding of the request,
so a caller can complete a request off chain and confirm it against the
endpoint. Their result for any other call is not specified, and an identifier
they return does not relax the canonical-form requirement: a typed command
function rejects a request that is not in canonical form whatever its
identifier field holds. Because the endpoint address and the chain id are part
of every preimage, a request built for one endpoint is invalid on every other
endpoint.
commandHash and reversalHash are the digests an endpoint passes to its
bound dependencies; the action record of an action stores its commandHash.
They differ from the identifiers only in that the identifier field is filled.
Authorization, epochs, and replay
authorityRef names an authority. The endpoint MUST maintain, for each
reference, the account currently registered for it, an active flag, and an
authority epoch that MUST increase on every change. The caller of a typed
command MUST be the account currently registered for the request's
authorityRef, and that authority MUST be active; otherwise the endpoint MUST
revert with TrustUnauthorized. The request's authorityEpoch MUST equal the
current epoch of that authority (reason 4). Every change of the registered
account, the active flag, or the epoch MUST emit TrustAuthorityChanged with
the account, the new epoch, and the active flag. The kernel defines no
delegation surface: whoever is registered is the authority, and a registered
account MAY be a contract that implements any delegation or multi-signature
policy the deployment wants.
Two replay keys exist. A command identifier is exactly-once: a request whose
actionId or reversalId was already applied MUST revert with
TrustReplay(commandId). The tuple (authorityRef, authorityEpoch, nonce)
is exactly-once: reusing it MUST revert with TrustReplay(nonceKey). A
rejected or failed command MUST NOT consume either key.
validAfter and validBefore bound the command by block.timestamp:
validBefore MUST be nonzero, and validAfter <= block.timestamp and
block.timestamp <= validBefore MUST hold (reason 3).
Validation order and field rules
For a request in canonical form, an endpoint MUST validate the request in the following order and MUST report the first failure it meets, so a request with several defects reports the earliest one. A request that is not in canonical form, and a reentrant call rejected as stated above, are outside this order, whatever their revert data.
domain == DOMAIN(TrustInvalidCommand, reason 1).- The identifier equals its derivation (reason 2).
- The command identifier was not already applied (
TrustReplay). - The validity window (reason 3).
- The authority epoch (reason 4), then the registered account
(
TrustUnauthorized). dependencyRootanddependencyEpochequal the endpoint's current pair (reason 5).- The nonce tuple was not already consumed (
TrustReplay). - The common rule on
provenanceCommitment,subject, andcaseId(reason 6). - A
TERMINALcase (TrustTerminal); for a reversal, the case of the referenced action. - For an action, the field rules of the command (reason 6 unless a rule
names its own code) and its state-dependent rules, all in an
implementation-defined order. The state-dependent rules are custody
(reason 8), entitlement consumption (reason 9), case conflict (reason 10),
freeze direction (reason 12), and no state change (reason 13). For a
reversal, the lifecycle of the referenced action (reason 11), then the
pairing (reason 7), then the current effect, which is the subject's live
head or, for
RELEASE, the case's active custody (reason 11, or reason 8 when the custody record does not match). - A restriction of the route that carries the request, such as the reason 6 and reason 7 rejections of the exact-use ERC-7943 route.
A replayed or stale command is therefore reported before any rule that depends on case or effect state. An endpoint MUST assess its bound dependencies after these checks and before it consumes any state. The reason 8 checks of a source's unencumbered balance and of a custody record that an action consumes MAY instead follow the assessment. The unencumbered balance of an account is its balance minus the custody backing it holds; frozen tokens count toward it.
In the field rules below, an overlay family is FREEZE or RESTRICT, the
two families whose action leaves a live effect on a subject that a later
reversal removes (see "Actions, cases, and transitions"). Every request MUST
satisfy the following field rules; a violation MUST revert with
TrustInvalidCommand and the reason stated:
| Command | Rule |
|---|---|
| every action | provenanceCommitment != 0, subject != 0, caseId != 0 |
FREEZE | source == subject; destination == 0; custodian == 0; amount strictly greater than the subject's current absolute frozen target (reason 12 otherwise); settlement, proceeds, and entitlement commitments zero |
RESTRICT | source == subject; destination == 0; custodian == 0; amount == 0; the three commitments zero |
SEIZE | source == subject; custodian != 0 and custodian != subject; destination == custodian; amount > 0 and available without consuming custody backing of another case (reason 8); the three commitments zero |
CONFISCATE | source != 0; destination != 0 and destination != source; custodian == 0; amount > 0; on the direct path source == subject and the amount available without consuming custody backing of another case (reason 8); on the custody disposition path source equal to the custodian of the case's custody record, subject equal to the declared prior holder, and amount equal to the encumbered amount; the three commitments zero |
LIQUIDATE | as CONFISCATE, except settlementCommitment != 0 and proceedsCommitment != 0 |
RECOVER | as CONFISCATE, except entitlementCommitment != 0 (reason 6 when zero) and not previously consumed by an applied RECOVER (reason 9) |
| every reversal | provenanceCommitment != 0; the reversal kind pairs with the referenced action (UNFREEZE with an applied FREEZE, RELEASE with an applied SEIZE, UNRESTRICT with an applied RESTRICT; reason 7); the referenced action is the subject's live head for its overlay family, or the case's active custody for RELEASE (reason 11, or reason 8 when the custody record does not match) |
A rule that names a field applies only to requests that have that field. An
implementation MAY add reason codes inside a class but MUST NOT reuse a listed
code with a different meaning. Where a reason code in parentheses follows a
condition, a request in canonical form that fails the condition MUST revert
with that code and the error of its class. The revert MUST occur at the
position the validation order assigns to the condition. A deployment SHOULD
NOT name the declared prior holder as the destination of a custody-path
CONFISCATE or LIQUIDATE; returning seized tokens to that holder is a
RELEASE.
Outcomes and full-state stutter
Assessment of a validated command has exactly one of three outcomes:
APPLICABLE: every bound check completed and permits execution;REJECTED: the checks completed and deny the command; the endpoint MUST revert withTrustRejectedand a reason in class 100;OPERATIONAL_FAILURE: a required dependency or upstream call was unavailable, malformed, stale, or inconsistent; the endpoint MUST revert withTrustOperationalFailureand a reason in class 200, 300, or 400.
Every revert defined by this proposal MUST be a full-state stutter: the call
leaves every observable state of the endpoint exactly as it was before the
call. This includes validation failures, TrustTerminal, TrustReplay, and
the rejections of a request that is not in canonical form and of a reentrant
call. No command identifier or nonce is consumed, no case, action, or receipt
record is written, no token balance, frozen amount, or restriction flag
changes, and no log is emitted. A reader who observes an applied event
therefore knows that every earlier check of that command passed.
The reason classes are:
| Class | Codes | Error |
|---|---|---|
| 1 | 1 to 99 | TrustInvalidCommand |
| 100 | 100 to 199 | TrustRejected |
| 200 | 200 to 299 | TrustOperationalFailure |
| 300 | 300 to 399 | TrustOperationalFailure |
| 400 | 400 to 499 | TrustOperationalFailure |
The listed codes are:
| Code | Meaning |
|---|---|
| 1 | domain |
| 2 | identifier |
| 3 | time |
| 4 | authority epoch |
| 5 | dependency binding |
| 6 | shape |
| 7 | reversal pairing |
| 8 | custody |
| 9 | entitlement |
| 10 | case conflict |
| 11 | current effect |
| 12 | freeze direction |
| 13 | no state change |
| 100 | policy denied |
| 101 | identity denied |
| 102 | settlement denied |
| 103 | entitlement denied |
| 200 | dependency code mismatch |
| 201 | dependency configuration mismatch |
| 202 | dependency call failed or malformed |
| 203 | dependency echo mismatch |
| 204 | dependency reported failure |
| 205 | dependency unavailable at bind |
| 300 | sealed topology not live |
| 301 | seal invalid |
| 302 | topology mismatch at seal |
| 303 | import manifest mismatch |
| 304 | upstream state not owned |
| 400 | upstream call failed |
| 401 | upstream post-state mismatch |
| 402 | identity registry unavailable |
| 403 | compliance unavailable |
Cases, effects, and receipts
Actions, cases, and transitions
A case MUST be opened by its first applied command and MUST remain bound to that command's family for its whole life. Four families exist:
| Family | Opening commands | Kind | Reversal | Dispositions inside the case |
|---|---|---|---|---|
FREEZE | FREEZE | overlay | UNFREEZE | none |
RESTRICT | RESTRICT | overlay | UNRESTRICT | none |
CUSTODY | SEIZE | custody | RELEASE | CONFISCATE, LIQUIDATE, RECOVER |
DISPOSITION | CONFISCATE, LIQUIDATE, RECOVER | terminal | none | none |
An overlay is a live effect on a subject that a later reversal removes. A subject MUST have at most one live head per overlay family across all cases. The head is the most recently applied overlay action that is still in force, and each amendment records its parent so that reversals pop in order. A custody case MUST hold at most one custody record. A disposition is terminal.
Applying an action MUST produce exactly the following token effects:
| Action | Effect |
|---|---|
FREEZE | set the subject's absolute frozen target to amount; the prior target is recorded |
RESTRICT | disable the subject's ordinary sends and receives; the prior flag is recorded |
SEIZE | move amount from the subject to the custodian and open a custody record naming the custodian, the subject as declared prior holder, and the encumbered amount |
CONFISCATE | move amount from source to destination; terminal |
LIQUIDATE | as CONFISCATE, binding settlement and proceeds commitments; terminal |
RECOVER | as CONFISCATE, binding an entitlement commitment that is consumed exactly once; terminal |
Tokens held under a custody record are custody backing of the custodian's balance: an ordinary transfer MUST NOT spend them, and another case MUST NOT consume them (reason 8). The custody disposition path of a disposition MUST consume the whole record of its own case.
The case transition (CT) table is normative: an endpoint MUST apply exactly
these transitions, numbered CT-1 to CT-16. OPEN(F) is an open case of family
F; TERMINAL is a case that accepts no further command.
| Rule | From | Command | Guard | To | Effect or reason |
|---|---|---|---|---|---|
| CT-1 | NONE | FREEZE | subject has no live FREEZE head | OPEN(FREEZE) | push effect head (no parent) |
| CT-2 | OPEN(FREEZE) | FREEZE | the subject's live FREEZE head belongs to this case and amount exceeds the current target (reason 12 otherwise) | OPEN(FREEZE) | push amendment head (parent = previous head) |
| CT-3 | NONE or OPEN(FREEZE) | FREEZE | the subject's live FREEZE head belongs to another case, or the case is OPEN(FREEZE) and the subject has no live FREEZE head in it | reject | reason 10 |
| CT-4 | OPEN(FREEZE) | UNFREEZE of the head | the referenced action is the live head (reason 11 otherwise) | OPEN(FREEZE) if the popped head has a parent in this case, else TERMINAL | restore the prior target, pop the head |
| CT-5 | NONE | RESTRICT | subject has no live RESTRICT head | OPEN(RESTRICT) | push effect head |
| CT-6 | OPEN(RESTRICT) | RESTRICT | the subject's live RESTRICT head belongs to this case | reject | reason 13 |
| CT-7 | NONE or OPEN(RESTRICT) | RESTRICT | the subject's live RESTRICT head belongs to another case, or the case is OPEN(RESTRICT) and the subject has no live RESTRICT head in it | reject | reason 10 |
| CT-8 | OPEN(RESTRICT) | UNRESTRICT of the head | the referenced action is the live head (reason 11 otherwise) | TERMINAL | restore the prior flag, pop the head |
| CT-9 | NONE | SEIZE | OPEN(CUSTODY) | open the custody record | |
| CT-10 | OPEN(CUSTODY) | SEIZE | reject | reason 8 | |
| CT-11 | OPEN(CUSTODY) | RELEASE | the referenced SEIZE is the case's active custody (reason 11, or 8) | TERMINAL | return the encumbered amount to the declared prior holder, close custody |
| CT-12 | OPEN(CUSTODY) | CONFISCATE, LIQUIDATE, or RECOVER (custody disposition) | source is the custodian of the case's custody record, subject is the declared prior holder, amount equals the encumbered amount (reason 8 otherwise) | TERMINAL | consume the whole custody record |
| CT-13 | NONE | CONFISCATE, LIQUIDATE, or RECOVER (direct) | source == subject and the case has no prior command | TERMINAL | move the amount |
| CT-14 | OPEN(FREEZE) or OPEN(RESTRICT) | any action of another family | reject | reason 10 | |
| CT-15 | TERMINAL | any action or reversal | reject | TrustTerminal | |
| CT-16 | OPEN(CUSTODY) | FREEZE or RESTRICT | reject | reason 10 |
The table governs actions. A reversal is checked against the case of the action it references by the reversal rules of "Validation order and field rules" and by CT-4, CT-8, CT-11, and CT-15, and never fails with reason 10. By CT-3 and CT-7, an overlay case carries the heads of one subject; another subject of the same matter needs its own case.
Two cross-case rules follow from the table. A disposition in one case MUST NOT change an overlay owned by another case: the overlay remains live, and the frozen target it imposes saturates at the current balance when observed. And custody records are per case, so several custody cases MAY seize from the same holder or use the same custodian, each with its own record and backing.
The following figure is an informative drawing of the case transition table, grouped by family; the table is normative.
caseRecord(caseId) MUST return the phase, the family, headActionId, and a
generation counter that increases by one with every command applied to the
case.
headActionId is the live overlay head of an open FREEZE or RESTRICT
case, the active custody action of an open CUSTODY case, and zero when the
case is NONE or TERMINAL. The case record does not state how a terminal
custody case ended; whether it was closed by RELEASE or by a disposition is
read from the receipts and action records of the case.
Reversals
A reversal references an applied action by actionId and MUST satisfy the
pairing and current-effect rules above. Applying a reversal MUST produce the
following effects:
| Reversal | Effect |
|---|---|
UNFREEZE | restore the subject's frozen target to the value recorded before the referenced FREEZE, and pop that head; the case stays open while an earlier head of the same case remains |
UNRESTRICT | restore the restriction flag recorded before the referenced RESTRICT, pop that head, and close the case |
RELEASE | move the encumbered amount from the custodian back to the declared prior holder and close the custody record and the case |
The lifecycle of a reversed action MUST become REVERSED, and a reversed
action MUST NOT be reversed again; a reversal identifier is exactly-once like
any command identifier. LIQUIDATE, CONFISCATE, and RECOVER have no
reversal: an endpoint MUST NOT treat a later transfer that happens to return
tokens as a reversal of them, since such a transfer is an ordinary transfer or
a new action.
Receipts
After applying a command, and after every required ERC-20 and ERC-7943 effect
event, the endpoint MUST store a Receipt under the command identifier and
emit the applied event as the final log of the command. receiptHash MUST
equal the return value of the execute function, the stored
Receipt.receiptHash, and the receiptHash argument of the applied event.
The two receipt kinds share one preimage and are domain separated by
receiptKind (ACTION = 1, REVERSAL = 2; zero is reserved). Recomputing
a receipt hash needs only the stored fields, which receipt(commandId)
returns; it never needs transaction calldata or the profile-defined
preimages of the opaque commitments.
For the fields below, an action receipt and a reversal receipt MUST take their values as follows:
| Field | Action receipt | Reversal receipt |
|---|---|---|
commandKind | the ActionKind value | the ReversalKind value |
parentCommandId | zero | the reversed actionId |
subject, amount, caseId | copied from the request | those of the reversed action's record |
source, destination | copied from the request | both the subject for UNFREEZE and UNRESTRICT; for RELEASE, source is the custodian and destination is the declared prior holder |
authorityRef, provenanceCommitment | copied from the request | those of the reversal request |
dependencyRoot | copied from the request | the root the reversal was validated against |
externalCommitment | keccak256(abi.encode(settlementCommitment, proceedsCommitment)) for LIQUIDATE, the entitlementCommitment for RECOVER, and zero otherwise | zero |
assessmentEvidence, preState, and postState are opaque in the kernel.
Their preimages are implementation-defined: every implementation MUST document
them together with its runtime identity, so a receipt hash is recomputable on
its endpoint but is not expected to be equal across implementations.
preState and postState MUST be taken from the same observation function
immediately before and after the effects of the command.
Dependencies
Dependency root and epoch
dependencyState() MUST return the endpoint's current dependencyRoot and
dependencyEpoch. The root is keccak256(abi.encode(DOMAIN, DEPENDENCY_ROOT_TAG, policyBinding, identityBinding, settlementBinding, entitlementBinding)), ordered by BindingKind. A profile that has no
dependency of a given kind MUST use bytes32(0) in that slot and MUST declare
that in its manifest.
The epoch MUST start at 1 and MUST increase by exactly one on every rebind of
any kind. Every rebind MUST recompute the root and MUST emit
TrustDependencyChanged with the kind, the previous and current per-kind
binding, the new root, and the new epoch. A per-kind binding MAY carry its own
version counter (the native profile's bindingHash does), but that counter is
internal to the binding: commands carry only the endpoint's root and global
epoch, and a change of any binding makes every command built under the
previous pair stale (reason 5). The receipt binds the root the command was
validated against, so a reader can tell under which set of dependencies an
action or reversal was evaluated.
The native profile MUST bind each dependency by bindingHash = keccak256(abi.encode(DOMAIN, kind, dependency, runtimeCodeId, configurationDigest, schema, epoch)), which commits to the dependency's
address, runtime code, configuration digest, schema, and per-kind epoch.
runtimeCodeId is the EXTCODEHASH of dependency and
configurationDigest is the value its configurationDigest() returned, both
taken when the dependency is bound, and schema is a deployment-chosen
identifier of the assessment schema the dependency implements. Other profiles
define their own per-kind binding but MUST feed the root the same way.
Bound dependencies
A native endpoint MUST consult its dependencies only through
ITrustBoundDependency, by read-only calls during execution. It MUST consult,
in this order, the POLICY binding for every command, the IDENTITY binding
for every action with a nonzero destination, the SETTLEMENT binding for
LIQUIDATE, and the ENTITLEMENT binding for RECOVER. It MUST revert at
the first outcome that is not APPLICABLE. For a reversal, subject and
amount are those of the reversed action's record, and destination is the
record's source for RELEASE and its subject otherwise. operation is
the ActionKind value for actions and 0x80 | ReversalKind for reversals.
The endpoint MUST check each consultation for the failures below in the order
listed and revert at the first one found with TrustOperationalFailure and
its reason:
- 200: no code at the bound address, or a runtime code that differs from the
bound
runtimeCodeId; - 201: a configuration digest that cannot be read or differs from the bound value;
- 202: a revert, a return of any length other than 128 bytes, or an outcome word above 2;
- 203: a command echo that differs from the digest passed, or a binding echo that differs from the current binding; and
- 204: an
OPERATIONAL_FAILUREoutcome reported by the dependency.
A consultation with none of the failures 200 to 203 that reports REJECTED
from the binding of kind k MUST revert with TrustRejected and reason
100 + k.
A dependency whose behavior can change without a change of its runtime code, such as a proxy, MUST report a configuration digest that commits to its implementation and other mutable inputs; otherwise a rebind cannot be detected.
These bindings record which code was consulted, and which configuration digest it reported, under which epoch. They do not prove that any external legal, identity, policy, settlement, proceeds, or entitlement claim is true.
Profiles
trustProfile() MUST return a ProfileDescriptor with the profile identifier
and kind, the standard version (2), and the masks of the actions and reversals
the endpoint implements. The descriptor also gives the underlying token (zero
for a native token), a manifest hash, whether the endpoint is full, and
whether it supports a proxy (proxySupported). The descriptor is a
declaration about the endpoint, not proof of conformance. A Full profile MUST
compute full from all live conformance conditions and MUST NOT store a stale
success bit. A Partial or Unsupported profile MUST return full = false. In
this version every endpoint MUST report proxySupported = false, and an
endpoint that runs behind a proxy MUST NOT report a Full profile. A profile
MAY add interfaces with their own ERC-165 identifiers; those identifiers are
never part of the kernel identifier. A profile MAY narrow the field rules of
the commands it carries, and its section MUST list each narrowing with its
reason code. This version defines a native profile and two profiles for tokens
that implement ERC-3643.
Native Full
A Native Full endpoint MUST have the following properties, and MUST return
full = true exactly when each of its four bindings is live: a nonzero
dependency whose EXTCODEHASH equals the bound runtimeCodeId and whose
configurationDigest() returns the bound digest.
| Property | Value |
|---|---|
profileId | keccak256("ERC-TRUST/v2/native-full") |
profileKind | NATIVE_FULL |
| endpoint | the token itself |
underlyingToken | zero |
actionMask, reversalMask | 0x3f, 0x07 |
| dependencies | four read-only ITrustBoundDependency bindings, one per BindingKind; assessment and execution use the same current binding |
| route | IERCTrustNativeRoute; raw setFrozenTokens and forcedTransfer calls fail |
| authority | the account currently registered for authorityRef, which MAY be a contract |
manifestHash | the current dependencyRoot |
| privileged surface | apart from ordinary ERC-20 transfers, no external function other than a typed command, the exact-use ERC-7943 route, and the governance of authorities and bindings changes a balance, frozen target, restriction flag, case, or record |
ERC-3643 Partial
ERC-3643 identity and compliance responses are upstream inputs, not facts
proved by this proposal. The current conformance unit is a governor together
with an adapter; the adapter is the endpoint and the token is
underlyingToken. An ERC-3643 Partial endpoint MUST have the following
properties:
| Property | Value |
|---|---|
profileId | keccak256("ERC-TRUST/v2/erc3643-partial") |
profileKind | PARTIAL |
| dependencies | the sealed token runtime identity, the Identity Registry (IDENTITY), and the Compliance contract (POLICY); SETTLEMENT and ENTITLEMENT are zero, so LIQUIDATE and RECOVER bind their commitments only |
full | false |
manifestHash | the sealed binding |
An endpoint of this profile MUST NOT execute a command unless its sealed topology remains live. In that topology:
- the adapter is the token's exclusive Agent;
- the governor is the token owner and exposes no arbitrary-call, Agent-management, or registry-rebinding path after the seal;
- the token runtime code, Identity Registry, Compliance, owner, and exclusive Agent match the seal; and
- every privileged direct and batch mutator remains unreachable except through the adapter.
A view that reports this operational condition is not a conformance claim;
an endpoint of this profile returns full = false whatever that view
reports.
ERC-3643 has no view that shows an Agent is the only one, so the seal MUST fail (reason 302) unless the token's bound code shows that the adapter is its only Agent, for example through a view.
This profile narrows one field rule: a SEIZE MUST name the adapter as
custodian (reason 6 otherwise). Its transfer actions and RELEASE consult the
Identity Registry for the receiving account and then the Compliance contract;
its overlay commands consult no dependency.
The import manifest is a canonical list of declared accounts. Each included
entry declares a nonzero frozen amount or address freeze, and the seal MUST
verify that entry against live upstream state or revert with reason 303. The
manifest does not prove that all legacy state was declared, and an empty
manifest does not prove a fresh zero state. An imported frozen amount MUST
open a FREEZE case, and an imported address freeze MUST open a RESTRICT
case. Each such case MUST have a synthetic applied head and no command hash or
receipt, so declared state is reversible and amendable under the transition
table.
Before consuming a command, the adapter MUST check that every account the command acts on carries exactly the upstream frozen amount and address freeze flag that the adapter declared or applied, and MUST revert with reason 304 otherwise. After a forced transfer, it MUST restore the source and destination frozen amounts to their owned targets saturated at current balances, then MUST compare both actual upstream restriction flags with adapter-owned state. A mismatch MUST revert with reason 401 and leave the command, nonce, state, receipt, and canonical event unapplied. Receipt pre-state and post-state observations MUST bind actual upstream restriction flags for the subject, source, and destination.
An ordinary inbound transfer between adapter touches can increase balance without increasing the upstream frozen amount. The growth remains transferable until the adapter next touches that account, in a command or in a resynchronization of that account's frozen amount. This is a Partial limitation, not a condition permitted by Verified Full.
ERC-3643 Verified Full
The identifier keccak256("ERC-TRUST/v2/erc3643-verified-full") names the
profile of an adapter whose ERC-3643 token or Compliance contract enforces the
adapter's frozen target through a transfer hook. Whether an endpoint that
reports it conforms is established only by the evidence bound to that
endpoint. A deployment MUST NOT report this profile unless it has all of the
following:
- an atomic fresh deployment;
- a deployment check that establishes the complete initial state;
- a token or Compliance hook that enforces the endpoint's frozen target on every ordinary transfer in the same transaction;
- equality of the actual upstream balance, frozen amount, and restriction post-state after forced transfers;
- matching receipt observations;
- the adapter as the token's exclusive Agent, with no owner call, privileged batch path, upgrade, or mutable code path that can change a balance, frozen amount, or address freeze except through the adapter; and
- a rejected or explicitly bound proxy and upgrade surface of the upstream token and its Compliance contract.
An import from an existing ERC-3643 deployment is Partial unless an enumerable state root, account count, and completeness proof establish the complete initial state. A generic attestation is not that proof.
If a reseal or rebinding surface exists, every reseal MUST increment the dependency epoch and change the root. A governor that seals exactly once keeps the dependency epoch at 1 for the life of the unit.
ERC-7943 views and exact-use route
This subsection applies to an endpoint that implements ERC-7943, which in this
version is the native profile. ERC-7943 views MUST be non-mutating and
non-reverting. canTransfer MUST account for endpoint permission, custody
backing, and the frozen target, and getFrozenTokens MUST report the stored
target saturated at the current balance, so an integrator that needs a
custodian's ordinary capacity uses canTransfer rather than
balance - getFrozenTokens. While a subject has a live RESTRICT head,
canSend(subject) and canReceive(subject) MUST return false.
Raw calls to setFrozenTokens and forcedTransfer MUST fail. The native
route (IERCTrustNativeRoute) MUST accept only the five actions that have an
ERC-7943 mechanic and the UNFREEZE reversal. It MUST reject RESTRICT,
which no ERC-7943 function sets, with reason 6 and any other reversal with
reason 7. The route MUST validate, assess, and consume a typed command and
then invoke the sensitive selector in the same transaction. Each sensitive
selector MUST succeed only when the route invokes it, at most once, with
exactly the command, selector, and arguments the route authorized, while the
dependency root and epoch are those current at that authorization. Every other
call to it MUST revert. A rejected call MAY revert with TrustRouteMismatch,
whose routeKey is computed from the domain, the endpoint, the selector, and
the calldata hash only on failure and is not stored. The reference
implementation meets this with an exact-use ticket consumed once within the
transaction.
For the absolute frozen amount, a greater target is a FREEZE action or
amendment, a lower target is an UNFREEZE reversal of the subject's live
FREEZE head, which restores the target recorded before that head, and an
equal target is rejected like any FREEZE that does not raise the target
(reason 12). setFrozenTokens MUST NOT relabel a decrease as FREEZE.
Upgradeability and migration
Proxy and migration profiles are Unsupported in this version; a profile that supports them needs its own conformance requirements and evidence, and it MUST NOT inherit either Full designation.
Rationale
Typed commands over a reason argument
ERC-7943 names its enforcement primitive forcedTransfer for neutrality: the
name states no reason for the transfer. This proposal leaves the primitive
neutral and adds a typed command for each action whose legal effect differs. A
reason argument or event on forcedTransfer was rejected because it labels a
transfer without constraining it: nothing would stop a decrease from being
recorded as a freeze or one authorization from being used twice. A registry of
actions kept beside the token was rejected because it cannot make the token
refuse an operation. When the token itself executes the typed command, the
recorded action and the token effect cannot diverge.
Effects per case and per amount
The action meanings, including which actions can be reversed, come from
ERC-8319. ERC-8319 draws its transition model over one state per asset, as a
reference rather than a prescribed implementation; this proposal applies it
per case and per amount. Escalating to another family opens a new case instead
of converting the old one, so each effect stays on record until its own
reversal lifts it. This admits combinations that the single-state model leaves
undefined, such as a freeze from one matter and a restriction from another on
the same holder, but none relaxes one effect into another or lifts the effect
of another matter. Within one overlay family a subject has at most one live
head, so two matters that need concurrent freezes share a case or wait.
FREEZE is the absolute frozen amount of ERC-7943 and RESTRICT is the
address freeze of ERC-3643; both keep ownership and both are reversible.
Within its declared semantic domain, the abstract model described in the
Reference Implementation section preserves one invariant over balances,
custody backing, and case and overlay records through every operation. The
model proves that a FREEZE changes no restriction flag, that a RESTRICT
changes no frozen target, and that a CONFISCATE, LIQUIDATE, or RECOVER
changes neither, so these combinations never lift another matter's freeze or
restriction. Consistent balances and custody alone are not enough: the model
exhibits a state that satisfies both but has a malformed freeze head, and an
applied FREEZE from that state detaches a seizure from its case. The full
invariant excludes that state, which is why it also covers the case and
overlay records and why the Specification fixes their transitions.
One receipt format and failure classes
Every action and reversal records the same seventeen-field receipt, separated by a kind tag, and every preimage input is stored, so a reader recomputes a receipt from the endpoint alone. Formats per command kind, or slots that are not stored, were rejected because they would break that. The reason classes separate a completed policy denial from an unavailable dependency, which an auditor and a relayer treat differently. The endpoint classifies a dependency that reverts or returns malformed data itself, so the distinction does not depend on the dependency reporting its own failure.
Full-state stutter and typed reversals
Every revert is a full-state stutter, and a malformed request is rejected
before any external call, so an applied event proves that every check of its
command passed. Reversals are commands for the same reason: lifting an effect
carries its own authority, nonce, validity window, dependency root, and
receipt, so it is as attributable as imposing it. A FREEZE can only raise a
frozen target, and only an UNFREEZE of the live head lowers it; otherwise a
command recorded as FREEZE could release tokens.
One dependency root and global epoch
Binding only the policy dependency would let a command built under one identity registry execute after the registry is replaced, and per-dependency pairs would widen every request. A root over all four bindings with one global epoch binds them in two words, and one comparison makes every older command stale. A native binding commits to runtime code and configuration digest because an address alone does not fix behavior. The endpoint address, the chain id, and authority epochs bind a command in the same way to where and by whom it was prepared.
Exact-use route and adapters for existing tokens
A native endpoint remains an ERC-20 and ERC-7943 token and emits their events for its typed commands, so existing indexers keep working and gain receipts. The two sensitive ERC-7943 selectors run only through the exact-use route, because a selector that a standing role can call could be reused outside a typed command. An existing ERC-3643 token adopts the kernel through an adapter instead of being reissued. Its upstream mutations are stateful, so the adapter owns the state it touches, verifies declared state at the seal, and reports Partial. A fresh deployment with a transfer hook can meet Verified Full.
What the kernel leaves out
The normative surface is the kernel interface, the wire format, and observable
behavior; no proxy, governance product, identity registry, policy language, or
storage layout is mandated. Delegation is a policy of the authority account,
which can be a contract. Cancellation would need a second consumable state for
an unapplied command, while the validity window and the exactly-once keys
already bound a prepared command. ERC-8319 describes RESTRICT as
configurable; this proposal gives it one configuration so that every endpoint
records and reverses the same effect.
Related work
ERC-1450 specifies a security token operated by a registered
transfer agent; this proposal neither replaces it nor infers regulatory
actions from its function names. The mechanisms of ERC-3643 are the adapter
target of the ERC-3643 profiles, but they do not by themselves provide the
command, case, reversal, receipt, and dependency semantics defined here.
ERC-7943 provides the neutral mechanics and leaves legal proofs and
coordination among privileged actors to extensions; this proposal is such an
extension. ERC-8319 defines the action meanings without an on-chain interface
and anticipates a Standards Track proposal that maps them onto a minimal
forced-transfer primitive; this proposal is that mapping for all six actions.
The policy of ERC-8473 decides whether a movement may happen, while a receipt
of this proposal records which act it was. The two do not yet compose on one
token, because ERC-8473 lowers a frozen amount on a FORCED movement and this
proposal keeps the freeze of another case (see the forced-transfer item in
Backwards Compatibility).
Backwards Compatibility
This proposal changes no interface, event, or interface identifier of ERC-20 or ERC-7943. Applications that use only their views and ordinary transfers keep working, and a native endpoint differs from an ERC-7943 token whose privileged functions are called directly in these ways:
- Direct calls.
forcedTransferandsetFrozenTokensrevert unless the exact-use route invokes them for a typed command; ERC-7943 leaves their access control to the implementation. An integration that automates enforcement submits typed commands instead. - Frozen amounts. Lowering a frozen target is an
UNFREEZEof the live head, andgetFrozenTokensreports the target capped at the balance, where ERC-7943 describes the absolute amount, which may exceed it. - Forced transfers of frozen tokens. A
SEIZEor disposition can move tokens counted as frozen; the freeze stays with its own case, and noFrozenevent is emitted for the moved tokens. ERC-7943 requires a single-party context that bypassescanTransferto unfreeze first, and recommends that a multi-party context not bypass frozen constraints. A conforming endpoint is meant as a multi-party context and departs from that recommendation so that the enforcement of one matter does not lift the freeze of another. A deployment in which one account holds every authority and controls every dependency is a single-party context, and there this behavior does not meet ERC-7943. - Custody backing. Ordinary transfers cannot spend it, so a custodian's
balance can exceed what
canTransferallows.
Existing deployments do not become conformant by exposing similar operations.
An existing ERC-3643 token whose code can show that the adapter is its only
Agent can be placed behind the Partial adapter without being reissued, and it
reports full = false. A conforming endpoint is detected by its ERC-165
support for 0x2b020308, and its profile is read from trustProfile().
Test Cases
Each case below gives an input or a mutation of a valid request and the result
that an endpoint following the Specification section produces. The conformance
vectors in
conformance-v2.json
are generated from the machine-readable kernel definition. For one fixture covering all six actions and three
reversals, they fix the identifiers, command hashes, binding hash, dependency
root, receipt hashes of both kinds, calldata lengths, and the kernel interface
identifier with its nine function selectors. They cover seven of the cases
below: wrong domain, field binding, stale dependency, case conflict, terminal
case, replay, and receipt kind.
| Case | Input or mutation | Expected result |
|---|---|---|
| Domain binding | change only the chain id or the endpoint address | a different identifier |
| Field binding | change one request field other than actionId to another value inside its declared type after deriving actionId | TrustInvalidCommand reason 2, except the domain field, which reason 1 rejects first; every mutation yields a different derived identifier |
| Wrong domain | any value other than DOMAIN | TrustInvalidCommand reason 1 |
| Non-canonical request | wrong length, dirty high bits, an enum out of range, or a nonzero call value | revert and full-state stutter without an event or an external call; the revert data is not specified |
| Derived identifier of a non-canonical request | take a non-canonical request, call deriveActionId or deriveReversalId with its words and zero value, and, if that call returns, write the returned value into the request's identifier field before submitting it | revert and full-state stutter without an event or an external call |
| Validity window | block.timestamp before validAfter or after validBefore, or validBefore zero | TrustInvalidCommand reason 3 |
| Rotated authority | the registered account sends a request whose authorityEpoch is not the authority's current epoch | TrustInvalidCommand reason 4 |
| Unauthorized caller | a caller other than the account registered for authorityRef, at the current authority epoch | TrustUnauthorized and full-state stutter |
| Stale dependency | any dependency rebound after the request was built | TrustInvalidCommand reason 5 |
| Replay | submit an applied command again, or reuse its nonce under the same authority epoch | TrustReplay and full-state stutter |
| Freeze direction | a target not greater than the current one | TrustInvalidCommand reason 12; a decrease needs an UNFREEZE of the head |
| Case conflict | FREEZE or RESTRICT while the subject's live head belongs to another open case, or a disposition against an open overlay case | TrustInvalidCommand reason 10 and full-state stutter |
| Custody | a second SEIZE in a custody case, or a disposition or RELEASE that does not match the custody record | TrustInvalidCommand reason 8 |
| Entitlement reuse | a RECOVER whose entitlement an applied RECOVER already consumed | TrustInvalidCommand reason 9 |
| Reversal pairing | a reversal whose kind does not pair with the referenced action, such as RELEASE of a FREEZE | TrustInvalidCommand reason 7 |
| Terminal case | any action or reversal against a TERMINAL case | TrustTerminal and full-state stutter |
| Policy denial | a bound dependency answers REJECTED | TrustRejected and no key consumed |
| Dependency failure | a bound dependency reverts, returns malformed data, or echoes the wrong command or binding | TrustOperationalFailure and no key consumed |
| Receipt kind | recompute a REVERSAL receipt with receiptKind = ACTION | a different receiptHash |
| Receipt consistency | any applied command | the return value, the stored receiptHash, and the applied event's receiptHash are equal |
| Raw sensitive selector | call setFrozenTokens or forcedTransfer other than through the exact-use route | revert |
| Interface honesty | supportsInterface(0xffffffff) or an identifier defined in this proposal whose interface the endpoint does not implement completely | false |
Reference Implementation
A reference package accompanies the discussion of this proposal: an immutable
native token, an ERC-3643 Partial adapter with the governor that seals it, a
development hook adapter for fresh ERC-3643 deployments, and a TypeScript SDK.
Its Solidity contracts are in this proposal's assets under the BSD 3-Clause
License, with the native token in
TrustToken.sol
and the ERC-3643 adapters and governor under contracts/profiles/.
The interface, the ABI, the SDK types, and the conformance vectors are
generated from one machine-readable definition of the kernel. These materials
are non-normative: passing their tests or proofs does not establish the
conformance of another implementation or of any deployment.
- Model. The abstract model of the kernel is mechanically verified in Isabelle/HOL within its declared semantic domain. Its well-formedness invariant holds initially and is preserved by every operation the model defines. The model extends the transition model of ERC-8319.
- Registered executions. For 96 registered executions of the three runtimes, Isabelle/HOL checks that each execution certificate of the exact compiled runtime is related to a step of the model. The certificates come from the K, KEVM, and Kontrol toolchain, and the check rests on named assumptions, among them the toolchain, EVM semantics, Keccak-256, and storage layout. The package records these proofs by hash. For other executions the link is an unproved assumption, and the package labels its evidence "mapped implementation evidence; end-to-end refinement incomplete".
- Code. An obligation ledger connects each load-bearing model condition
that its review identified to the code through a source consumer, a positive
test, a negative detector, and a compiled consumer; the list is not proved
complete. Four bounded symbolic proofs on the native bytecode cover the
closed raw selectors, two failure stutters, and a
LIQUIDATEwith its receipt last. The runtimes are byte-for-byte reproducible under the pinned compiler (reproducibility, not compiler correctness), and a separate program written from the definition and the vectors alone reproduces every value in the vectors.
The companion paper1 describes the semantics and the falsification method for an earlier state of the package.
Unaudited. Not for production. No deployment, proxy, migration, or external legal/factual truth is verified.
Security Considerations
Authority does not establish legal power
The endpoint verifies that the caller is the account registered for
authorityRef at the current epoch. It cannot determine whether that
authority has valid legal power in a jurisdiction or case. How an authority
is created, reviewed, rotated, and revoked is a deployment decision outside
this proposal, and a compromised authority account can issue any command its
epoch permits until it is rotated. A registered authority that is a contract
inherits that contract's own access control, which the kernel does not
inspect.
Replay and cross-domain reuse
Every identifier binds the domain, the endpoint address, the chain id, and
the complete request, and every command carries the current dependency root
and epoch. Omitting any of these from a derivation would allow replay across
deployments or after a governance change, which is why the Specification
rejects reused command identifiers and nonce tuples and reports stale
commands before any state-dependent rule. The validity window is bounded by
block.timestamp, which is subject to ordinary validator timestamp
tolerance; a window narrower than that tolerance is unreliable.
Raw privileged bypass
If the same authority can reach forcedTransfer, setFrozenTokens, mint,
burn, batch, recovery, owner, agent, proxy, or migration routes outside the
typed kernel, receipts do not describe the complete regulatory state. The Full profiles
therefore require a closed privileged surface (see "Native Full" and
"ERC-3643 Verified Full"), so a Full endpoint has no untyped forced transfer;
a deployment that needs one outside the six actions does not claim a Full
profile.
Reentrancy and partial writes
External calls introduce reentrancy and denial-of-service risk. Native dependencies are read-only and bound to code and configuration. An adapter that mutates an upstream token is exposed to reentrancy through that token; the Specification lets an endpoint reject a reentrant call outright and has the adapter compare upstream post-state and revert on mismatch, and because every revert is a full-state stutter, a failed call leaves no applied event or receipt.
Dependency substitution and stale configuration
An address alone does not identify dependency behavior. Upgradeable code, registry changes, mutable configuration, or schema changes can alter an assessment without changing the calling interface. Binding the code, the configuration digest, the schema, and the epoch, and folding every binding into one root that every command carries, makes such changes detectable; it does not make the dependency trustworthy. A rebind invalidates every command prepared under the previous root.
Terminal and irreversible actions
CONFISCATE, LIQUIDATE, and RECOVER are terminal. A malformed case,
destination, custody record, settlement premise, or entitlement can cause an
irreversible disposition. Any registered authority can issue any action, and
dependencies do not see the authority reference. A deployment that needs
stronger approval for terminal actions registers only authorities that are
contracts enforcing that approval.
Custody accounting
SEIZE separates token custody from a declared prior holder. An
implementation that treats the current balance holder as legal title can
misstate ownership. The Specification keeps custody backing unspendable by
ordinary transfers and has RELEASE and a custody disposition consume the
case's whole active custody record.
Frozen targets over an adapted token
Under the ERC-3643 Partial profile the token holds a frozen amount while the kernel holds a frozen target, so tokens received between two touches of an account are transferable until the next touch, by a command or a resynchronization. A deployment that cannot accept that window needs a transfer hook inside the token or its Compliance, which the Partial profile does not use and the Verified Full profile requires. The seal binds a declared token code identifier to the live code but does not audit that code. It binds only what the profile names, so an upgrade, a module change, or a registry update made by the owner of a proxy-based token, Identity Registry, or Compliance contract changes neither the seal nor the root. An ERC-3643 Verified Full designation is invalid if another Agent, an owner call, an upgrade, a privileged batch path, or a mutable code path can bypass the adapter.
Receipt limitations and privacy
A receipt and its commitments can reveal that a person, address, asset, or case is subject to regulatory action. Confidentiality, tipping-off, and personal-data obligations need assessment before identifiers or evidence are placed on a public chain, and hashing low-entropy or identifying data can fail to provide effective confidentiality. The receipt proves only the on-chain transition and the committed inputs. It is not a legal opinion, security audit, settlement confirmation, identity proof, or ownership determination.
Upgrade, proxy, and migration risk
The interface does not make an implementation immutable. An upgrade can change authorization, transitions, event ordering, or receipt computation while the address stays constant. Proxy and migration profiles are outside this version; such a profile would have to bind its implementation and governance, reconcile the complete case, action, and replay state, invalidate or reauthorize pending commands, and reassess conformance after every change.
Deployment and audit boundary
Conformance of source code, and the machine-checked evidence of the Reference Implementation section, do not establish the identity or safety of a deployment or of another implementation. A claim about a deployment is only as strong as its binding of the source, compiler settings, creation and runtime bytecode, constructor inputs, addresses, roles, external dependencies, chain, and current configuration. Independent audit and key management remain outside this interface.
Copyright
Copyright and related rights waived via CC0.
Footnotes
-
↩
{ "type": "article", "id": 1, "author": [ { "family": "Kim", "given": "Jinwook" } ], "DOI": "10.48550/arXiv.2608.29134", "title": "Mechanizing Typed Regulatory Actions for Security Tokens: Semantics, Falsification, and Bounded EVM Evidence", "original-date": { "date-parts": [ [2026, 8, 29] ] }, "URL": "https://arxiv.org/abs/2608.29134" }
