Tangle — the missing link for IoT and Web 3.0
By: Rohith Gandhi
Tags: Iota, Blockchain, Technology, Tangle, Bitcoin

To understand what Tangle is and why we need it, we need to know two concepts beforehand. They are Distributed Ledgers and Blockchains. For those of you who are aware of what distributed ledgers and Blockchains are, you can skip the next two sections, others, follow on and you would find a brief introduction to both of these concepts.

Distributed Ledgers

Ledgers

Anybody who owns a bank account would be aware of ledgers. A ledger is a book or a computer file which keeps track of the economic transactions. Right now, these ledgers are centralised, i.e they are maintained by a single trusted authority called banks. The problem with centralised ledgers is that the trusted authority has complete control over them, they could decide to impose fines on your account or take money away from you without your consent. They can also shut down without any notice. Another huge problem with centralised ledgers is that they are highly prone to attacks, anyone with high computing power and malice can compromise the entire system. So, a solution proposed to this problem is distributed ledgers, i.e every participant has an identical ledger and new transactions are approved through consensus of participants. Therefore, now, there is no need for a middleman to approve transactions, hence the authority is distributed over the participants. Unlike centralised ledgers, distributed ledgers are more resistant to cyber attacks as the attacker has to take control of over 51% of the distributed network simultaneously. Distributed ledgers do not allow individuals to change the ledgers as they are immutable.

Blockchain

Blockchains are distributed ledgers that are completely open to anyone. On a basic level, Blockchains are a kind of linked list! many blocks are connected together to form a Blockchain(Duh!). The first block is called the genesis block and every block has three things, data, hash and hash of the previous block. A block is identified by its hash. The hash is unique to every block, it is similar to a fingerprint for the block. Any change in the data will also change the hash of the block. Therefore, this can be used to find out if data has been altered. When a malicious user tries to change the data of a block, he will inherently change the hash of the block, since Blockchains are formed using a linked-list like technique, this would make all the following blocks invalid. To ensure additional safety, another mitigation technique has been added which is called proof of work, i.e it takes 10 minutes to add a new block to the chain. This makes it highly resistant to attacks. Bitcoin, the digital cryptocurrency, uses a Blockchain to maintain it’s transactions.

I know most of you all are wondering, why we all haven’t adapted to Blockchain already!! I know, but Blockchain has it’s drawbacks as well. I think there is another technology that is out there that can overcome the difficulties of a Blockchain and it is called Tangle. Before moving on to Tangle, let us discuss the problems present in a blockchain.

Problems with Blockchain

There are fees for each transaction. Bitcoin transaction fee is around 20$ and micropayments are most affected by this since any transaction below this amount is worthless as you would be paying more money as fees than the actual transaction amount.

Scalability is another huge issue for Blockchain. As you can see from the above graph, bitcoin approves around 5–7 transactions per second whereas Visa approves around 2000 transactions. Bitcoin dubbed as the substitute for Visa must be able to keep up with those level of transactions. Right now, each bitcoin transaction takes up to 10 minutes to be approved, There are thousands of unconfirmed transactions. You can view the live unconfirmed transactions on Blockchain by clicking this link.

Another issue with Blockchain is that it has become centralised to few powerful actors. Blockchains require huge computing power as the network size increases. Miners provide this computing power by validating the transactions on the network in exchange for a fee. So now, people with huge computing power turn into powerful players and seem to control the network. Now, this is centralisation and defeats the purpose of a Blockchain.

A miner with a classical computer has to go through around 2⁶⁸ nonces(numbers only used once) to generate the hash of a block. If a person with a malicious intent uses a quantum computer, then he/she would have to go through only 2³⁴ nonces, i.e a quantum computer is around 17 billion times faster than a classical one. Even though quantum computers aren’t pervasive now, they could be in another 15–20 years. Quantum computers are in research stages and enterprises such as IBM have built prototypes and have aimed at making them commercially available. Blockchains hailed the as future isn’t resistant to these quantum attacks.

Now you may ask, isn’t Blockchain a glorified linked list then? Yes!

How Tangle overcomes these problems?

The major difference between a Blockchain and Tangle lies in their structures. Blockchains are sequentially added blocks whereas Tangle is a DAG(Directed Acyclic Graph).

DAGs are a hierarchy of nodes without any cycles, other applications of DAG are Git protocol, which uses a Merkle DAG, IPFS etc. IOTA is the cryptocurrency used by Tangle to handle transactions.

As the number of users increases, Tangle actually gets faster contrary to the Blockchain. Another big advantage in Tangle is that there are no miners. So, how are the transactions approved now? to make a transaction you have to approve two randomly chosen transactions, this eliminates the need for miners and fees.

In the above image, the grey nodes represent unconfirmed transactions. To make your own transaction you have to approve two unconfirmed transactions randomly chosen. These two transactions are chosen using the Markov Chain Monte Carlo(MCMC) algorithm, this algorithm ensures that one does not choose his own transaction to approve. Therefore, consensus and transaction generation are not decoupled in a Tangle, unlike Blockchain. Tangle is also resistant to quantum attacks as it uses winternitz one time signature.

Drawback of Tangle

The only problem with Tangle is that it is vulnerable when the network size is small and grows in strength as the number of users increases. To help kickstart the development of Tangle, it’s creators have developed a coordinator which safeguards it from attacks. The coordinator can be considered as training wheels for the network which can be removed once the number of users has reached a threshold.

Applications of Tangle

Imagine each of our devices able to communicate with each other without the intervention of humans. Take the example of a car, each car will have it’s own unique ID and wallet. This car can pay for tolls, parking etc on its own. With the dawn of autonomous cars, we can have a fleet of driverless cars where each car pays for its own tolls, parking and also charges a fee for its users. Tangle will also revolutionize supply chain management and many other fields.

Conclusion

Tangle is the missing link, it helps connect every device together and allows each device to communicate with another without the help of humans. The era that we are in right now is truly amazing as new advances in AI are made every weekend and new technologies that could revolutionize the way we live our lives are being consistently invented. For an AI enthusiast, I don’t think there was or would be a more exciting era to live in.