Deploying MimbleWimble Technology and Lightning Network in Litecoin Blockchain
Litecoin entered the market as a similar coin to Bitcoin by Charlie Lee in 2011. Litecoin succeeded in introducing itself as one of the famous cryptocurrencies drawing the attention of activists in this field. Lately, Litecoin development team offered it as one of the famous rivals in the field of cryptocurrencies through adding two new technologies of Lightning Network and MimbleWimble. Lightning Network enters Litecoin to the scene of competition with existing payment solution such as Visa by increasing the rate of transaction per second (TPS). On the one hand, Wimble improves its privacy besides decreasing Blockchain size. In the following parts, each technology applied in Litecoin is described.
The concept of MimbleWimble protocol was suggested by an unknown person with the pseudonym of Tom Elvis in 2016. Then at the end of 2016, a version of it was deployed at GitHub by an anonymous one named Ignotus Peverell. Currently, two versions named Grin and Beam have been deployed from MimbleWimble. MimbleWimble uses two algorithms of CoinJoin and Pederson commitment. The name of this idea and pseudonyms used in its development have been adopted from Harry Potter stories by J.K. Rolling.
The CoinJoin merges some transactions in one. This method provides privacy while decreasing transactions storing size. The idea of the CoinJoin is exactly similar to the people who collect their money and do a series of purchases. In this condition, it cannot be specified which money has been spent on purchasing which good. Also, in CoinJoin it cannot be specified that how much has been paid to which address by which address. It just can be generally said that from a set of addresses (inputs) payment has been done to a set of addresses (outputs).
Pederson commitment algorithm adds a hidden string named “Blinding factor” to the end of a transaction and hashes it. The result of this hash is called “commitment.” Reversing the commitment and finding the information of the transaction and Blinding factor are practically infeasible. From the one hand, through having transaction information and blinding factor, commitment can be regenerated, and its deployment can be investigated. In MimbleWimble, network users don’t have the address and transaction parties share Blinding factor. Through Blinding factor, the amount of digital assets is specified just for the users engaged in the transaction and the others will not be informed of its amount, since transaction parties investigate its accuracy through regenerating the commitment easily. The validity of a transaction is investigated for the others through using one of the features of the Pederson commitment algorithm shown in the following equation (where C is Pederson commitment algorithm, and BF is Blinding factor):
C(BF1, data1) + C(BF2, data2) = C(BF1 + BF2, data1 + data2)
Applying this feature, the sum of input and output commitment of a sets of integrated transactions is always zero, since no new data has been generated or destroyed, but it has just been transferred from one person to the other. Therefore, the confidentiality and privacy of the users are maintained in MimbleWimble.
Lightning Network Technology
One of the weaknesses of Blockchain-based payment systems is their low speed compared to well-known international payment systems such as Visa and PayPal, which face them with the challenge of inappropriate inefficiency. There are important parameters effective when productivity, running speed, and confirming transactions of the cryptocurrency are compared. Normally a fixed amount of time is spent to generate a new Blockchain and add it to the Blocks’ chain. For example, this time is ten minutes for Bitcoin and two minutes and thirty seconds for Litecoin. Each block contains the information of many transactions and has size limitation. Therefore, with generating each new block, a limited number of transactions are investigated. The result of dividing the average size of each block by the average size of each transaction is the average number of transactions per block. From the one hand, the result of dividing the number of transactions of a block by the spent time to generate it introduces the number TPSs for that cryptocurrency. The variable of the number of TPS or transaction rate per second is approximate and is not measurable constantly.
In the Blockchain network, just investigating a transaction is not enough for the payment confirmation. The reason for that is Blockchain vulnerability against double-spending attack. In this attack, the attacker can repay his cryptocurrency in a very short time. Hence, to confirm a transaction, some new blocks should be added to the block related to that transaction. More blocks being added makes the transaction practically irreversible. The number of these blocks is different for different cryptocurrencies, and it is one of the most important parameters compared to confirmation speed of cryptocurrencies transactions. Doing a transaction without confirmation raises the probability of double spending attack greatly. The number of required blocks to confirm the transaction in the Bitcoin network is 6 blocks equal to 60 minutes while it is 12 blocks equal to 30 minutes in Litecoin.
According to the experiment by IBM on Visa, which was published in 2017, Visa is able to do 24000 transactions per second while it is about 7TPS and 56 TPS for Bitcoin and Litecoin, respectively.
As it was explained, TPS (regardless of its confirmation) depends on many parameters such as block size, transaction size, and the duration to generate the new block. The most obvious way to increase this rate is to increase the block size and decrease the needed time to generate a new block. An example of such a change is Bitcoin cash, which increased the size of each block to 8MB in the middle of 2017 with branching from Bitcoin. This change increased its transaction rate up to 61 TPS. Although this method seems efficient in the first glance, it will not be enough to generate a fast and competitive payment system to compete with Visa. The limitations of Blockchain structure to increase transaction rate is idiomatically called Blockchain Scalability Problem, and there have been many innovations to lift this limitation. SegWit, Lightning Network, and Plasma Cash are among recent innovations to solve the Blockchain Scalability Problem.
SegWit protocol, which is shortened as SegWit, was first introduced in 2015 by Pieter Wiulle at a conference. This protocol provided the possibility of storing more transactions in each block through changing data store method. This protocol was deployed first on May 10, 2017, in Litecoin and then on August 23, 2017, in Bitcoin. This deployment was able to increase stored transactions in each block to 8000.
One of the other suggested solutions for this challenge is Lightning Network. The idea of this method is confirming the transaction without storing it in Blockchain. This idea makes two-way payment channels between users through creating a new layer on Blockchain. Lightning Network confirms a transaction and reset to zero its transaction fee at the very moment. At first, transaction parties make a Multisig cryptocurrency wallet. Such wallets need some signatures to confirm a transaction. Then, each one deposits a specific amount of cryptocurrency to the address of this wallet. Up to this time, it is called “payment channel launch stage.” Now payment channel parties can move the aimed amount through changing the balance of the shared wallet and signing transaction between each other. Finally, after the payment channel is expired, the final balance is stored in Blockchain. Channel expiry will be agreed upon in one of the following ways: elapsing the specified time or to getting to the defined number of transactions. Payment channel provides the possibility of doing each transaction without paying the fee and needless to the miners for each transaction to reach the due time.
One of the other features of Lightning Network is to provide digital asset exchange between two users without a shared channel. Of course, this entails finding a pathway of channels between transaction parties. Lightning Network uses a protocol named Hash Time Locked Contracts (HTLC) to do transaction between the users lacking shared channel. Imagine that Alice wants to send Bob 1 LTC. Alice and Bob don’t have a shared channel, but each one has a shared channel with a third party named Charlie. Bob (receiver of 1 LTC) generates random string A and sends its hash (H(A)) to Alice. Alice sends 1 LTC to Charlie, albeit under the condition that he can withdraw it just if he sends the amount A to Alice. Like Alice, Charlie sends 1 LTC to Bob, albeit under the condition that he can withdraw just when he sends the amount of A to him. Bob, who has generated string A, sends it to Charlie and withdraws his 1 LTC. After earning A, Charlie, too, sends it to Alice and withdraws his 1 LTC. In this way, with the use of intermediary nodes, the possibility of a payment in Lightning Network is provided.
Joseph Poon and Thaddeus Dryja first published the idea of Lightning Network in a paper in 2015. Currently, three well-known teams of Blockstream, Lightning Labs, and ACINQ are developing and deploying this idea. Lightning Network was deployed for the first time in Bitcoin, but currently, it has been deployed in Litecoin, Stellar, Ripple, Ethereum and Zcash. When this paper was being written, Lightning Network had 195 active nodes and 1276 payment channels in Litecoin Blockchain.
For more information, check this link: