Logo
RPC Assistant

What Is Asset Hub and How Do You Connect to It?

Summary

Asset Hub is a system parachain on Polkadot and Kusama that hosts fungible tokens, NFTs, and other digital assets. It provides a dedicated environment for creating, managing, and transferring assets with low fees and high throughput. This article explains what Asset Hub is, how to connect your dApp to it, and how to choose the right RPC endpoint for your use case.

Asset Hub is a system parachain on the Polkadot and Kusama networks that specializes in the creation, management, and transfer of digital assets. It hosts both fungible tokens and non-fungible tokens (NFTs), and it serves as the primary reserve location for DOT in cross-chain operations. For developers, Asset Hub provides a low-fee, high-throughput environment for asset-related use cases, such as token issuance, NFT marketplaces, and asset transfers.

If you're building an application that needs to interact with assets on Polkadot or Kusama, you'll likely need to connect to Asset Hub's RPC endpoints. This article explains what Asset Hub is, how to connect to it, and how to choose the right RPC provider for your project.

Quick Recommendation: Which Asset Hub Endpoint Should You Use?

Before diving into the details, here's a quick guide to help you decide which Asset Hub endpoint to use:

  • For production dApps: Use a managed RPC provider like OnFinality to ensure high availability and scalability. Public endpoints are fine for testing but may have rate limits and can be unreliable under load.
  • For development and testing: Use a public endpoint or a local node. Public endpoints are convenient for quick tests, but you should avoid them for production traffic.
  • For high-throughput or archival needs: Consider a dedicated node or a provider that offers archive data. Asset Hub's history can be important for applications that need to query past states.
  • For WebSocket subscriptions: Ensure your provider supports WebSocket connections if you need real-time updates, such as tracking token transfers or NFT mints.

If you're unsure which option fits your workload, start with a managed RPC provider and monitor your usage. You can always scale up to a dedicated node if needed.

What Is Asset Hub?

Asset Hub is a system parachain that runs on both Polkadot and Kusama. It is designed to be a "home base" for assets in the network, providing a trusted and efficient environment for asset operations. Unlike general-purpose parachains, Asset Hub is optimized for asset management, offering:

  • Fungible assets: Tokens that can be created, transferred, and destroyed. These can represent anything from stablecoins to in-game currencies.
  • Non-fungible assets: Unique tokens (NFTs) that can represent digital art, collectibles, or other one-of-a-kind items.
  • Asset conversion: A built-in mechanism for swapping assets, similar to a decentralized exchange (DEX) but focused on asset pairs.
  • Cross-chain accounting: Asset Hub integrates with the relay chain's messaging system, allowing assets to be transferred between parachains.

Asset Hub uses the relay chain's native token (DOT or KSM) for transaction fees. It has no inflation or era-based rewards for collators, but collators receive a portion of transaction fees.

Why Asset Hub Matters for Developers

Asset Hub is important because it provides a dedicated, efficient environment for asset-related operations. Instead of building your own asset logic on a general-purpose chain, you can leverage Asset Hub's built-in functionality. This can save development time and reduce complexity.

For example, if you're building an NFT marketplace, you can use Asset Hub to mint, transfer, and manage NFTs without having to write custom smart contracts. Similarly, if you're issuing a token, you can create it on Asset Hub and take advantage of its low fees and high throughput.

Asset Hub also plays a key role in the Polkadot ecosystem's migration from the relay chain. As the network evolves, more asset-related functionality is being moved to Asset Hub, making it an increasingly important part of the infrastructure.

Asset Hub vs. Other Chains: What's Different?

Asset Hub is not a smart contract platform like Ethereum or a general-purpose parachain like Moonbeam. Instead, it focuses specifically on assets. Here's a comparison:

FeatureAsset HubGeneral-Purpose ParachainSmart Contract Platform
Primary use caseAsset creation and managementCustom logic and dAppsSmart contracts and dApps
Token standardsNative asset palletsCustom palletsERC-20, ERC-721, etc.
FeesLow, paid in DOT/KSMVaries by parachainGas fees in native token
Smart contract supportLimited (via pallets)YesYes
Cross-chain compatibilityNative via XCMNative via XCMBridges and XCM

This table shows that Asset Hub is best suited for asset-focused applications. If you need complex smart contract logic, you might want to use a different parachain or a smart contract platform.

How to Connect to Asset Hub RPC Endpoints

To interact with Asset Hub, you need an RPC endpoint. Here are the common ways to connect:

Public Endpoints

Public endpoints are provided by the Polkadot and Kusama networks for testing and development. They are free but may have rate limits and can be unreliable under heavy load. You can find them in the Polkadot Wiki or by using a service like OnFinality's public RPC endpoints.

Managed RPC Providers

Managed RPC providers like OnFinality offer reliable, scalable endpoints for production use. They handle infrastructure maintenance, load balancing, and failover, so you can focus on building your application. OnFinality supports Asset Hub on both Polkadot and Kusama, and you can find the endpoints on the supported networks page.

Running Your Own Node

Running your own Asset Hub node gives you full control over the infrastructure, but it requires significant time and resources. You need to maintain the node, keep it synchronized, and ensure it's always available. This is a good option for teams with dedicated DevOps resources, but for most projects, a managed provider is more practical.

Chain Settings for Asset Hub

When connecting to Asset Hub, you'll need the correct chain settings. Here's a quick reference for both Polkadot and Kusama Asset Hub:

NetworkChain IDTokenExplorer
Polkadot Asset Hub1000DOTPolkadot.js
Kusama Asset Hub1000KSMPolkadot.js

Note: The chain ID is 1000 for both, but the network is different. Make sure you're using the correct endpoint for your target network.

Example: Connecting to Asset Hub with ethers.js

If you're using a JavaScript library like ethers.js, you can connect to Asset Hub's RPC endpoint like this:

const { ethers } = require("ethers");

// Replace with your RPC endpoint
const rpcUrl = "https://asset-hub-polkadot-rpc.publicnode.com";
const provider = new ethers.providers.JsonRpcProvider(rpcUrl);

async function getBlockNumber() {
  const blockNumber = await provider.getBlockNumber();
  console.log("Current block number:", blockNumber);
}

getBlockNumber();

This example uses a public endpoint. For production, you should use a managed provider like OnFinality to ensure reliability.

Common RPC Methods for Asset Hub

Asset Hub supports standard Substrate RPC methods, as well as some asset-specific ones. Here are a few commonly used methods:

  • chain_getBlock: Get a block by hash or number.
  • state_getStorage: Get a storage value.
  • assets_getAsset: Get details of a specific asset.
  • nft_getNft: Get details of a specific NFT.

You can use these methods to query asset information, check balances, and more. For a full list, refer to the Substrate RPC documentation.

Troubleshooting Common Connection Issues

If you're having trouble connecting to Asset Hub, here are some common issues and solutions:

  • Connection timeout: If your requests are timing out, the endpoint may be overloaded or your network may be blocking the connection. Try a different endpoint or use a managed provider.
  • Rate limiting: Public endpoints often have rate limits. If you're hitting them, consider upgrading to a paid plan or using a dedicated node.
  • Wrong network: Make sure you're using the correct endpoint for Polkadot or Kusama. Using the wrong one will result in errors.
  • WebSocket issues: If you're using WebSocket, ensure your client supports it and that the endpoint supports WebSocket connections.

If you continue to experience issues, check the OnFinality status page for any ongoing incidents.

Key Takeaways

  • Asset Hub is a system parachain on Polkadot and Kusama for asset creation, management, and transfer.
  • It supports fungible tokens, NFTs, and asset conversion, making it ideal for asset-focused applications.
  • To connect, you can use public endpoints, managed RPC providers, or your own node.
  • For production, use a managed provider like OnFinality to ensure reliability and scalability.
  • Always verify your chain settings and use the correct endpoint for your target network.

Frequently Asked Questions

What is Asset Hub used for?

Asset Hub is used for creating, managing, and transferring digital assets on Polkadot and Kusama. It supports both fungible tokens and NFTs, and it provides a low-fee, high-throughput environment for asset operations.

How do I get an Asset Hub RPC endpoint?

You can use public endpoints, which are free but may have rate limits, or you can use a managed RPC provider like OnFinality, which offers reliable, scalable endpoints for production use. You can find supported endpoints on the OnFinality networks page.

Can I run my own Asset Hub node?

Yes, you can run your own Asset Hub node. This gives you full control over the infrastructure but requires significant time and resources. For most projects, a managed provider is more practical.

What is the difference between Asset Hub and a smart contract platform?

Asset Hub is specialized for assets and does not support general-purpose smart contracts. Smart contract platforms like Ethereum allow you to write arbitrary logic, but they may have higher fees and lower throughput. Asset Hub is optimized for asset operations, making it more efficient for those use cases.

How do I choose the right RPC provider for Asset Hub?

Consider factors like reliability, scalability, WebSocket support, archive data, and pricing. For production, choose a provider that offers high availability and can handle your traffic. OnFinality offers RPC pricing that scales with your needs.

Is Asset Hub available on both Polkadot and Kusama?

Yes, Asset Hub runs on both Polkadot and Kusama. The chain ID is 1000 for both, but the endpoints and tokens differ. Make sure you use the correct endpoint for your target network.

What are the fees on Asset Hub?

Fees are paid in the relay chain's native token (DOT or KSM). They are generally low, making Asset Hub suitable for high-frequency asset operations.

Can I use Asset Hub for NFTs?

Yes, Asset Hub supports NFTs. You can mint, transfer, and manage NFTs using its built-in pallets, making it a good choice for NFT marketplaces and collectibles.

How do I monitor my Asset Hub RPC usage?

If you're using a managed provider like OnFinality, you can monitor your usage through the dashboard. For your own node, you can use monitoring tools like Prometheus and Grafana.

What should I do if my Asset Hub RPC requests fail?

Check your endpoint, network settings, and rate limits. If the issue persists, try a different provider or contact support. OnFinality provides support for its services.


For more information about RPC providers and how to choose the right one, see our guide on choosing an RPC provider.

If you're ready to get started, explore our RPC pricing and supported networks to find the best option for your project.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started