Bitcoin’s Lightning Network — VegaX Holdings Research Report

Bitcoin’s Lightning Network

In the previous installment of the Bitcoin Educational series, basic questions were posed about the Bitcoin blockchain: What is it? And, Why should an investor consider gaining exposure to the asset?

Bitcoin what and why — briefly revisited

The Bitcoin blockchain was released in 2009 by a pseudonymous developer (or group of developers) called Satoshi Nakamoto. Bitcoin was constructed as a permissionless, trust-minimized, peer-to-peer global payments network that is implemented as an immutable, distributed ledger software program (which is completely open-sourced).

Bitcoin, as a software solution, allows anyone on the planet to participate in a global payments network able to send value to any corner of the world at a fraction of the cost associated with legacy solutions. The native Proof-of-Work consensus model requires miners to expend a significant amount of computing power to validate new transactions, in the hopes of earning a reward for their efforts.

The asset native to the blockchain is also called Bitcoin, often written as BTC; this digitally scarce asset is of a predetermined amount — the total supply of BTC is hard-capped at 21 million coins. BTC is therefore a digital bearer asset, in that it derives value from the Proof-of-Work mining process by which it is created, as well as an ownership percentage of the world’s largest decentralized payment network.

In addition, Bitcoin is instantly verifiable and virtually costless to store — a unicorn in the investment space.

Where Bitcoin Falters…

Nothing is perfect, not even Satoshi’s code. This next section will outline some of the pain points associated with using the Bitcoin blockchain.

Circling back to the previous installment of this series, recall that new transactions are first sent to a waiting queue (mempool) for ~10 minutes as miners process the new transactions into blocks to ultimately be published to the greater Bitcoin blockchain. This process serves its intended purpose — it allows users to send value anywhere in the world, and allows ample time for computers participating in the network to validate incoming transactions.

However, a ~10-minute waiting period for settlement is not optimal for day-to-day retail transactions, such as purchasing a coffee on one’s way to work. For bitcoin to truly gain traction as a payment network, an “instantaneous settlement” layer would be needed.

Bitcoin’s somewhat opaque fee markets are another issue that makes scaling to everyday payment use cases challenging. Unlike a system that assigns fees based on the value of the transaction being processed, the bitcoin fee market is primarily a function of two components: blockspace demand and the “size” of the transaction, measured in virtual bytes.

Blockspace demand is relatively straightforward — the more people actively transacting on the network, the higher the fee necessary to ensure that the transaction is processed in the next block. The “size” of a transaction, can be conceptualized this way: Say you have 8 different outputs of 0.01 BTC, and you want to make an 0.08 BTC spend — the fee paid on the combined 8 output transactions will cost more than a transaction composed of 1, 2 or 3 combined outputs.

During periods of high demand, when blockspace is at a premium, the micropayment use case falls flat considering the cost of a fee might be greater than the value sent within the transaction.

Lightning Strikes!

Enter: the Lightning Network. The Lightning Network is a Layer-2 protocol, meaning that is built on top of the Bitcoin blockchain. The primary functionality of Lightning is to batch (group) user transactions on the second layer, thus enabling instantaneous settlements at a fraction of the cost compared to the base layer.

The following is a general overview of how Lightning works for users.

First, two participants establish a payment channel — this is a ledger entry on the base layer (Bitcoin) blockchain. The initial transaction is reflected as a multi-signature bitcoin address which requires both participants to sign off on any spending of funds. Payment channels can be funded by both parties, or by one, but in either case, the channel is bi-directional — both participants can send and receive value.

Once the channel’s balance is established, both parties can begin to create transactions, and this is where the batching takes place. Transactions that occur within a payment channel are not broadcasted to the base layer, instead, they update the original ledger balance with each successive transaction. Importantly, only the most recent state of the payment channel is valid, and this rule is enforced by blockchain-parsable smart contract scripting. Note as well, that each time a state is updated, the old state is revoked.

The payment channel can be closed out at any time by either party without any trust or custodianship by broadcasting the most recent version to the blockchain. In this way, the Bitcoin blockchain acts as an “Invisible Trusted Third Party”; akin to a judge in a court of law, but with bitcoin as a judge, all outcomes are completely deterministic, based on the most recent state of the channel. Consider the following hypothetical:

Alice and Bob open a payment channel, funded completely by Bob. Alice and Bob have since progressed through 5 different iterations of the original ledger entry. Bob, for whatever reason, wants to cheat Alice out of her original channel funding balance and tries to publish the original state, in which he owned all the liquidity in the channel, to the blockchain. Alice would then have a period to publish what she knows to be the most recent state to the chain, and at the point where she does, Bob would forfeit all of the funds in the channel to Alice.

The above illustrates the deterministic nature of the base layer’s arbitration: since Alice was able to provide better proof than Bob — her proof showed that the state Bob tried to publish had since been revoked — Alice is awarded the entire balance in the channel.

Lightning scales Bitcoin

Circling back to the base layer’s pain points, this section will outline how the lightning network can effectively “scale” the base layer, making it feasible for day-to-day transactions.

As discussed in the previous section, since transactions are done on lightingsettle instantly, the need to wait for a (~10 minute) confirmation on the base layer is unnecessary. So long as vendors have 1) a reliable internet connection and 2) an established lightning wallet instance, transactions can be completed and settled in person or remotely.

The lightning network offers a more intuitive fee market, as compared to the base layer, as well. The network fee assessed to a Lightning transaction is dependent on the nature of the transaction, generally, these fall into the below categories:

  • Transactions between two participants in a single channel, never incur fees.
  • Transactions are routed between participants in the network via multiple channels, which incur routing fees from intermediate nodes. These fees could be set at zero.
  • On-chain transactions, such as those to open or close a channel, which incur Bitcoin network fees.

In the majority of cases, fees on the Lightning Network are on the order of cents — or fractions of cents — per transaction.

Fees on the Bitcoin blockchain are primarily functions of two factors: blockspace demand and transaction size. The Lightning network is able to optimize fees for users by operating off-chain and batch-settling all transactions. By allowing users to transact an infinite number of times, while only creating a two transaction footprint on-chain, Lightning effectively scales bitcoin for daily use.

A Deeper Dive

A question arises when considering the Lightning Network’s ability to scale bitcoin:

“What if I want to transact with someone, but we haven’t established a payment channel?”

This is a great question, and as a matter of fact, any Lightning user can instantly transact with any other user via “multi-hop” payments, which use a combination of Hash-Time Lock Contracts (HTLCs) and Onion routing.

As the name suggests, a Hash-Time Lock Contract is composed of two parts: first is the Hashlock, which is a type of encumbrance that restricts the spending of output until a piece of data is publicly revealed — in this case, it would be a specific hash value. This piece of cryptography enables users to route payments/messages through third parties without the risk that those parties will steal funds.

The second component is the Timelock, which is a restriction on transactions (or outputs of transactions) that allows for spending only after a point in time. Timelocks require the production of a verifiable digital signature, further ensuring that intermediate nodes on a payment’s route are unable to claim funds not rightfully theirs. As well, if an intermediate node is unable to open the hash lock before the timelock expires, the payment is returned to the sender.

Below is a visual representation and scenario explanation of how an HTLC functions as it relates to multi-hop payments:

Bob sees that the coin from Alice is his if Carol will reveal her password before 48 hours are up. He sets the same hash-lock, pushes a coin towards Carol, and locks it in with a time-lock. The only way Carol can take the coin from Bob is to reveal the password that Bob needs to claim the coin from Alice.

In addition to HTLCs, the Lightning Network uses a series of encrypted messaging layers to pass the payment through intermediary nodes along the payment’s path to its intended recipient — this process is called Onion Routing. Conveniently, each intermediary along the path only knows the “hop” immediately proceeding and following it. Again, this is because this payment is wrapped in layers of encryption (like an onion) and is only viable to be spent when the last layer of encryption is removed — when the intended recipient receives it.

Drawbacks of Lightning

Everything has tradeoffs, there is no magic bullet, after all. A balanced exploration of this topic necessitates digging into some of the pain points associated with using the Lightning Network. For the sake of not getting too deep into the weeds, the following section will cover payment channel management.

It is all well and good to talk about setting up payment channels with, say, a business or vendor that one might spend too frequently, but what happens when the liquidity on the spender’s end runs out?

From that point forward, the original spender is unable to send funds to that business/vendor. This scenario is representative of a payment channel imbalance — when a channel’s liquidity is heavily or fully skewed to one side.

Along the same lines, if a payment channel had previously been established between two users with a balance of 0.5 BTC, but one user wanted to send a payment of 1 BTC, those users would have to open up a new channel — as the payment amount sent cannot exceed the total liquidity capacity. These same criteria apply to multi-hop payments, and, as the number of hops increases the effect of this pain point is compounded.

Fortunately for users, there are already companies working on products and solutions for these exact pain points. For example, wallet applications like Breez and MUUN offer services to manage channels on behalf of users — removing a significant amount of friction from the payment process.

Conclusions

The Lightning Network was designed to act as a scaling solution to the most innovative, and secure payments network in existence — this is a massive undertaking and not one without areas of friction. However, some of the brightest minds in cryptography, distributed systems design, and computer science are actively working on behalf of users to streamline these processes with a demonstrable focus on user experience.

This is not to say that these pain points ought to be ignored, on the contrary, the points of friction are exactly the points to which more focused attention should be directed. It is also worth noting that Bitcoin as an ecosystem is only 13 years old — it is still quite early in the grand scheme of things.

The intrinsic value of Bitcoin increases as the adoption (and usage) of the payment network grows. The Lightning Network is an early and exciting example of how solutions can be built on top of the world’s most secure blockchain which radically out-compete legacy systems and provides users a feasible way of defending their purchasing power into the future.

🚀Better Indices, Better Returns — VegaX

Questions? 👉🏼 info@vegaxholdings.com

🎯Follow, Message, Tweet, Clap, & Join Us Here:

As we continue to expand our digital footprint, here is where you can find us:

VegaX Site | VegaX Twitter | VegaX FB | VegaX LinkedIn | VegaX IG

VegaX Holdings creates next-generation indices and financial products that are needed to support the growth of the cryptocurrency industry and improve returns for investors worldwide. Learn how to get better returns today: www.VegaXHoldings.com

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store