Skip to content

XSC-0004: Wrapped Token

XSC-0004 is the wrapped-token standard for representing assets from another chain on Xian. It extends the fungible token model with controlled minting and burning so a bridge or custody system can issue Xian-side balances for locked external assets and destroy them when users unwrap.

Required Concepts

  • standard fungible-token transfers, approvals, and balances
  • collection-level token metadata such as name, symbol, logo, website, and operator
  • a minter role that can issue wrapped supply
  • a burn function that destroys caller-owned supply for unwrapping

Core Functions

python
@export
def change_metadata(key: str, value: Any):
    ...

@export
def transfer(amount: float, to: str):
    ...

@export
def approve(amount: float, to: str):
    ...

@export
def transfer_from(amount: float, to: str, main_account: str):
    ...

@export
def balance_of(address: str):
    ...

@export
def change_minter(new_minter: str):
    ...

@export
def mint(amount: float, to: str):
    ...

@export
def burn(amount: float):
    ...

Expected Semantics

  • only the current minter can call mint
  • mint increases both recipient balance and total supply
  • burn reduces caller balance and total supply
  • transfer_from relies on explicit allowances stored separately from balances
  • bridges should treat mint and burn events as the chain-local accounting signals for wrapping and unwrapping

The canonical proposal and reference implementation live in xian-xips/XSC004_wrapped_token.