Skip to content

Commit

Permalink
Merge pull request #196 from urko94/feature/asset-hub
Browse files Browse the repository at this point in the history
Feature/asset hub
  • Loading branch information
dimitrov-d authored Nov 7, 2024
2 parents 721c135 + 696af90 commit 2b05a4f
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions web3-services/11-asset-hub.md
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit 2b05a4f

Please sign in to comment.