11

Which pallet would be good to manage native tokens? Is it Asset Pallet or Balance Pallet?

We can transfer funds against any token using Asset Pallet. But would it make sense to use Asset Pallet for transferring funds against native tokens? Is there any example?

2 Answers 2

11

For a native token on a Substrate chain you should use the Balances Pallet, not the Assets Pallet.

The balances pallet is specially optimized to minimize its computational and storage footprint. This means that when using the balances pallet, users will be paying the lowest possible fees and your chain will be using the least amount of weight per transaction.

Additionally, the Balances Pallet implements a number of core traits needed for a native token like ReservableCurrency, LockableCurrency, and supports things like vesting via the Vesting Pallet.

2

The Balance pallet is designed to handle a native token of a chain and would count towards existential deposit (if you choose to have that concept in your chain).

The asset pallet is designed to handle a multitude of tokens (these may be configured to not be sufficient and thus not count towards existential deposits).

(It is pretty common to use both in the same runtime. I'm not sure I have seen a chain that uses the asset pallet without also including the balance pallet.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.