-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Implement fractional ownership of assets by tokenizing them. This enables multiple holders to own shares of a single asset.
Requirements
tokenize_asset(env, asset_id, symbol, total_supply, decimals, min_voting_threshold, tokenizer, name, description, asset_type)
- Creates a
TokenizedAssetstruct with the full token supply assigned to the tokenizer - Stores token metadata (
TokenMetadata) - Records tokenizer as the sole initial holder
mint_tokens(env, asset_id, amount, minter) — Increases circulating_supply and minter's balance. Minter must be the tokenizer.
burn_tokens(env, asset_id, amount, burner) — Reduces supply and burner's balance.
transfer_tokens(env, asset_id, from, to, amount) — Validates transfer restrictions first. Updates balances of sender and receiver. Adds receiver to holders list if new.
Balance queries: get_token_balance, get_token_holders, get_tokenized_asset, calculate_ownership_percentage (returns basis points)
Valuation: update_valuation(env, asset_id, new_valuation)
Acceptance Criteria
- Total supply correctly tracked
- Holder list maintained (added on first receipt)
-
calculate_ownership_percentagereturns basis points (0–10000)