Appearance
RWA Tokenization Engine
Background
IOST-RWA is a built-in RWA protocol on IOST Layer2, enabling users and institutions to flexibly build highly stable and liquid RWA asset pools. Both professional investment institutions and individual DeFi users can achieve better returns through the RWA protocol.
Core Features
- Multi-asset Support: Supports tokenization of various asset types including principal-protected interest-bearing (coupon bond), open-ended MMF, non-principal-protected assets (mining/GPU clusters), fixed interest-bearing (property rental rights), and fixed non-interest-bearing (artworks) assets.
- Asset Templates and Dynamic Parameters: Provides flexible asset template design, allowing issuers to define basic asset properties (principal, interest rates, depreciation mechanisms, principal and interest payment structures, etc.).
- Principal-Interest Separation Mechanism: Supports principal-interest splitting of issued assets, using smart contracts to automatically split principal and interest flows into different tokens, facilitating secondary market trading and yield management.
- Market Price Oracle: RWA prices are often directly affected by macroeconomic factors, market supply and demand, and interest rate fluctuations. Therefore, we need a reliable market price oracle to provide real-time, accurate data support. The data includes:
- Central Bank Base Rates (e.g., Fed FFR, ECB Deposit Rate)
- Treasury Yields of Different Maturities (e.g., 1M, 3M, 1Y, 10Y, 30Y Treasury Yields)
- Benchmark Rates like SOFR (for pricing derivatives or floating-rate instruments)
- Inflation Data (CPI) (affecting real rates and long-term asset valuation)
System Design
Asset Management
To meet different users' risk and return expectations for RWA, the protocol supports flexible tokenization of various real-world assets. In addition to supporting principal-protected interest-bearing assets like coupon bonds, it also supports higher-yield non-principal-protected interest-bearing assets such as mining/GPU clusters. According to asset cycles, it supports short-term, medium-term, long-term, and customized periodic assets, making it convenient to tokenize various real-world investment-worthy assets.
RWA Configuration
Subscription Configuration
Supports project teams to freely set subscription-supported assets, and through extended functionality supports setting subscription upper limits, lower limits, and subscription start and end times. Through built-in risk control models, it can support whitelist or blacklist functions, ensuring RWA asset security and reliability. Supported subscription methods include:
- Any subscription amount during open period, calculating subscription quota after time ends, with proportional refund of excess
- First-come-first-served, ending subscription when quota is filled or target time is reached
Interest Distribution
Distribution Schedule
- Fixed interval distributions
- Complete cycle distributions
- Custom cycle distributions
Distribution Assets
- Principal tokens
- Yield tokens
- USDT/USDC stablecoins
Principal-Interest Separation
By introducing the principal-interest separation concept, bringing the traditional financial market's "principal-interest separation" concept into the DeFi space, dividing yield-generating tokens into principal tokens and yield tokens, providing users with more diverse financial operation options, allowing them to formulate different investment strategies based on their market yield expectations, such as selling yield tokens to realize income early when expecting annual yield to decrease, or buying yield tokens when expecting increases. Through principal-interest separation innovative trading market construction, creating a "maturity yield" trading market for "yield-generating tokens", users can trade principal tokens and yield tokens in this market, achieving discounted asset purchases, long/short yield positions, and low-risk fixed income operations, enriching DeFi trading types and profit models. Users can maximize asset utilization through principal-interest separation, such as splitting held yield-generating tokens and obtaining multiple returns by trading principal tokens and yield tokens under different market expectations. This splitting method provides relatively low-risk fixed income options while also allowing users to pursue higher returns through yield trading, meeting the needs of users with different risk preferences. Users can choose to hold principal tokens for stable principal recovery and certain returns, or trade yield tokens for higher but relatively riskier returns, based on their risk tolerance and market judgment.
Security
- Supports compliant freezing/unfreezing of users, frozen users cannot receive interest and are prohibited from redeeming principal
- Contract internally implements multi-signature asset management module, ensuring project fund security
Use Cases
User Side
- Users subscribe with USDC/USDT to receive RWA Token
- Users trade or split certificate tokens
- Users claim interest
- Users withdraw principal and interest
Project Side
- RWA contract configuration
- Start subscription
- End subscription
- Write interest data
- Withdraw
- Deposit principal and interest
Flow
Contract design
solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract RWA is ERC20, Ownable {
uint256 totalUSDC;
uint256 totalInterest;
address _trustedWallet;
struct UserAssetsInfo {
uint256 tokenAmount;
uint256 interest;
uint256 principal;
}
constructor(address walletAddress) ERC20("RWA", "XXX") {
trustMultisigWallet = walletAddress;
}
function _setTrustedWallet(address _walletAddress) external onlyOwner {
_trustedWallet = _walletAddress;
}
function isTrustedForwarder(address msgSender) public view virtual override returns (bool) {
return msgSender == _trustedWallet;
}
function getAssetsInfo(address userAddress) public view returns(UserAssetsInfo) {
//todo
}
function mint(uint256 amount) external {
//todo
}
function claim() external {
//todo
}
function openMint() external onlyOwner {
//todo
}
function closeMint() external onlyOwner {
//todo
}
function devidend(uint256 usdcAmount) external onlyOwner {
//todo
}
function withdraw(address toAddress, uint256 usdcAmount) external onlyTrustedWallet {
//todo
}
function despoist(uint256 usdcAmount) external onlyOwner {
//todo
}
function openClaim() external onlyOwner {
//todo
}
function onlyTrustWalelt() internal returns (bool) {
return _trustedWallet == msg.sender
}
modifier onlyTrustedWallet() {
require(msg.sender == _trustedWallet, "NO ACCESS: only trustedWallet");
_;
}
}