T-REX (Token for Regulated EXchanges) - RWA #1814
Replies: 6 comments 2 replies
-
|
We should mention the interfaces under the Identity Verification system. It's non-trivial and needs more clarification. Please add the interface for Also the docManager is a neat extension and deserves at least a mention: https://github.com/OpenZeppelin/stellar-contracts/tree/main/packages/tokens/src/rwa/extensions/doc_manager |
Beta Was this translation helpful? Give feedback.
-
|
Really disgusting, really concerning. |
Beta Was this translation helpful? Give feedback.
-
Sure!
The reason we omitted those from the specification is, this is not mandatory and actually not part of the specification (claim-based identity stack), but the most common and the default solution for the identity-stack. If we are to mention it and give the specifics/interfaces nevertheless, we should do it very carefully imo to not signal that this is a part of the spec, and it is only one possible implementation out of many. Would like to hear your thoughts on it 👍 |
Beta Was this translation helpful? Give feedback.
-
|
This is so great, thank you @ozgunozerk!
I may have some other suggestions inline, but maybe I could made edits on the PR. Please feel to raise the PR, thank you! 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
Can the events be described using the |
Beta Was this translation helpful? Give feedback.
-
|
What address does the /// Returns the address of the onchain ID of the token.
///
/// # Arguments
///
/// * `e` - Access to the Soroban environment.
fn onchain_id(e: &Env) -> Address;Thoughts on removing the 'onchain_id' terminology here too? I believe it is redundant, but maybe it isn't. What am I missing that makes the distinction here important? investor_onchain_id: Address |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Preamble
Summary
This proposal defines a standard contract interface for T-REX (Token for Regulated EXchanges) - colloquially known as RWA token - on Stellar. T-REX tokens represent tokenized real-world assets such as securities, bonds, real estate, or other regulated financial instruments that require compliance with regulatory frameworks. T-REX tokens are permissioned tokens, ensuring that only eligible investors can hold and transfer these tokens.
This standard is based on the T-REX (Token for Regulated Exchanges) framework, as implemented in ERC-3643 (https://github.com/ERC-3643/ERC-3643), but introduces significant architectural improvements for flexibility and modularity.
Motivation
Real World Assets (RWAs) represent a significant opportunity for blockchain adoption, enabling the tokenization of traditional financial instruments and physical assets. However, unlike standard fungible tokens, RWAs must comply with complex regulatory requirements including but not limited to:
The T-REX standard provides a comprehensive framework for compliant security tokens. This SEP adapts T-REX to the Stellar ecosystem, enabling:
Architecture Overview
This RWA standard introduces an approach built around loose coupling and implementation abstraction.
Core Design Principles
Component Architecture
The Stellar T-REX consists of several interconnected but loosely coupled components:
This design enables the same core RWA token interface to work with vastly different regulatory and technical requirements for identity verification, such as Merkle trees, Zero-Knowledge proofs, claim-based systems, and others. Furthermore, the modular hook-based system supports diverse regulatory requirements through pluggable compliance rules.
Interface
The RWA token interface extends the fungible token (SEP-41) with regulatory required features: freezing, pausing and recovery.
Architecture Overview
The RWA token contract requires only two external functions to operate:
can_transfer()is expected to be exposed from a "Compliance" contract.verify_identity()is expected to be exposed from an "Identity Verifier" contract.These functions are deliberately abstracted as implementation details, enabling:
In other words, the only thing required by this RWA token design, is that the RWA token should be able to call these expected functions made available by the compliance and identity verification contracts.
Contract Connection Interface
The RWA token provides simple setter/getter functions for external contracts:
Integration Pattern
To deploy a compliant RWA token and make it functional:
set_compliance()andset_identity_verifier(). Additionally, configure internal connections within the compliance stack (e.g., linking compliance contract to compliance modules) and identity stack (e.g., linking identity verifier to claim topics/issuers or custom registries) as needed for your implementation.Events
Transfer Event
The transfer event is emitted when RWA tokens are transferred from one address to another, including forced transfers and recovery operations.
Mint Event
The mint event is emitted when RWA tokens are minted to a verified address.
Burn Event
The burn event is emitted when RWA tokens are burned from an address.
Recovery Event
The recovery event is emitted when tokens are successfully recovered from a lost wallet to a new wallet.
Address Frozen Event
The address frozen event is emitted when an address is frozen or unfrozen.
Tokens Frozen Event
The tokens frozen event is emitted when a specific amount of tokens is frozen for an address.
Tokens Unfrozen Event
The tokens unfrozen event is emitted when a specific amount of tokens is unfrozen for an address.
Compliance Set Event
The compliance set event is emitted when the compliance contract is updated.
Identity Verifier Set Event
The identity verifier set event is emitted when the identity verifier contract is updated.
Reference Implementation: Component Deep Dive
1. Identity Verification System
Philosophy: The entire identity stack is treated as an implementation detail, enabling maximum regulatory and technical flexibility.
The IdentityVerifier Trait
Implementation Strategies
Different regulatory environments may require different approaches. Here are some examples:
1. Claim-Based Verification (Reference Implementation)
2. Merkle Tree Verification
3. Zero-Knowledge Verification
4. Custom Approaches
Reference Implementation Architecture
The claim-based reference implementation demonstrates the full complexity of traditional RWA compliance:
Key Components:
Note that, Claim-Based Identity Verification is a reference implementation, it is not a part of the specification. For detailed interface specifications of these components, see the Appendix: Claim-Based Identity Verification Reference Implementation section.
2. Compliance System
Modular hook-based architecture supporting diverse regulatory requirements through pluggable compliance modules.
The Compliance Trait
Hook-Based Architecture
The compliance system uses a sophisticated hook mechanism:
Compliance Module Examples
Transfer Limits Module:
CanTransfer+TransferredJurisdiction Restrictions Module:
CanTransferHolding Period Module:
CanTransfer+CreatedInvestor Accreditation Module:
CanCreateShared Compliance Infrastructure
Compliance contracts are designed to be shared across multiple RWA tokens, reducing deployment costs and ensuring consistent regulatory enforcement:
3. Advanced Token Controls
Freezing Mechanisms
The system supports multiple freezing strategies to accommodate for different regulatory requirements:
Address-Level Freezing:
Partial Token Freezing:
Recovery System
Two distinct recovery flows are supported:
Forced Transfers
For regulatory compliance (court orders, sanctions):
4. Access Control & Governance
RWA tokens require proper access control to ensure that sensitive operations are only performed by authorized entities:
operatorauthorizationExtensions
The RWA token standard can be extended with additional functionality beyond the core specification. Extensions are optional modules that add specialized features while maintaining compatibility with the base RWA interface.
Document Manager (ERC-1643)
The Document Manager extension provides document management capabilities for RWA tokens, following the ERC-1643 standard. This is particularly useful for attaching legal documents, prospectuses, or regulatory disclosures to token contracts.
Key Features:
Use Cases:
Custom Extensions
Implementers are free to create custom extensions tailored to their specific requirements.
Deviations from ERC-3643
Several limitations in the original ERC-3643 standard and its reference implementation were identified and respectively addressed:
1. Tight Coupling Issues
2. Inflexible Identity Models
3. Redundant Contract Hierarchies
4. Limited Compliance Flexibility
Upgrade and Migration Strategies
Compliance Evolution:
Identity System Migration:
For general contract upgrade patterns and best practices, refer to SEP-49: Upgradeable Contracts.
Appendix: Claim-Based Identity Verification Reference Implementation
Overview
The claim-based approach uses cryptographic claims issued by trusted authorities (KYC providers, compliance firms) to verify investor identities. This implementation consists of four main components that work together:
ClaimTopicsAndIssuers Interface
The
ClaimTopicsAndIssuerscontract acts as the trust registry, defining which claim topics are required for token participation and which issuers are authorized to provide those claims.Purpose:
Interface:
IdentityRegistryStorage Interface
The
IdentityRegistryStoragecontract stores identity information for verified investors, including their identity contract references and country relations.Purpose:
Interface:
IdentityClaims Interface
The
IdentityClaimscontract manages on-chain identity claims with cryptographic signatures. This contract is controlled by the investor and stores claims issued by trusted authorities.Purpose:
Interface:
Claim Structure:
Each claim contains:
ClaimIssuer Interface
The
ClaimIssuercontract validates cryptographic claims about investors. These contracts are operated by trusted third parties (KYC providers, compliance firms).Purpose:
Interface:
Verification Flow
The following describes how these components work together during token operations:
verify_identity()Note: The KYC Provider and Claim Issuer are the same entity. Signing happens off-chain; only the signed claim and revocation data are stored on-chain.
Beta Was this translation helpful? Give feedback.
All reactions