NAC_Blockchain/rwa/nac-jurisdiction-rules/KR/protocol_template.charter

70 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// NAC Charter 协议模板 — 韩国辖区(KR)
// 适用于:韩国司法辖区内的RWA资产通证化合约
// CBPP原则:约法即是治法,宪法即是规则,参与即是共识
// 版本:v1.0
contract KRRwaAsset {
// ===== 辖区声明 =====
jurisdiction: KR
inherits_global: true
// ===== 资产状态 =====
state {
asset_id: Hash // 资产唯一标识(SHA3-384,48字节)
asset_type: String // 资产类别(须在KR_RWA_001.permitted_assets中)
asset_name: String // 资产名称
issuer: Address // 发行人地址(32字节NAC地址)
regulatory_approval: Hash // 监管机构批准文件哈希
total_supply: u256 // 总供应量
nav: u256 // 净资产值(以辖区法定货币最小单位计)
kyc_verified: bool // KYC验证状态
aml_cleared: bool // AML清算状态
regulatory_approved: bool // 监管机构批准状态
}
// ===== 发行函数 =====
// CBPP:参与即是共识,CEE自动验证辖区规则,无需手动调用合规检查
function issue(
recipient: Address,
amount: u256,
kyc_proof: Hash,
regulatory_approval: Hash
) -> Result {
// CEE自动执行:KR_VASP_001 + KR_SPECIFIC_001 + KR_RWA_001
// 以下检查是合约层的业务逻辑,宪法层验证由CEE独立完成
require(is_eligible_investor(recipient), "KR_RWA_001: 须为专业投资者")
require(regulatory_approved, "KR_VASP_001: 须FSC注册")
balances[recipient] += amount
emit Transfer(Address::zero(), recipient, amount)
return Ok(())
}
// ===== 转让函数 =====
function transfer(to: Address, amount: u256) -> Result {
// CEE自动验证辖区规则,参与即是共识
require(balances[msg.sender] >= amount, "余额不足")
require(is_eligible_investor(to), "KR_INVESTOR: 接收方不符合合格投资者要求")
balances[msg.sender] -= amount
balances[to] += amount
emit Transfer(msg.sender, to, amount)
return Ok(())
}
// ===== 赎回函数 =====
function redeem(amount: u256) -> Result {
require(balances[msg.sender] >= amount, "余额不足")
require(aml_cleared, "KR_AML_001: AML检查未通过")
balances[msg.sender] -= amount
total_supply -= amount
emit Redeem(msg.sender, amount)
return Ok(())
}
// ===== 辅助函数 =====
function is_eligible_investor(addr: Address) -> bool {
return kyc_registry.is_eligible_kr(addr)
}
}