Account

There are two types of accounts in Tezos: implicit and originated accounts. An implicit account is another name for a regular account, as we encounter them so frequently in blockchain. On the other hand, originated accounts are basically smart contracts.

Both accounts share most of the same functionalities. They have account balances indicating how many ꜩ (tezzies) they hold, they can send and receive transactions and call (invoke) smart contracts. The major difference is that originated accounts have a program code attached to it, written in Michelson language. That code is executed, whenever the originated account receives a transaction. That makes originated accounts customizable.

graph LR secret-->|controls|implicit["(Implicit) Account <br/> tz1...<br/>tz2...<br/>tz3..."] implicit-->|owns|XTZ["ꜩ"] transaction-->|sends|XTZ origination-->|creates|originated operation["Operation"]-->transaction operation-->origination operation-->more["..."] implicit-.->|manages|originated["(Originated) Account <br/> = Smart Contract <br/> KT1..."] implicit-->|sends|operation implicit-->|has one|addr implicit-->|has one|public secret["Secret key"]-->|has one|public["Public key"]-->|has one|addr["Address"] class implicit,originated nodeWarning class secret nodeDanger class XTZ nodeTezos click operation,transaction,origination,more "/docs/knowledge/tezos_protocol/operations/operations" click secret,addr,public "/docs/knowledge/tezos_protocol/cryptography/key-pair" click originated "/docs/knowledge/tezos_protocol/smart_contract/smart-contract"
Chef's tip 👨‍🍳

You can interact with the diagram by clicking on the node. It will take you to the relevant article.

Address

An address makes an account identifiable in the network. Just using the address, you can look up the balance of the account and its whole history of operations, conveniently using a blockchain explorer.

For both account types the address looks slightly different. Implicit accounts always start with small letters tz and originated ones with capital letters KT. For example, tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb and KT1VGRedoH7Y5VUhesSTJFK3gnXsfZpXcngf are valid examples.

The shape of the address is defined by a simple formula. It starts with tz or KT and is followed by the signature scheme 1, 2 or 3 and the hash of the public key. As Tezos' development progressed, updates to the codebase added new cryptograhpic algorithms, hence the various signature schemes.1 The hashing function applied to the public key is Blake2b. We have a separate section devoted to cryptography that explains all the steps necessary to get from a secret key to the address.

note

Implicit accounts are all backwards compatible. They can send each other ꜩ (tezzies) without any problems.

Authentication

Now the question arises - who controls the account? The concept of the secret key that forms a key-pair with the public key is very important in the blockchain space. Generally speaking, signatures are used to authenticate and authorize between the client (the user) and the server (the blockchain node), whenever a new operation is announced. Whoever is in possession of the secret key, gains access to the account. This is the reason why the secret-key needs to be protected.

This general explanation only applies to implicit accounts. For originated accounts it works differently with almost endless possibilities, because the behaviour can be programed in its smart contract code. For example, the code could perform access control. It checks whether the sender of the instruction belongs to a whitelist of addresses. This can be extended by complex business logic that can govern how value is distributed among many actors. There are interesting projects attempting to build so called decentralized autonomous organizations (DAOs). Please feel free to read up on this interesting application for smart contracts, unfortunately it goes beyond the scope of this article to explain it.


  1. The signature schemes for implicit accounts are: tz1 for Ed25519, tz2 for Secp256k1 (ECDSA), tz3 for NIST P256 (ECDSA)