This document covers the basics of Allfeat accounts.
An address is the public part of an Allfeat account. The private part is the key used to access this address. The public and private parts together make up an Allfeat account. You can think of the public address of your account like your mailbox or your banking IBAN and the private key like the key to open that mailbox. Anybody can send mail to your mailbox, but only you can access them as only you have access to its key. In the context of Allfeat accounts, anybody can send tokens to your public address, but only you can transact with them using your private key. That is why you should keep your private key secret.
Mnemonic and Address Generation
A valid account requires a private key that can sign on to one of the
supported curves and signature schemes.
Without a private key an account cannot sign anything. In Allfeat there are some exceptions to accounts that do not have private keys (i.e. key-less accounts).
Such accounts are multi-signature accounts and anonymous proxies that are not discussed here and are meant for an advanced audience.
Most wallets generate a mnemonic phrase for users to back up their wallets and generate a private key from the mnemonic. Not all wallets use the same algorithm to convert from mnemonic phrase to private key, which affects the ability to use the same mnemonic phrase in multiple wallets. Wallets that use different measures will arrive at a different set of addresses from the exact mnemonic phrase.
Subkey and Polkadot-JS based wallets use the BIP39 dictionary for mnemonic generation, but use the entropy byte array to generate the private key, while full BIP39 wallets (like Ledger) use 2048 rounds of PBKDF2 on the mnemonic. The same mnemonic may generate different private keys on other wallets due to the various cryptographic algorithms used. See Substrate BIP39 Repo for more information.
A typical mnemonic phrase generated by the Subkey tool is shown below.
'caution juice atom organ advance problem want pledge someone senior holiday very'
Its corresponding private/public keypair is also shown.
Secret seed (Private key): 0x056a6a4e203766ffbea3146967ef25e9daf677b14dc6f6ed8919b1983c9bebbc
Public key (SS58): 5F3sa2TJAWMqDhXG6jhV4N8ko9SxwGy8TpaNS1repo5EYjQX
Allfeat default address format is the
This means that the same mnemonic phrase will generate public keys for different parachains.
Obtaining and Managing an Address
To learn more about generating accounts on Allfeat visit the Account Generation page.
Account Balance Types
In Allfeat there are different types of balance depending on the account activity. Different balance types indicate whether your balance can be used for transfers, to pay fees, or must remain frozen and unused due to an on-chain requirement. Below we give an example of different balance types.
- The total balance indicates the total number of tokens in the account. Note that this number does not necessarily correspond to the tokens you are allowed to transfer. The transferable balance indicates the number of tokens that are free to be transferred. This is calculated by subtracting the number of locked and reserved tokens from the total number of tokens. Locked funds correspond to tokens used in staking, governance, and/or vested transfers (see below). Keep in mind that funds can also be locked from projects if they need it for any reasons.
- The vested balance indicates tokens that were sent to the account and that are released with a specific time schedule. The tokens are owned by the account but are locked and become available for transfer after a specific number of blocks.
- The bonded balance indicates the number of tokens that are locked for on-chain participation to staking.
- The democracy balance indicates the number of tokens that are locked for on-chain participation to democracy (i.e. voting for referenda).
This only apply on Mainnet as Symphonie Testnet doesn't include any democracy system.
- The redeemable balance indicates the number of tokens that are ready to be unlocked to become transferable again. Those tokens already went through the unbonding period.
- The locked balance indicates the number of tokens that are frozen for on-chain participation to staking and democracy, and vested transfers. Locks do not stack, which means that if you have different locks the total locked balance is not the addition of all single locks. Instead, the biggest lock decides the total locked balance.
- The reserved balance indicates the number of tokens that are frozen for on-chain activity other than staking, governance, and vested transfers. Such activity can be setting an identity or a proxy, or a reservation by an application for any reasons. Reserved funds are held due to on-chain requirements and can usually be freed by taking some on-chain action. For example, the "Identity" module reserves funds while an on-chain identity is registered, but by clearing the identity, you can unreserve the funds and make them free again. The idea is that those actions require some network memory usage that is not given for free.
Existential Deposit and Reaping
When you generate an account (address), you only generate a key that lets you access it. The account does not exist yet on-chain. For that, it needs the existential deposit of 0.001 AFT (1 mAFT).
Having an account go below the existential deposit causes that account to be reaped. The account will be wiped from the blockchain's state to conserve space and ressources, along with any funds in that address. You do not lose access to the reaped address - as long as you have your private key or recovery phrase, you can still use the address - but it needs a top-up of another existential deposit to be able to interact with the chain.
Transaction fees cannot cause an account to be reaped. Since fees are deducted from the account before any other transaction logic, accounts with balances equal to the existential deposit cannot construct a valid transaction. Additional funds will need to be added to cover the transaction fees.
Here's another way to think about existential deposits.
Ever notice those
Thumbs.db files on Windows or
.DS_Store files on Mac? Those are junk; they serve no specific purpose other than making previews a bit faster.
If a folder is empty saved for such a file, you can remove the folder to clear the junk off your hard drive. That does not mean you lose access to this folder forever - you can always recreate it.
You have the key, after all - you're the computer's owner. It just means you want to keep your computer clean until you maybe end up needing this folder again and then recreate it. Your address is like this folder - it gets removed from the chain when nothing is in it but gets put back when it has the existential deposit.
The Identities pallet built into Allfeat allows users to attach on-chain metadata to their accounts. Independent registrars can verify this metadata to provide trustworthiness.
Allfeat comes with a generalized proxy account system that allows users to keep keys in cold storage while proxies act on their behalf with restricted (or unrestricted) functionality.
See the proxies page for more information about proxies.
Multi-signature accounts are accounts created from several standard accounts, pure proxies, and even other multi-sig accounts.
See the Multi-signature accounts page for a full explanation about multi-signature accounts, including their use-cases.
- Understanding Accounts and Keys in Polkadot - An explanation of what the different kinds of accounts and keys are used for in Polkadot, with Bill Laboon and Chinmay Patel of BlockX Labs.