一句话目标:让现实世界资产(房产 / 债券)在链上“合法存在、可转让、可分红、可监管”
一、为什么 RWA 一定要用 ERC-3643?
如果你用 ERC20 / ERC721 会发生什么?
❌ 不知道谁在买 ❌ 不知道是否合规 ❌ 不能限制司法辖区 ❌ 不能冻结 / 回收 ❌ 法律上“不可执行”
ERC-3643 天生适合 RWA 的原因
👉 RWA ≠ DeFi 👉 RWA = 合规第一
二、RWA 标准发行架构(真实项目)
┌────────────────────────┐│ SPV / Issuer Company │ ← 法律主体└──────────┬─────────────┘ │ ▼┌────────────────────────┐│ Asset Contract │ ← 房产 / 债券映射└──────────┬─────────────┘ │ ▼┌────────────────────────┐│ ERC-3643 Token (Proxy)│ ← 证券 Token└──────────┬─────────────┘ │ ▼┌────────────────────────┐│ Compliance Manager ││ - KYC Module ││ - Jurisdiction ││ - Accredited ││ - Lockup │└────────────────────────┘
三、房产 RWA 实战(Real Estate)
1️⃣ 现实世界法律结构(必须)
链上 ≠ 直接拥有房产
真实结构是:
房产 → SPV 公司 → Token
Token = SPV 的经济权益(股权 / 收益权)
四、房产 Asset 合约(链上资产锚定)
pragma solidity ^0.8.20;contract RealEstateAsset { string public propertyId; string public location; uint256 public valuation; // USD * 1e6 address public issuer; constructor( string memory _id, string memory _location, uint256 _valuation ) { propertyId = _id; location = _location; valuation = _valuation; issuer = msg.sender; }function updateValuation(uint256 newValuation) external { require(msg.sender == issuer, "Only issuer"); valuation = newValuation; }}
📌 注意:这个合约不处理 Token,只负责链上“法律锚点”
五、房产 Token 设计(ERC-3643)
Token 代表什么?
举例:
Mint 逻辑(仅 Issuer)
function mint(address to, uint256 amount) external onlyOwner { balanceOf[to] += amount;}
📌 Issuer = SPV / Trustee
六、房产合规规则(关键)
必须的 Compliance Module
| 模块 | 作用 || ------------ | ----- || KYC | 防洗钱 || Jurisdiction | 禁售国家 || Accredited | 合格投资人 || Lockup | 防短期倒卖 || Max Holding | 防控股 |
房产 Lockup 示例
contract RealEstateLockup is IComplianceModule { mapping(address => uint256) public unlockTime;function setLockup(address user, uint256 time) external { unlockTime[user] = time; }function canTransfer( address from, address, uint256 ) external view returns (bool) {return block.timestamp >= unlockTime[from]; }function name() external pure returns (string memory) {return"Real Estate Lockup"; }}
七、房产收益分配(租金 / 升值)
方式一(最常用):链下结算 + 链上记录
方式二:链上分红(进阶)
function distribute(uint256 totalAmount) external onlyOwner {for (...) { uint256 share = balanceOf[investor] * totalAmount / totalSupply; payable(investor).transfer(share); }}
📌 真实项目多用方式一(合规)
八、债券 RWA 实战(Bond)
1️⃣ 债券 Token 的核心特征
九、债券 Asset 合约
contract BondAsset { uint256 public faceValue; uint256 public interestRate; // bps uint256 public maturity; address public issuer; constructor( uint256 _faceValue, uint256 _rate, uint256 _maturity ) { issuer = msg.sender; faceValue = _faceValue; interestRate = _rate; maturity = _maturity; }function isMatured() public view returns (bool) {return block.timestamp >= maturity; }}
十、债券 Compliance 特殊规则
① 到期前禁止回售
contract BondLockModule is IComplianceModule { BondAsset public bond; constructor(address _bond) { bond = BondAsset(_bond); }function canTransfer( address, address, uint256 ) external view returns (bool) {return !bond.isMatured(); }function name() external pure returns (string memory) {return"Bond Lock Module"; }}
② 到期后强制赎回(ERC-3643 独有优势)
function redeem(address holder) external onlyOwner { require(bond.isMatured(), "Not matured"); uint256 amount = balanceOf[holder]; balanceOf[holder] = 0; payable(holder).transfer(amount);}
📌 ERC20 无法合法做这件事
十一、RWA 项目完整生命周期(真实)
十二、合规 & 监管视角(非常重要)
监管最关心的不是代码,而是:
✔ 谁发行
✔ 谁可以买
✔ 谁不能买
✔ 出问题能否冻结
✔ 能否回收
✔ 能否升级
👉 ERC-3643 全部满足
十三、真实 RWA 项目中的“隐藏细节”
🔥 很多人忽略,但审计 & 律师一定会问:
Jurisdiction 更新是否有 Timelock