The Open Network (TON) has been run as an open-source community project since 2020. We’re going to take a look at what TON is, who’s developing it, and what it can do.
A brief history
The Open Network was originally developed by the Telegram team and known as the Telegram Open Network. Telegram is now an entirely separate entity from TON. Telegram is simply one of the many builders on The Open Network. As a blockchain-based network, TON uses the proof-of-stake algorithm. In the previously disbanded incarnation, Telegram Open Network was set to launch the native Gram token.
According to the company’s plans, TON was supposed to be a platform for decentralized applications (DApps), while the architecture was designed to support high levels of scalability, exceeding Ethereum’s capabilities. Additionally, one important aspect of the ecosystem was integrating the network and its token with the Telegram messaging service, which at the time had amassed almost 200 million users.
In 2018, the team opened applications for participation in the ICO (initial coin offering), and was very successful. In just the first round, volumes reached almost USD 3 billion. The following year, the TON testnet was successfully brought online, the network explorer was launched, and the full node code was released. The launch of the mainnet was supposed to take place by November 2019 at the latest. This would have been the case were it not for an intervention from the U.S. Securities and Exchange Commission.
Because US-based investors had been involved in the project, the ICO was subject to United States legislation, and the commission found violations in the conduct of the token sale. The SEC then concluded that Gram had been sold to investors illegally and obtained an injunction against its distribution, which derailed the launch of TON. Telegram founder Pavel Durov announced the cancellation of the project and decided not to challenge the injunction. By May 2020, when Telegram's commitment to the project was unclear, other projects started to develop the technology. Telegram stepped away and, as a result, transferred the ton.org domain and the GitHub repository to The Open Network community.
How about now?
The TON developers set themselves the goal of developing a secure, efficient and scalable blockchain ecosystem that could serve as a platform for decentralized applications and smart contracts, in as convenient a format as possible for end users.
TON is based on a layer 1 proof-of-stake blockchain, but it’s more than just a blockchain as it contains a full array of different components:
- The TON P2P Network is a peer-to-peer network that has no “master nodes”. All nodes are equal, and all resources in the network are held in common by all;
- Ton Storage, which stores snapshots and archives copies of blocks;
- Ton Proxy, which provides anonymous access to the network;
- Distributed hash tables, which are used by TON Storage (to search for nodes containing particular files), TON Proxy and other services;
- A services platform with its own user interface;
- TON DNS which, like a regular DNS, assigns “normal” (human-readable) names to smart contracts, nodes, services and more in the network;
- The TON Payments micropayments platform.
All of these features help to solve a key objective: making TON as simple as possible to work with for end users. In the context of integrating projects from the TON ecosystem into Telegram, a messenger app with 700 million-plus users, this is clearly justified. At this point, however, we might return to the question of scalability. As the project develops and an integrated TON inside Telegram becomes more popular, we would expect an increase in the number of transactions. The advent of new services would also cause loads to increase.
This is where the developers played their trump card, with the claim that the network would be able to handle over 1 million transactions per second. How is this even possible? To achieve such a figure, TON deploys a whole range of unique solutions.
How to reach 1 million TPS
Not just one blockchain
At its core TON is not a single blockchain, but a combination of a so-called masterchain and workchains, which are themselves subdivided into shards.
The masterchain is responsible for storing general information about the protocol, validators, workchains and shards. The workchains deal with transactions, smart contracts, and other “everyday” things. Since TON uses sharding, workchains can be divided into blockchain shards (shardchains), each of which can process transactions independently and stores a copy of part of the blockchain’s state. This allows the network to process transactions in parallel, evenly distributing the load and avoiding congestion.
Asynchronous smart contracts
Another technology that makes it possible to increase the rate of work is asynchronous smart contracts, which essentially prevent the need for contracts to wait in order to be executed.
Usually, when one contract is called by another one, the execution of the first is paused until the second executes and returns a result. Asynchronicity speeds up the process, as one smart contract will not wait for the result from another, instead continuing to fulfil the remaining conditions that have been set for it.
The consensus protocol
A further innovation is the fast consensus system powered by Catchain's proprietary algorithm. In classic blockchain systems, blocks are created before consensus is reached, and after they have been created, the network nodes come to an agreement that the created block is legitimate. Blockchain forks can arise in these systems, after which the correct version is subsequently selected and the remaining forks are discarded.
Catchain works a little differently. In the TON network, blocks are created after consensus is reached. Put simply, a special group of validators is assembled during the process of creating new blocks. They create a private network inside a special network layer (ANDL is another development from the TON team) and launch Catchain. The process for reaching consensus takes place over several rounds, which may be held simultaneously.
At the end of each round, the group decides on a candidate block if none of the proposed candidates has been accepted. The round is considered over when the candidate receives "signatures" from more than 2/3 of the validators. After that, the process moves on to the next round.
TON, which operates on lots of “small blockchains”, almost completely eliminates branches and forks because the blockchain is used to communicate messages within sets of processes. Besides, all possible cases of branching are prevented by Catchain, which allows them to be detected at an early stage.
Optimization and adaptability
In order to boost efficiency, TON uses several methods to optimize "communication" between nodes in the network. For example, transactions are not sent individually, but are collected in "bundles" and aggregated. Compression algorithms are used to reduce data transfer volumes, while blockchain and sharding parameters may change depending on network conditions. For example, the size of the blocks can be changed, as well as the frequency of their creation.
Conclusion
In this short post, we have covered just a small sample of the innovations that have been implemented in TON. It would take more than one article to describe even just the most interesting solutions introduced by this network in any detail. Stay with us: we’ll be coming back to TON in due course.