From 696af90702a4dba48f1448cc92f7ac4310d12b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Urban=20Kova=C4=8D?= Date: Thu, 7 Nov 2024 13:48:46 +0100 Subject: [PATCH] Asset Hub --- web3-services/11-asset-hub.md | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 web3-services/11-asset-hub.md diff --git a/web3-services/11-asset-hub.md b/web3-services/11-asset-hub.md new file mode 100644 index 00000000..0fc50523 --- /dev/null +++ b/web3-services/11-asset-hub.md @@ -0,0 +1,59 @@ +# Asset Hub + +The **Asset Hub** is a dedicated parachain within the **Polkadot ecosystem** specializing in creating, managing, and tracking assets. These assets can represent various types, from a parachain’s native tokens to NFTs or on-chain representations of off-chain reserves. The Asset Hub acts as a central "home base" for assets within the network, maintaining a secure and trusted environment. + +--- + +## Key Features + +### Asset Representation +- **Sufficient Assets**: Assets deemed “sufficient” allow an account to exist without holding the native token (e.g., DOT or KSM). +- **Non-Sufficient Assets**: Accounts holding non-sufficient assets require a minimum native token balance to remain on-chain. +- **Asset Conversion**: Enables token conversions through an automated market maker (AMM) for any assets with sufficient liquidity. + +### Asset Creation and Management +Anyone with sufficient funds can create assets on the Asset Hub by reserving a deposit. When creating an asset: +- **Unique Asset ID**: A unique `AssetId` (u32 integer) is assigned, serving as a canonical identifier. +- **Metadata**: Each asset can have associated metadata, like links to off-chain resources (e.g., IPFS). +- **Privileged Roles**: The asset creator can assign roles, such as owner, issuer, admin, and freezer, which determine permissions for tasks like minting, burning, and freezing. + +--- + +## Advanced Management and Features + +### Transaction Fees and Payments +- **Sufficient Asset Fees**: Assets deemed sufficient can cover transaction fees without requiring the native token. +- **Polkadot-JS UI**: Users must pay transaction fees in the native token on Polkadot-JS UI, regardless of sufficient asset holdings. + +### Cross-Chain Accounting and Asset Transfer +Asset Hub tracks cross-chain transfers and supports reserve-backed assets across parachains, allowing asset owners to monitor total issuance and manage transfers securely. + +### Application Development Interface +Developers can use `approve_transfer`, `transfer_approved`, and `cancel_approval` functions for user-authorized transfers, enabling controlled asset movements within applications. + +--- + +## Transferring and Destroying Assets + +### Transferring Assets +- **Simple Transfers**: Users can transfer both fungible and non-fungible assets, with additional functions like `transfer_keep_alive` to ensure accounts remain active post-transfer. +- **NFT Transfers**: NFTs can be transferred and approved for third-party transfers by applications. + +### Freezing Assets +Asset creators can freeze assets via specific function (`assets.freezeAsset`). + +--- + +## Application and Advanced Use Cases + +### Multisig and Proxy Accounts +Although the Asset Hub does not support smart contracts, users can leverage Multisig and Proxy accounts to replicate common contract functions such as multi-signature approvals and delegations. + +### Reserve-Backed Transfers +The Asset Hub tracks assets sent across parachains, maintaining accurate reserves and preventing over-issuance by ensuring that cross-chain transactions follow network protocols. + +--- + +### Additional Resources + +For additional technical guidance, video tutorials, and step-by-step instructions on creating, transferring, and managing assets, please refer to the official [Asset Hub documentation](https://wiki.polkadot.network/docs/learn-assets). \ No newline at end of file