A Look into Telegram’s Secretive Blockchain Project: How Does TOP Network Compare?
In early 2018, Telegram — a multi-media instant messaging app popular within the cryptocurrency community — held a private ICO for their TON (Telegram Open Network) blockchain platform. TON was advertised as a scalable public blockchain platform with key features such as: an infinite sharding paradigm, instant hypercube routing, and 2-d distributed ledgers. It would also provide services such as DNS, payment channels, decentralized file storage, and a Proxy/VPN layer. Clearly this was intriguing to investors, as TON managed to raise a whopping $1.7 billion in the private sale, despite only providing a whitepaper primer at the time. The sale was only open to extremely wealthy accredited investors, with the earliest participants requiring a reported minimum investment of $20 million. Since the closing of the private sale, TON has been shrouded in controversy due to the secretive nature of its development. Over a year has passed, yet no code has been released to the blockchain community, and the only information about the project comes from a few unofficial whitepapers circulating around the internet.
TOP Network is often compared to Telegram’s blockchain platform TON. The reason being that both our own team, and the team behind TON have previously built successful communications products with a large number of existing users, and aim to build platforms that cater towards the communications industry. TOP Network and Telegram’s TON platform have similarities in terms of our respective technologies, but we differ on our approach and general development philosophies. In this article, we will explore these differences.
TON has been one of the most secretive blockchain projects to date. While there are a few “leaked” whitepapers circulating around, there is very little information about the TON platform. The technical whitepaper puts forth many innovative — yet possibly radical — proposals such as “growing” new blocks to prevent forks, but fails to back up these claims with clear justifications, security guarantees, and comprehensive threat models.
Another point of contention stems from the essentially non-existent TON community, which has resulted in a lack of public discourse in regards to the technology. More so than other fields, It is vital that blockchain technologies be available to third party developers for peer review, especially when proposing technologies that venture into uncharted territories. All it takes is one flaw in a premise or piece of the technology to make the whole platform obsolete, or leave it vulnerable to hackers.
The TON whitepaper is filled with many ideas on how to make a faster blockchain platform, including some aspects from old Ethereum proposals. However, the difficult part in building a blockchain platform is proving it will remain decentralized, hold up under various threat models, and pass stress tests in unpredictable real-world environments. On a positive note, the Russian media outlet Vedomosti recently confirmed that Telegram has opened the TON private Testnet for testing to a few select developers.
At TOP Network, we have a much more open approach to development. We present our technology to prominent third parties for review and discussion, such as the respected ABC blockchain community founded by Google engineers. We also cooperate with revered researched based projects such as Algorand and Conflux. By collaborating and peer reviewing each other’s code, the veracity of security and scalability claims can be verified and trusted. Furthermore, peer review and discussion can aid in the pinpointing of potential issues that need addressing early on in the development process.
We have already released the second iteration of our testnet with close to 200 geographically dispersed nodes, and testnet 3.0 is scheduled for a late April release. Before the launch of our main net, we will open-source the majority of our code to the community for public scrutiny. This is not only in the spirit of the blockchain open-source movement, but also to increase trust in the code, and help make the technology more secure through public discourse and bug discovery.
Now let’s move on to the technology.
TON and TOP Network are both highly scalable blockchain platforms in theory, although they have different structures. TON is a multi-blockchain network. The TON architecture consists of a single master blockchain, accompanied by a possibly large number of “workchains,” which are themselves clusters of “shardchains.” The masterchain acts as a global reference for the network, storing the hashes of the most recent blocks created from all chains within the network. Workchains are like blueprints which govern how each of its shardchains operate. These workchain blueprints are stored on the masterchain.
There is one predefined workchain which is used by Telegram to issue their token “GRAM.” This special workchain is also where the TON VM (TVM) executes smart-contracts. Apart from this one predefined workchain, it is up to developers to create their own workchain specifications. While this allows for flexibility, there are no pre-built workchains to handle specific real-world business workflows, particularly those in the cloud communications industry. This can put a burden on regular developers who are not familiar with blockchain development, and is a point of difference between TOP Network and TON.
TOP Network employs a three-layer ledger architecture which includes: a main chain, multiple service chains, and trusted off-chain processors. The main chain is organized as a Two-Layer Lattice DAG instead of a traditional blockchain. This data structure was specifically developed to be highly compatible with a sharded architecture. The main chain is only responsible for financial transactions involving asset transfer, while each service chain adopts a tailored consensus mechanism designed to handle a specific type of business workflow.
Instead of leaving the development of service chains entirely up to developers, TOP provides pre-built service chain templates for each major cloud communications function. The pluggable nature of service chains also allows for additional customized consensus mechanisms to be implemented to handle applications in other industries, such as gaming and eCommerce. The off-chain processors act as a layer 2 solution, storing and aggregating large amounts of business data, while incorporating built in state channel like functionality to increase throughput. This integrated layer 2 solution lessens the frequency of on-chain transactions, and reduces the storage load on the blockchain.
Consensus Mechanism And Sharding Approach
TON proposes an Infinite Sharding Paradigm using a conventional Proof-of-Stake (PoS) consensus mechanism. To be eligible, TON’s PoS nodes need only deposit a certain amount of asset stake to participate in consensus. One downside to this staking model is that it can lead to a rich-get-richer situation, as wealth is the only determining factor governing who can participate. Surprisingly, TON provides the means for wealthy individuals to fund others to run PoS nodes for them, which means well funded entities could reap the rewards from many nodes without the effort or technical know-how.
The TON blockchain technically allows up to a staggering 2⁹² shardchains, and the PoS consensus nodes share the responsibility of producing blocks for every shardchain in the network. Shardchains grow dynamically based on the transaction load, and nodes are pseudo-randomly assigned to govern a particular range of shardchains. While the number of shardchains can dynamically grow, the number of consensus nodes does not dynamically grow in tandem. Initially, there will only be around one hundred PoS nodes that are responsible for all block creation, propagation, and cross-shardchain synchronization. This puts a heavy load on the PoS nodes both in required bandwidth, and computational intensity.
An Infinite Sharding Paradigm (actually a maximum of 2⁹² shardchains) sounds impressive, but it needs a great deal of justification. As the number of shardchains increases, the number of cross-shardchain transactions increases as well, which usually creates diminishing returns on transaction processing capacity. While in theory you could spawn a nearly infinite amount of shardchains, there is an effective upper limit due to bandwidth considerations. TON plans to use what they call instant HyperCube Routing to route cross-shardchain transactions and blocks between shardchains. However, while the routing path may be efficiently found, it does not fix outright the underlying issue of block propagation and bandwidth. This does not mean TON’s sharding approach won’t be a success, it just means that “Infinite Sharding Paradigm” is a bit misleading, and the number of shardchains will most likely need to remain at a reasonable number.
TOP Chain uses a unique two-layer sharding technique. The main-chain is split into multiple zones, which are each partitioned into multiple shards. Every shard is assigned a minimum of 127 DPoS* consensus nodes. From this pool, nodes are randomly selected to form committees consisting of 29 DPoS* nodes to perform parallel pBFT consensus on transactions within their shard. Unlike traditional voting based DPoS systems or stake based PoS systems, eligible DPoS* nodes are selected through a unique comprehensive stake mechanism, which takes into account compute power, bandwidth capabilities, accumulated reputation, and asset stake. Nodes that meet these requirements make up the pool of eligible nodes. From this pool, a Verifiable Random Function (VRF) mechanism randomly places eligible DPoS* nodes into shards. This helps to prevent collusion, since a group of malicious nodes have no way of knowing which shard they will be placed in, or what address space they are responsible for.
TOP uses a Block-Lattice structure to aid in transaction synchronization between shards and zones. Periodically, changes in account states from within a shard are packaged into blocks and passed to the other shards in the zone, keeping account states synchronized. Cross-zone synchronization happens in a similar way, with changes in account states within a zone packaged into blocks and delivered to the other zones.
One of the major differences when compared to TON is that TOP Chain uses a dedicated Routing Network to aid the consensus nodes with cross-shard and cross-zone synchronization. The Routing Network lessens the bandwidth burden that synchronization puts on consensus nodes, and also performs secondary audits on all transactions in the case a shard is compromised. Keeping individual node requirements to a minimum ensures that the network can scale horizontally and remain decentralized.
TON’s PoS consensus network consists of three different types of nodes: Validators, Fishermen, and Collators. The Validators are the PoS nodes and block producers. Fishermen monitor the consensus network in the hopes of finding a mistake or catching a consensus node doing something malicious. When a Fishermen proves a consensus node has done something wrong, it gets rewarded by confiscating some of the stake of the offending Validator. Collators prepare shardchain blocks and present them to PoS nodes for validation, with the expectation to receive a portion of the block rewards. The Collators are not entirely necessary, as the Validators will almost always generate the blocks themselves.
TOP uses a three layer consensus network consisting of an Edge Network, Routing Network and Core Network. The Edge nodes are the access points for clients. Edge nodes relay all transactions to the Routing Network, but do not participate in consensus. The Routing Network relays transactions to the Core Network, and performs a secondary audit on transactions confirmed by the Core Network. The Routing Network is also responsible for synchronizing transactions and states across zones and shards. The Core Network is where the pBFT-DPoS* transaction validation process takes place.
This multi-tier network acts to enhance both security and decentralization. By stipulating that all candidate transactions go through the Edge and Routing Networks first, the Core Consensus nodes are protected from DDoS and other spam attacks. It also distributes the burden between various nodes, allowing the network to stay efficient and decentralized. This is in stark contrast with TON, where a relatively small number of directly exposed PoS consensus nodes are responsible for practically every role within the network.
The TON VM uses a Turing complete scripting language for the execution of all smart contracts. TON smart contracts are deployed on shardchains associated with a specific workchain blueprint. While Turing complete smart contracts are flexible, they can be problematic when used for high stake transactions such as asset transfer. With such flexibility, they are prone to developer errors and bugs, and so are not always suitable for arbitrary high stakes financial transactions.
TOP offers two types of smart contracts — Platform Contracts and Service Contracts. Platforms Contracts are deployed on the main chain and only handle asset transfer. Platform Contracts are written in a non-Turing complete scripting language to ensure security and enforceability. Service Contracts are used for business level logic and are deployed on Service Chains. These contracts are executed in a WASM based Virtual Machine, which supports common Turing complete languages. This allows for the execution of complex and flexible business logic on the application level.
Service Layer, Service Nodes, and Cloud Communication Networks
The most important difference between TOP Network and TON is the service layer. TOP Network provides an array of secure, low-cost cloud communication services such as messaging, calling, video, VPN, CDN, IoT data sharing and more. Everything needed to run these services is provided by TOP, including a smart-contract based decentralized marketplace to connect DApp developers and service providers. TOP is not just making a platform that is conducive to cloud communications. We are actually building out the communications networks on top of the base blockchain layer. In addition to ledger nodes, we also incorporate service nodes that provide specific cloud communications functions to DApp developers. This is the reason TOP Network is not only a general purpose public-blockchain platform, but also a decentralized cloud communications network.
Using TOP’s SDK and APIs, DApp developers can quickly integrate various cloud communications services into their DApps, without knowing much of anything about blockchain or communications networks. TOP SDK also provides Media Engines for audio and video encoding/decoding, transcoding, filtering, pre/post processing, and network transmission. This makes TOP a truly full-stack solution, including the underlying ledger layer for settlement and smart-contracts, service layer for various communications functions and business data, and SDK/APIs providing tools such as media processing for effortless integration
TON focuses on creating a highly scalable blockchain platform, but they do not put as much effort into their service layer. The TON blockchain provides a scalable underlying infrastructure for payments and smart-contracts, but as far as communications services, TON only provides Proxy/VPN functionality. Furthermore, It is not clear if they plan to provide a dedicated network of VPN service nodes, or just a protocol that allows users to send anonymous transactions through the PoS consensus nodes. So while the underlying TON blockchain could be incredibly scalable, a DApp developer would still need to be an expert to build their own communications stacks. There is also no provided decentralized marketplace to connect DApps and potential service providers. TON only provides suggestions on how to do this.
— — — — — — — — — — — — — — — — —— — — — — — — — — — — — — —
TOP Network and TON are often compared because they are marketed as cloud communications projects. Both platforms are being developed by existing companies with large users bases, and both have teams with plentiful experience in the communications industry. Despite these similarities, they have different technological features and developmental approaches. The main focus of TON is to create a highly scalable blockchain and smart-contract execution platform. On the other hand, while TOP Network is also developing a highly scalable underlying blockchain, we put a larger emphasis on the service level.
Both projects also have vastly different approaches in terms of development. TON has chosen to remain a black-box, restricting third-party developers from reviewing their code. They have been extremely secretive and ambiguous, with a general lack of transparency to the wider blockchain community. We do not adopt this practice at TOP Network, where we have been actively seeking out qualified projects to collaborate and cross-review code with. As a result, when TOP’s main net launches, it can be done with a sense of assurance that it is secure, decentralized, and fair. At TOP, we are committed to staying true to the main tenets of the blockchain movement — security, transparency, and open-source.