paint-brush
The Ultimate Guide To Understanding EOS Accountsby@Yannick
1,654 reads
1,654 reads

The Ultimate Guide To Understanding EOS Accounts

by Yannick SlenterAugust 1st, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Every user has one or more accounts on the EOS blockchain. EOS accounts are human-readable identifiers that are stored on the blockchain. Each EOS account has 3 resources: CPU, network and RAM, which all allow users to do different things. Permissions can be seen as requirements which need to be fulfilled in order for a transaction to go through. The Ultimate Guide To Understanding EOS Accounts is published by EOS Asia. It is available in the U.S. version of this article.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - The Ultimate Guide To Understanding EOS Accounts
Yannick Slenter HackerNoon profile picture

Default EOS accounts

EOS uses a different account structure than most cryptocurrencies you know. While it might seem complex at first, it is not that difficult once you understand the basics, all of which will be covered in this article. So, how do EOS accounts work?

Account structure

Every user has one or more accounts on the EOS blockchain. EOS accounts are human-readable identifiers that are stored on the blockchain and they are required to push or transfer any (valid) transaction to the EOS blockchain. These accounts can also be owned by multiple people depending on the permissions configuration.

EOS accounts are 12 characters long and can contain the letters a-z and the digits 1–5. These account names replace the long and clumsy wallet addresses that are used in most cryptocurrencies.

Furthermore, every EOS account has permissions. Permissions can be seen as requirements which need to be fulfilled in order for a transaction to go through. An EOS account has 2 native permissions by default:

  • Owner: shows ownership of the account and is needed to make any changes to the ownership the account. This key(s) for this permission is/are best kept (safely) offline, as they are not needed to do most things on the EOS network.
  • Active: used for transferring funds, voting for producers and making other high-level account changes.

Besides these 2 native permissions you can create new, custom, permissions that fit your needs.

Each permission has one or multiple keys and/or account name(s) associated with it. Each key or account name associated with a permission has a certain weight, and each permission has a certain weight threshold which needs to be met before a transaction requiring that permission is accepted.

Visualization of a default permissions structure. (Source: EOSIO Developer Portal)

To help you understand all of this information we have included the above image, which visualizes the permissions structure of a default EOS account. As you can see, the owner permission has a default threshold of 1, and 1 key with a weight of 1 associated with it. The same goes for the active permission which has a default threshold of 1, and 1 key with a weight of 1 associated with it. 

This means that only the (private) key associated with the owner or active permission is required to perform any transaction requiring the owner or active permission.

Account resources

Now you are familiar with the structure of an EOS account, it’s time to learn about account resources. Each EOS account has 3 resources:  CPUnetwork and RAM, which all allow users to do different things. We will explain each resource individually below using a metaphor by EOS Asia.

How resources in an EOS account (can) look

If the EOS blockchain was a train, CPU, network and RAM could be explained in the following way:

Network would be the available seats in each train leaving and entering the blockchain. Your chair will always be reserved, and if u need it, it will be yours. BUT, if no one is on the train, you could lay across a bunch of chairs because they are free! So network is a way to make sure you have somewhere to sit when the train leaves.

CPU is how often you can ride the train, and works much like network as far as allocation goes. You may have a train ticket, but of course the ticket is only usable on certain days and times.

Now the EOS train is pretty laid back, so any unused space is free to use re: CPU and network, are free to use the people that paid for the space need to use the space.

CPU and network are joint resources that together are called BANDWITH.

RAM is your storage space on the train. If you need to bring a ton of luggage, you need to pay per bag to check your bags onto the train. If you do not need to bring a lot of luggage, you can sell your storage space to others that are riding on the train.

CPU and network can be obtained by staking EOS, which is essentially locking your tokens for a certain time. When the user wants to move their EOS they can unstake their tokens, essentially making transactions free. RAM can not be obtained through staking but can instead be bought and sold and is used to hold other tokens for example.

Putting it all together

You now understand both the structure and the resources of EOS accounts, so it’s time to put all of this together in order to fully understand EOS accounts.

EOS accounts and permissions visualized. (Source: Blockgenic)

In the above image you can see how the account structure is related to the account resources. The light blue lines indicate CPU & NET are needed to perform any action requiring that permission. The red line indicates RAM is needed to hold other tokens. This should give you a solid understanding of how an EOS account operates.

Multisignature accounts

Using the permissions structure within EOS you can do many interesting things. One of those things is creating a multisignature account, which is relatively easy on the EOS network. In general, a multisignature account (more commonly known on other blockchains as a multisignature wallet) is an account that requires more than 1 signature in order to perform a transaction.

EOS accounts are more complicated, as they have multiple permissions with multiple actions associated with that permission, instead of a single possible action which is the case on most current blockchains. As a result of this more complicated account system it is possible to change the earlier described threshold of a permission that needs to be met before any transaction requiring that permission can be executed. It is also possible to then add multiple keys with different weights to the permission.

Using these principles you can then require multiple keys to sign a transaction before it (and the action that the transaction performs) executes, essentially making your permission a multisignature permission!

About us

Founding block producer for the EOS mainnet. Block producer for the BOS mainnet. WAX Guild candidate. Partner in the Europechain sister chain. Investor in blockchain projects. Governance, intercultural cooperation and security specialist. You can find us here:
EOS Block Producer name: eosamsterdam
BOS Block Producer name: amsterdambos
WAX Guild name: amsterdamwax
Website
Twitter
Youtube
Telegram
Wechat