file icon

What are Smart Accounts?

Smart Accounts are where users of Radix hold their assets on the Radix Public Network. Like an account on most cryptocurrency or DeFi networks, it has an address that others can use to send you tokens and your Radix Wallet can keep track of multiple accounts. However, Smart Accounts provide much more functionality than the typical crypto account.

On other networks, a crypto account is essentially just the address because these networks do not natively understand the concept of assets. This means that “holding tokens in an account” really means that there is an entry for the address in the internal balance sheets of all of the separate smart contracts that define your various tokens.

A Smart Account, however, is a real entity on the Radix network. It is a component – similar to a smart contract – which means that it can actually contain “vaults” that hold native assets based on “resources”. Looking up the balances held in a Smart Account is done by directly reading the contents of its vaults, not looking up balances in many token smart contracts.

Because Smart Accounts are components, it also means that they can include built-in logic. One key feature built-in to Smart Accounts is the ability to allow multi-factor control, and multi-factor recovery of control (if one or more factors are lost by the user). A factor is simply a source of a private key – whether a key held in the Radix Wallet on a user’s phone, a seed phrase, a Ledger hardware wallet device, a Yubikey, or more. By combining multiple factors, we can build robust security patterns without requiring the user to protect (and not lose) a single all-or-nothing seed phrase.

Multi-factor control and recovery is made possible because Smart Accounts may be controlled by a resource that is used for authorization, called a badge rather than only with a single private key (or seed phrase). That controlling badge may then be given to another component called an Access Controller that provides for highly flexible definition of the factors that must be provided for that badge to be produced to control the Smart Account. For example, a key held on a user’s mobile phone might be given permission to be the “primary” that can withdraw tokens from a Smart Account, while a combination of other factors might be required to change the “primary” to a different one, if that phone is lost.

The Radix Wallet makes it easy for users to configure the multi-factor rules for the Smart Accounts (via Access Controllers) with a simple UI similar to familiar multi-factor setup used on websites. But in the end, enforcement of these rules is done on the Radix network itself, and does not rely on the wallet or any external centralized system.

Smart Accounts can also have preferences for desired behavior. For example, they can be configured to either accept deposits of unknown tokens (if the user prefers, for example, to accept random airdrops) or to reject them (if the user prefers to only receive tokens in response to transactions they have approved).

Because Smart Accounts are components, one might wonder if a transaction is required to create (“instantiate”) one, like a typical Radix component would. The answer is no. To avoid user friction, Smart Account components are special in that they may be created “virtually”. This means that a user’s wallet can generate a cryptographic key pair that automatically corresponds to, and controls, a Smart Account address – without talking to the Radix network. This address can immediately receive tokens from anyone. This is similar to generating an account on other networks, but on Radix, these addresses are still real components that can be immediately configured from their default state in the ways described above.

Further reading: