Back to BLOG

How TON Mining Works

Mikhail Korolev

Documentation about the TON network has recently has been posted online. We found a lot of interesting information there, so we decided to write a series of small notes about the features of this ambitious network developed by Telegram creators. The first one is about mining.

The article was written by Slava Karpenko, CTO of 2Miners and 2Masternodes. He is in charge of the operation and architecture of our mining pools.

What Is Telegram Open Network

Let’s start with a brief introduction. Telegram Open Network is a set of services that include payment method, storage, and file hosting. In the future, there will be more. The network operation is based on blockchain principles.

The team of the project wrote the code for the network operation on their own. Developers were guided by other successful projects like Ethereum, Bitcoin, and EOS. Blockchain architecture deserves its own dedicated article, so, for now, we will concentrate on how new blocks in the blockchain are created and verified.

First of all, mining as it is doesn’t exist in Telegram Open Network. New blocks are signed according to the principles of Proof-of-Stake (PoS), but the system suggests several different roles. Thanks to them, members of the network can earn on new block emission.

Mining in Telegram Open Network

And now let’s talk about the process that involves selected nodes – that is, computers with powerful processors and huge disc space. When a new block is being generated in the blockchain, they verify it by signing with their private keys. The reward for transactions that entered the block and new block generation is distributed among nodes that took part in signing. The distribution is proportional to their deposit on the dedicated system account.

Nodes are also called validators. Their number is strictly limited: at the start, there will be 100 nodes in the network. Once the number of transactions in the network requires more computing power, the limit will be increased to 1,000.

Validator nodes are selected once a month for the period of one month by the automated system among those who sent their contributions to the dedicated smart contract. Payment in GRAM can be of any size, but the system will pick and record only 100 highest bids. Others will get their stakes back and will be able to try their luck next month.

In other words, validator nodes will be owned by people that have more GRAM coins on the wallet. Another scenario is for services that will collect funds from hundreds of token owners and then apply for a node. By the way, that’s what 2Masternodes is planning to do.

A smart contract for two months blocks the stakes of winning validator nodes: one month of work plus one month as a guarantee – in case of cheating, a node will be charged a fine. After two months the stake along with commissions collected in a month returns to its owner. As we already mentioned above, block rewards are distributed in proportion to stakes: the higher the sum you deposit in comparison to other validator nodes out of the top 100, the higher your share of the reward.

The Importance of Nodes in TON Mining

If a validator node doesn’t work or doesn’t verify certain blocks, then it won’t be rewarded for these blocks. If the node is absent for some time during blocks signing, it can be expelled from the top 100. Moreover, a fine will be charged off the stake as punishment. This is motivating node owners to ensure their high availability and uninterrupted operation.

But what about those who wanted to take part in blocks signing, but didn’t make it to the top 100? If TON is in demand, there will be lots of people that will want to become a validator node, which means that a deposit must be pretty high and not everyone can afford it. Don’t worry: the concept of TON network suggests a few more roles that will help you to make a profit.

The first one is ‘nominator.’ It’s an investor that “lends” funds to a validator node and in return gets his share of percentage earned by a validator. For example, half of the reward is distributed proportionally among all investors. They are somewhat similar to miners in the mining pool, but instead of paying for electricity and equipment, a user deposits a certain sum in GRAM tokens, which is TON network main currency.

Profit on Pavel Durov’s Cryptocurrency

Another option for those who didn’t make it to the top 100 is to become a ‘fisherman.’  Fisherman nodes are auditors that make sure that validator nodes don’t cheat by double checking signed blocks. If fisherman nodes find discrepancies, the network penalizes the validator node, at first by charging it a fine. If this repeats multiple times, it may even lead to expulsion and further distribution of its rewards among those who found a discrepancy. It provides additional network protection from dishonest members. They may accumulate an extensive amount of funds and monopolize the process of blocks signing by deliberately making invalid transactions go through and executing a smart contract’s code in the wrong way.

And finally, there is a third role – ‘collators.’ They are particular nodes that prepare blocks for signing by validator nodes. They take on the part of the computing load and get part of the reward for these blocks. At the first stages of the network operation, there is no need for such nodes. But this will change once the load reaches hundreds of thousands of transactions per second.

So there are several ways to earn on new block emission. In the next article, we will talk about the principles of blockchain architecture and smart contracts in the network.