Futures
Access hundreds of perpetual contracts
TradFi
Gold
One platform for global traditional assets
Options
Hot
Trade European-style vanilla options
Unified Account
Maximize your capital efficiency
Demo Trading
Introduction to Futures Trading
Learn the basics of futures trading
Futures Events
Join events to earn rewards
Demo Trading
Use virtual funds to practice risk-free trading
Launch
CandyDrop
Collect candies to earn airdrops
Launchpool
Quick staking, earn potential new tokens
HODLer Airdrop
Hold GT and get massive airdrops for free
Pre-IPOs
Unlock full access to global stock IPOs
Alpha Points
Trade on-chain assets and earn airdrops
Futures Points
Earn futures points and claim airdrop rewards
Promotions
AI
Gate AI
Your all-in-one conversational AI partner
Gate AI Bot
Use Gate AI directly in your social App
GateClaw
Gate Blue Lobster, ready to go
Gate for AI Agent
AI infrastructure, Gate MCP, Skills, and CLI
Gate Skills Hub
10K+ Skills
From office tasks to trading, the all-in-one skill hub makes AI even more useful.
GateRouter
Smartly choose from 40+ AI models, with 0% extra fees
Linking Real-World Assets: From Protocol Suite Analysis to Security Practices
RWA (Real World Asset) is becoming an important direction for the deep integration of Web3 and traditional finance. Compared to traditional DeFi, RWA protocols not only carry on-chain asset circulation but also directly map to real-world assets such as bonds, equity, real estate, equipment, and income rights. Its security boundary extends from “code security” to “rights confirmation, compliance governance, and off-chain execution.”
From an auditing perspective, the core challenge of RWA is no longer just preventing funds from being stolen, but ensuring that code logic, business rules, and real legal rights remain consistent: a permission change may correspond to asset freezing; a forced transfer may affect the ownership of claims in the real world.
This article will systematically review the core modules, common risks, and key audit points of RWA protocols from the perspectives of protocol classification, standard implementation, and security auditing practices, helping developers and auditors quickly establish a security methodology for mapping real-world assets.
Due to space constraints, this article will primarily showcase the core framework, key modules, and main conclusions. For a complete view, please visit GitHub: 获取.
1. Preface: Viewing RWA from a Code Audit Perspective
1.1 The Multi-Dimensional Security and Audit Challenges Introduced by RWA Protocols
From a code audit perspective, the biggest differences between RWA protocols and ordinary DeFi are threefold:
In traditional DeFi, the lifecycle of a transaction is mostly fully covered by smart contracts: from invocation, computation, to state updates, all on-chain.
In RWA, a common flow is:
User calls redeem() or forcedTransfer() on-chain → contract updates state and records events → off-chain system receives notification, executes real asset delivery, transfer, or liquidation → results are fed back (or kept off-chain).
1.2 The Core Mission of RWA Auditing
In a typical RWA project, the goal of security auditing is no longer just “preventing funds from being hacked,” but at least to uphold three bottom lines:
1.3 The Perspective and Scope of This Article
This article discusses RWA from a security audit perspective.
Building on existing smart contract audit experience, it adds specialized knowledge about RWA protocol structures and audit focus areas.
The goal is to enable developers to target their RWA protocol development and allow auditors to approach RWA projects with a systematic method tailored to real-world asset mapping scenarios.
This article will not attempt to:
2. Overview of RWA Protocols and Code Modules
2.1 Starting from Business: First Identify the RWA Category
From a security audit business perspective, projects can be roughly categorized into four types:
2.2 From Standards to Implementation: “Adequate Understanding” of Common RWA Protocol Families
2.2.1 Compliance Securities Standards
This set of standards addresses how to issue and circulate “regulated securities / securitized products” on-chain, complying with KYC, transfer restrictions, and mandatory operations.
2.2.2 Real Estate / Immovable Property Standards
The core difficulty of real estate RWA is not “how to issue tokens,” but “how to structurally and securely embed various property information into smart contracts.”
2.2.3 Physical Equipment / Physical Exchange Standards
These standards typically solve two problems: how to bind tokens/NFTs to physical items, and how to implement exchange, usage, and cancellation processes under this binding.
2.2.4 Structured Assets / Universal RWA Interface Standards
These standards focus more on “complex asset structures” and “unified interfaces.”
2.3 Typical RWA Contract Architecture
Regardless of which category a project belongs to, most complete RWA protocols will generally include the following modules in their code structure:
2.4 Rapid Three-Step RWA Localization Method
Step 1: Read business materials first, identify asset type and standard.
Step 2: Search for keywords in code.
Step 3: Draw an architecture diagram.
3. Deep Deconstruction of Protocol Families: Compliance Models of Mainstream RWA Standards
This chapter will delve into code-level deconstruction of current mainstream RWA standards.
I. Securities RWA: Deep Analysis of ERC-1400 (UniversalToken)
1. Overall Contract Architecture
The ERC-1400 (UniversalToken) project, developed by ConsenSys, is a platform for issuing and managing securities tokens based on the ERC1400 standard, featuring partition management, hold mechanisms, certificate verification, fund issuance, and token exchange. It mainly supports compliant securities issuance, trading, and management with fine-grained permission control and regulatory functions.
The framework can be divided into six core modules:
2. Deep Analysis of ERC1400 (UniversalToken) Core Contracts
2.1 Key Data Structures
2.1.1 Basic Token Info
Beyond standard ERC20 metadata, the contract introduces parameters with securities significance:
granularity: Ensures the minimum tradable (divisible) unit of securities.isControllable: Allows regulators or issuers to forcibly transfer or redeem tokens if needed.isIssuable: Controls whether new tokens can still be minted.migrated: When upgrading contracts, facilitates migration to new versions, guiding users and registering in a central registry.2.1.2 Partition (Core Innovation of ERC1400)
Partition mechanism is a key innovation, dividing tokens into multiple independent partitions, each with its own balance and supply.
2.1.3 Operator Permission System
ERC1400 employs a three-tier operator permission system, balancing flexibility and security:
2.1.4 Document Management System
2.2 Core Function Modules
2.2.1 Issuance
Token issuance is the start of the securities lifecycle. ERC1400’s flexible and secure issuance mechanism is restricted to minters or owners, only when
isIssuableis true, ensuring controlled issuance.Supports two modes: simple issuance (to default partition) and partitioned issuance (to specified partitions). These mechanisms map to real-world scenarios like IPO/STO, private placements, employee options, and dividend distributions.
2.2.2 Redemption
Redemption reduces supply and signifies asset exit. ERC1400 supports four redemption paths:
Real-world mappings include buybacks, liquidation distributions, callable bonds, and enforcement of compliance violations.
2.2.3 Transfer and Compliance Checks
Transfer is core to securities trading. ERC1400 designs layered transfer mechanisms:
Real-world scenarios include secondary trading, DVP settlement, custodial rebalancing, and cross-border compliance.
2.3 Extensible Hooks System — Pluggable Compliance Modules
The compliance checks depend on ERC1400’s hooks system.
2.3.1 Sender Hooks
Called before tokens leave the sender address, allowing custom pre-transfer logic, such as:
2.3.2 Verifier Hooks
Core to compliance, registered via ERC1820, verifying identities, sanctions, or other rules. Examples:
2.3.3 Receiver Hooks
Called after tokens arrive at the recipient, enabling post-transfer logic like:
3. Extended Contract Modules Deep Dive
This chapter delves into implementation details and technical choices.
3.1 ERC1400TokensValidator — Compliance Engine Implementation
3.1.1 Certificate Verification
Supports off-chain approval with on-chain verification, combining complexity and security. Uses Nonce-based or Salt-based modes.
3.1.2 Dynamic Whitelist/Blacklist Management
Role-based access control via OpenZeppelin, managing trusted claim issuers and credential types.
3.1.3 Hold Functionality — Conditional Funds Locking
Implements a state machine with six states, enabling conditional locking of funds without transfer.
3.1.4 Fine-Grained Partition Control
Supports per-partition granularity, mapping to real-world lot sizes.
3.2 ERC1400TokensChecker — Transfer Feasibility Query
Provides a view function to simulate transfer feasibility without gas costs.
3.3 ERC20HoldableToken — Lightweight Hold
For simpler use cases, compatible with ERC20, adding a
spendableBalanceledger.3.4 ERC1400HoldableToken & ERC1400HoldableCertificateToken — Modular Tokens
Scenario selection guides include digital fiat, private equity via SPV, and regulated securities.
4. Role Management Module
ERC-1400’s role system is layered and hierarchical.
4.1 Core Governance: Owner and Controller
4.2 Asset Issuance Layer: Minter and Price Oracle
4.3 Operational Execution Layer: Operator and Trade Executors
4.4 Compliance & Risk Control Layer
5. Utility Contracts: Enhancing Interoperability and Usability
The ERC-1400 family offers tools to address interoperability, security, and efficiency.
5.1 ERC1820 Registry
Dynamic service discovery for contracts.
5.2 EIP-712 Domain Separator
Secure structured data signing.
5.3 Batch Operation Tools
Handle large-scale issuance, transfer, and management efficiently.
5.4 Fund Issuance Tools
Support periodic issuance and settlement models.
5.5 Atomic Swaps & DVP
Enable secure secondary trading with DVP.
II. Securities RWA: Deep Analysis of ERC-3643 (T-REX)
1. Overall Architecture
From an audit perspective, ERC-3643 comprises three core layers:
Uses Proxy-Implementation pattern for upgradeability, with factory and role management contracts.
2. Deep Dive into ERC-3643 Core Contracts
2.1 Data Structures
Distributed across components, referencing each other:
2.2 Core Functionality Modules
2.3 Registry System
2.4 Legacy Modules
Includes DefaultCompliance and BasicCompliance for backward compatibility.
2.5 Role Management
2.6 Tool Contracts
III. Deep Analysis of Specific Protocols and Standards
1. Real Estate RWA: ERC-6065 (Real Estate Token)
Applicable for: Real estate REITs, mortgage-backed stablecoins, cross-border property trading.
2. IoT & Physical Assets: ERC-4519
Applicable for: Decentralized leasing, high-value logistics, vehicle IoT control, auto-locking in loans.
3. Universal Compliance Interface: ERC-7943 (uRWA)
Applicable for: Regulated DeFi liquidity pools, securities issuance (STO), AML/KYC compliance, institutional stablecoins.
4. Secure Coding Practices
Regardless of protocol standard or asset architecture, rigorous code implementation is the foundation of compliance and innovation.
4.1 Permission & Role Design: Plan “Who Can Do What”
Permissions are not just “admin exists,” but “what level of admin can do what.”
Common roles include: owner, multi-sig governance, upgrade admin, compliance admin, KYC/whitelist admin, freeze admin, asset registration, redemption admin, oracle, risk parameters, treasury, etc.
For developers:
For auditors:
4.2 State Machines & Invariants: Encode Business Lifecycle in Code
State machines define permissible states and transitions; invariants ensure core constraints always hold.
From development:
From auditing:
4.3 Asset Mapping & Ledger Consistency: Prevent Mismatch Between On-Chain and Off-Chain Assets
RWA’s characteristic: on-chain is just a map; real assets are off-chain. Therefore, “ledger consistency” is more critical than in DeFi.
Developers:
Auditors:
Principles:
4.4 Upgrade & Proxy Patterns: Leave a Path for Changes & Coordinate with Rule Makers
Most RWA projects use proxy patterns (Transparent/UUPS) with multi-sig or governance.
Developers:
Auditors:
4.5 Events & Logs: Leave “Evidence Chain” for Future & Regulators
Events are not just for UI or block explorers but are crucial for audits, evidence, disputes, and compliance.
Developers:
Auditors:
5. RWA Contract Compliance & Security Disclosure Checklist
I. Audit Checklist
Based on previous analysis, a comprehensive full-chain audit checklist for RWA smart contracts.
1. Architectural & Pre-Audit Scope Identification
Before diving into code, clarify:
2. Contract Security & Arithmetic Integrity
High-value assets require Solidity security best practices:
3. Identity & Compliance Verification
Core features:
4. Asset Lifecycle Management
From issuance to destruction, ensure:
5. Asset Operation & Governance
Post-deployment management:
6. Transaction & Off-Chain Integration
Complex transactions:
7. Documentation & Data Anchoring
On-chain tokens are shadows of off-chain assets:
8. Additional Deep Checks for Specific Protocols
Tailored checks for:
A. ERC-1400 / ERC-3643 securities
B. ERC-6065 / ERC-1155 real estate
C. ERC-4519 IoT/physical assets
D. ERC-6960 layered/structured assets
E. ERC-7943 universal compliance interface (uRWA)
II. Comprehensive Audit Checklist Table
The SlowMist security team employs automated scans, AI-assisted audits, and manual reviews across these dimensions.
III. Additional Disclosures for Smart Contracts
To meet regulatory requirements, the team has prepared supplementary disclosure forms based on prior STO audits and regulatory standards.
Conclusion: Building a Secure Bridge Between Code and Reality
In practice, auditors must not only verify code compliance with standards like EIP but also assume attackers trying to bypass KYC, manipulate oracles, or exploit admin privileges. Only through deep business logic modeling and full lifecycle risk analysis can hidden traps be uncovered.
To enhance security depth and efficiency, the SlowMist team recommends a comprehensive defense system combining human and AI:
RWA fundamentally relies on trust digitization. Through rigorous checklists, cutting-edge AI tools, and ongoing intelligence, we can establish a solid security foundation for the on-chain realization of real-world assets.