Connect with us


Overview of the GRAM cryptocurrency on the Telegram Open Network blockchain from Pavel Durov



Sergey Prilutsky, a well-known blockchain expert, head of the research department at MixBytes and the SmartZ project during the Telegram Eventing shared detailed information about the TON project of Pavel Durov.

The data was obtained after studying classified information about the current state of TON development and will be interesting not only to specialists, but also to a wide range of potential investors.

Public Information

Funding for the development of the TON project was collected during two rounds of closed ICOs. Thanks to this, it was possible to raise $ 1.7 billion of investments, the minimum size of the stake was $ 20 million, about 100 investors took part in the ICO, among whom was Roman Abramovich.

The entire volume of the internal cryptocurrency of the project will be released immediately and will amount to 5 billion GRAM coins. After the launch of the project, ICO tokens from investors will be exchanged for coins in a ratio of 1 to 1.

Technical features of the TON blockchain

In the TON network, consensus is ensured by special validator nodes that receive a commission for their services. Something similar is implemented in the Ripple protocol. The reliability of the transaction is confirmed by the BFT-algorithm (the task of the Byzantine generals).

Micropayments are not displayed immediately on the blockchain , only their hash is visible. To ensure the validity of microtransactions, each validator must have on the account some security deposit in GRAM coins, which is provided by the nominees.

The validator cannot conduct more transactions than he is able to provide with collateral coins. In case of an erroneous payment, the validator and the nominator transfer coins to the accounts of other validators from this amount to cover their expenses for ensuring the transaction.

Each network node is responsible for its own part of the blockchain, which is divided into small pieces – shards (shardes). With a significant increase in the load on the network, part of the shards can be transferred to neighboring network nodes.

TON developers called this idea “Infinite Sharding”. The similar structure of the blockchain makes it possible not only to easily share shards, but also to automatically repair damaged areas.

TON Ecosystem Research Information

Sergey Prilutsky conducted an in-depth study of the TON project, during which interesting features of the new project surfaced. Below we propose to get acquainted with detailed information about the structure and features of the Telegram Open Network (TON) blockchain platform.

The idea of Infinite Sharding

The main concept of the TON platform is the message. The user can send it from outside the blockchain to the address of any system account. Such a procedure causes the creation of a message to other network accounts. Moreover, the state of an individual account can be imagined in the form of its own blockchain (accountchain). It is inherently a repository of incoming and outgoing messages.

Many shardes accounts are merged into Shardchain, a blockchain maintained by a validator node. The internal composition of such a shard chain can change dynamically, depending on the load on a particular network node.

Many shardchains are united in a workchain, another blockchain structure, due to the same prefix in their address. In turn, all the workchains form one masterchain, which is the general blockchain for the TON network. Let us dwell in more detail on these structures.


The master chain is the main chain that sets the rules for all chains of lower-level blockchains. Its role is to monitor and manage the global state of the entire Telegram Open Network.

The peculiarity of the master chain is that it does not have branching and merging of individual parts, i.e. in this, it resembles a classic blockchain. Each block of the master chain contains hashes of the last shard blocks organized in a binary tree, and stores the status of system smart contracts , as well as their code. PoS control, data on validators, network participants – all this is stored in the master chain. However, accurate information on this subject could not be found, and the one that is is unreliable and not final.

Masterchain management is based on system smart contracts that contain such global parameters:

  • The total number and other characteristics of the coin GRAM.
  • List of validator nodes, parameters of their share, address of the contract by which a monthly selection of new validators takes place.
  • Parameters TVM (TON Virtual Machine), its version, minimum and maximum gas prices – similar to Ethereum .
  • Smart contracts of additional tokens and their status.

It is important that all changes to the global TON parameters are accepted by consensus of more than 2/3 of all validators according to the BFT algorithm.


Workchain is a conditional blockchain that combines the same type of chardchain. Its identifier is a prefix for the id number of shards, it is necessary for the exact routing of messages.

In TON, there is enough space for many workchains (2 ^ 32, which corresponds to approximately 4.3 billion workchains), and in each of them you can organize your own message logic. For example, one workshop can serve Ethereum contracts, and the other can implement anonymous UTXO (unspent coins), as is done in ZCash.


Shardchayn is the main working unit in the TON network. Shardchain is a separate chain of blocks that sends and receives messages from other shards, i.e. it is a blockchain serving its set of accounts.

Each validator contains a complete list of its shards and only part of the blocks from neighboring ones. The validator produces new blocks in its shardchyn, sending and receiving messages from other shards. At this level, it is already possible to separate and merge chains of shard chain blocks. Schematically, it looks like a DAG (directed acyclic graph), where each block has several parents, which are the last blocks of the joined shardchains.

Shard blocks

Each shard block must contain a certain required data set, the so-called indivisible part. It includes:

  • The hash of the previous block and, possibly, the hashes of the parents in the event of a merger of shardchaynov.
  • Validator signatures for already accepted blocks.
  • The number of the last known master block chain.
  • Hashes of the initial and final state of the shard for this block.
  • An outgoing message queue in the form of a list of messages sent to other shards.


An account chain is an entry-level TON blockchain. Each account identifier is a 256-bit key + workchain identifier. For example, the address of a smart contract would look like this:

1: 81525a3672b55678d4139b993b542c5c9735ac41b653d963a42855c9834b6921a4.

And the user account address is like this:

Ef + BVndfdQ45nUdlsfsmv68KBHGSgBJsfsv58dG2SE4oPMgs4.

The account itself receives and receives messages (naturally these are not messages from Telegram). They can contain GRAM tokens, be smart contract calls, represent any other data, etc.

All messages are processed only when they are delivered to the desired shard. In this case, they can freely move through intermediate shards. Messages can also come from outside the TON blockchain, i.e. be "messages from nowhere."


Any account is a smart contract, possibly even with an empty code. Each account pays a fee for data storage, i.e. its balance decreases over time.

The account contains information on the balance of the GRAM tokens, the contract code or its hash, the time spent in the network, starting with the appearance of the root cell, statistics on the use of the data warehouse (for example, by the time the storage was last paid), a formal description of the interface.

Low level storage, cells

All data is stored in the TON blockchain in structures called cells. This is the basic unit for measuring the size of all network elements: messages, contract code, a wide variety of data.

Each cell contains 1023 bits of information and up to 4 links to neighboring cells. There are 256 different types of cells that differ in the way they are implemented and in the number of links to other cells. All of them are combined in a tree with the number of links for each element from 0 to 4. Cells are used for unified storage and deterministic operation in the blockchain storage.

Internal TON Algorithms

We have already met with the structure of the TON blockchain and its main elements. Now it’s the turn of the principles of their work and their fundamental concepts.

Logical time

As we learned earlier, the data structure in TON is a DAG, as, in principle, in 90% of other cryptocurrencies, including bitcoin . To fix the fact of delivery of a message or event in the blockchain, a monotonous counter is used during operations with them, and each such message contains its own time.

Due to the lack of central time synchronization servers, the use of absolute time within the network can lead to various errors. That is why the message systems decided to stop at a logical time.


What is a message? This is absolutely any operation between shards. Any shard block must have an incoming message from an outgoing message from another existing and valid shard block. To confirm the truth of the message, only a few blocks from the sender’s chain are allowed to be stored; storage of its indivisible part is mandatory.

It is also forbidden to process an incoming message until proof of delivery of earlier outgoing messages from at least the next shard is received. This approach forces validators to prioritize sending messages first and then receiving them.

Instant Hypercube Routing

As it is now clear, each shard, in fact, is a queue of incoming and outgoing messages. To search for the desired account and the shortest path to it, an accelerated version of the "hypercube" algorithm is used.

This leads to the fact that if the destination has its own shard, the transaction is transferred to the desired account, and new messages generated by it are placed in the outgoing message queue. In the case when the addressee is someone else's shard, then, according to the deterministic rules of routing, the message is transferred to the incoming messages of the next shard.

The inclusion of a message queue in blocks is a new solution in blockchain technology. Thanks to this approach, the status of the message can be immediately tracked on the blockchain. Globally, the entire array of sent messages between shards is a complex multidimensional directed acyclic graph (DAG). However, at the moment there is no final clarity about the operation of the message delivery guarantees to the addressee in such a DAG.

Smart contracts

In TON, creating a smart contract or account is the same thing. In the case of sending GRAM tokens to a non-existent address, it is created as an empty contract with a balance other than 0.

As mentioned earlier, any account that stores something on the blockchain pays a fee for storage. Therefore, when creating a smart contract, you need to provide it with a balance in GRAM to pay for storage space, or even first ensure a balance, and then place the smart contract code.

There are also ready-made smart contract libraries in the master chain. Each contract has the following properties:

  • The contract may create a new contract.
  • You can place the hash from the smart contract code and only then demonstrate it.
  • The smart contract code can be changed, but this should be provided for in the code of the original smart contract.
  • You can not store the smart contract code in the blockchain, but then only incoming messages will be available to the account. Code and data will be stored outside the blockchain.
  • The code and state of the “dying” smart contract (the balance of which is close to 0) is replaced with a hash of its code. Using a hash, a smart contract can still be restored subject to a balance replenishment, otherwise the hash will also be deleted after a few months.

In general, we can conclude that the behavior and properties of accounts in TON are similar at the same time to Bitcoin and Ethereum.

TVM (TON Virtual Machine)

The TON virtual machine is a new development in the field of smart contract work. It is deterministic and stackable. Therefore, it is easily scalable and does an excellent job of packing data into cells. On TVM it is convenient to keep track of GRAM expenses for the execution of smart contracts and it is very simple to restore smart contracts.

The constraint model in TVM is built on gas, and elliptical cryptography is implemented on the ed25519 protected curve.

Smart Contract Language

TON uses the low-level and extremely deterministic language Fift, the prototype of which was the language FORTH (which is probably why they chose the name Fift). It is a concatenated, stackable language for microcontrollers. Unfortunately, for writing smart contracts with determinism and maximum cost effectiveness, only two options were invented: EVM (Ethereum Virtual Machine) and WASM (WebAssembly).

Fift is strongly typed; there are a dozen and a half types in it, including complex ones (Tuple, List, Odject).

The whole idea of this language is built around “words” -operators: there are many different words for manipulating the stack, functions, logic blocks, variables – all this is subject to the central concept of the “word” -operator.

For example, this is how the code for outputting two Fibonacci numbers of large 1000 looks like:

{1 0 rot {-rot over + swap rot 2dup> =} until drop}: fib-gtr

1000 fib-gtr


  • dop (xx x) , duplicates the value of the top of the stack. If the stack is empty, it throws an exception error.
  • drop (x) , deletes the value of the top of the stack.
  • swap (xyyx) , swaps the two values closest to the top of the stack.
  • rot (xyzyzx) , rotates the three values closest to the top of the stack.
  • -rot (xyzzxy), inverts the three values closest to the top of the stack in the opposite direction. Equivalent to rot rot.
  • over (xyxyx) , creates a copy of the second value on the stack and places it on top of the stack.
  • tuck (xyyxy) , equivalent to swap over.
  • nip (xyy) , removes the second value from the top of the stack. Equivalent to swap drop.
  • 2dup (xy-xyxy) , equivalent to over over.

It should be noted that many developers are shocked by this syntax and before studying the documentation on Fift, it is recommended to study one on FORTH.

For what reason did the developers choose Fift as the language for smart contracts? Perhaps because in this form it is great for formal verification and more error-resistant, requiring application developers to fully understand the sequence of execution of any operations.

TON General Impressions

In general, building the TON ecosystem makes a good impression. Among the advantages should be noted:

  • A new, cost-effective implementation of data storage. This indicates a serious approach to the problem of blockchain size.
  • A primitive messaging system similar to that used in GO.
  • Processing a message chain, a memory pool on the blockchain, almost all transaction information is taken from the blockchain, and not from external sources.
  • Workchain for hard forks or radical changes in consensus, cryptography, virtual machine for smart contracts. This allows you to theoretically tie Bitcoin, Ethereum, or EOS blockchains to TON as a new working chain.

Managing TON with smart contracts is a well-established method. For example, in Ethereum, EOS, Polkadot, etc.

From the point of view of the developer, the TON node is a few blockchains: master chain, work chain, shard chain.

Smart contract interfaces are stored next to smart contracts, which is very convenient for dApp, as provides the simplest interaction with them.

All blockchain resources are honestly paid, up to and including data warehouse rental. There are no discounts for large GRAM holders or validators.

The only thing I would like to change is the availability of a more understandable mechanism for implementing formal proof of message delivery. Especially considering the variety of network topology options.


The WhitePaper of the project gives the impression that the developers took the best working patterns from many modern projects, and did something different for each of them. Here there are parts that work like UTXO bitcoin (messages, accounts), there are like EVM (smart contracts, management), there are new individual developments (shards, routing), and there is an adaptation of old solutions to your project (language of smart contracts, cells storage).

In general, we can say that TON is causing a natural interest in a huge number of developers and users. Unfortunately, so far, apart from TVM, examples of smart contract code and a test node, which with high probability are at least partially an emulation, there is nothing more. A full launch of TON can only wait impatiently.

Publication date 08/23/2019
Share this material on social networks and leave your opinion in the comments below.


Wells Fargo Banking Holding creates stablecoin pegged to US dollar



U.S. financial giant Wells Fargo is working on a cryptocurrency pegged to the dollar. The company announced this in its press release .

According to the company, the future stablecoin will be used as part of its own blockchain platform. Its main focus will be cross-border payments between the company and its partners around the world. Moreover, other companies outside the US will be able to use cryptocurrency to complete transactions between themselves.

The decision to issue cryptocurrency in the company is explained by the need to reduce the cost of payments between different countries, as well as the acceleration of this process. The current mechanisms cannot be called bad, but they are already outdated: high commissions, terms of several days per transaction – all this cryptocurrency can leave in the past.

Wells Fargo assures that their stablecoin will provide almost instant payments, and the process of their implementation will become much simpler. Next year, the company will begin a pilot project during which the cryptocurrency will be tested in test mode. Initially, only dollars will be available for transfers, but in the future it is planned to add support for many other currencies.

Wells Fargo is not the first bank that intends to launch its cryptocurrency, but it is not only one of the largest banks in the world and in the USA, but also one of the most expensive companies in the world. The arrival of such a player will show other companies that without their own digital currencies and blockchain ecosystems, they will have nothing to do in this market.

Publication date 09/19/2019
Share this material on social networks and leave your opinion in the comments below.

Continue Reading


North Korea plans to launch its own cryptocurrency



North Korea is creating a cryptocurrency with which the country will be able to avoid international sanctions.

It is assumed that the cryptocurrency development project is at an early stage. Its goal is the same as that of the Venezuelan project – last year the topic of developing the state’s national digital currency, Petro, was actively discussed. A cryptocurrency that does not yet have a name will be similar to the technology used by BTC or altoins. Currently, the team that is working on the project is studying products that could be tied to cryptocurrency. It is known that the payment instrument will not be exactly supported by the national currency of North Korea.

Experts believe that North Korea has enough opportunities and developments to present a good cryptocurrency. So, we can assume that the state will be able to improve its position in this way.

Continue Reading


The head of the SEC said when Bitcoin will appear on large traditional exchanges

Chairman of the US Securities and Exchange Commission (SEC) Jay Clayton said that bitcoin needs more regulation for listing on large exchanges. It is reported by CNBC. “If investors believe that Bitcoin pricing is as strict as on the Nasdaq or the New York Stock Exchange, then they are very mistaken. We must get to the point where we are sure […]



Chairman of the US Securities and Exchange Commission (SEC) Jay Clayton said that bitcoin needs more regulation for listing on large exchanges. It is reported by CNBC .

“If investors believe that Bitcoin pricing is as strict as on the Nasdaq or the New York Stock Exchange, then they are very mistaken. We must get to the point where we are sure that trade is regulated correctly , ”he stressed.

We are talking about listing conditions for bitcoin itself, and not derivatives, such as CME futures.

Recall, Clayton said earlier that some progress on Bitcoin ETFs has been achieved. VanEck and SolidX have withdrawn their application.

Subscribe to BlockchainJournal news on Telegram: BlockchainJournal Feed – the entire news feed, BlockchainJournal – the most important news and polls.

<< aside id = "unisender_subscribe_form-10" class = "widget unisender_form">

Continue Reading

Name Price24H (%)
Bitcoin (BTC)
Ethereum (ETH)
Bitcoin Cash (BCH)
Stellar (XLM)
Litecoin (LTC)
Cardano (ADA)
Tether (USDT)
Monero (XMR)


Copyright © 2018