Docs Técnicas
RWA Product Patterns
These examples show how the Phase 12 stdlib modules compose RWA registration, tokenized ownership, funds, and credit products.
These examples show how the Phase 12 stdlib modules compose RWA registration, tokenized ownership, funds, and credit products.
Simplified FIDC
Use PublishRwaAsset to register each receivable or credit right, then use std.rwa.RwaFund as the pooled vehicle:
import std.rwa.RwaFund
contract SimpleFidc impl RwaFund:
@tx
def subscribe(rwa_id: String, amount: u128, nav_value: u128):
self.deposit(rwa_id, amount, nav_value)deposit updates holdings and investor units, emits a ProductReceipt, and produces accounting posts visible in simulation before deploy.
CRI
Register the CRI metadata with PublishRwaAsset, then expose holders through std.rwa.RwaToken:
import std.rwa.RwaToken
contract CriShare impl RwaToken:
@tx
def issue_share(holder: Address, shares: u128, backing: u128):
self.issue(holder, shares, backing)nav() returns the backing value per share scaled by 1_000_000.
Nota Promissoria
Use std.credit.TermLoan for a fixed maturity note:
import std.credit.TermLoan
contract PromissoryNote impl TermLoan:
@tx
def issue_note(lender: Address, borrower: Address, amount: u128, rate_ppm: u128, term_end: u128):
self.originate(lender, borrower, amount, rate_ppm, term_end)amortize(amount) supports partial repayment and balanceOf(borrower) returns the remaining debtor balance.