The Usability of the Lightning Network

The Usability of the Lightning Network

- 8 mins

Over the past few months, we have seen Bitcoin and other cryptocurrencies hit all-time highs (ATHs) with the number of both transactions and nodes on the network rising. With the current ongoing congestion of transactions on the network and massive mempool, exchanges/services are slower than normal for processing user’s requests for withdrawal as well as having high fees. According to Murch, even though there has been a slight price correction in recent days, the mempool is still at a depth of ~187 blocks at the time of writing with the default mempool dropping some transactions below 11 sat/vB. Until the mempool gets smaller, the fees will remain high as congestion grows.

To better understand how the mempool corresponds to overall transaction fees, let’s do a quick 101 on Bitcoin fees. A vByte (vB) is a unit of measure for the weight of blocks and transactions. This was first introduced via the SegWit upgrade back in August 24th, 2017. A vB is equivalent to 4 weight units (wu) which are used to measure the size of a transaction or block. A majority of wallets and online statistical models will display transaction fees in terms of sat/vB which stands for, satoshis per vByte of data used. The larger the transaction, the larger the total fee. However, users who are proposing smaller transactions may be urged to pay a much higher fee in order to give incentive to miners to include their transaction in their proposed block. If one selects a low transaction fee, it could sit in the mempool for weeks or longer as no miner may be willing to confirm the transaction due to lack of incentive. Currently, we are experiencing the below sat/vB spread for prioritizing a transaction in mempool:

Mempool.space

In order to combat high fees within Bitcoin, various researchers and developers have expressed the use of transaction batching. Coinbase made a point in August of 2020 to reflect on their use of transaction batching. Through this technique they measured a 75.2% savings in transaction fees and reduced their daily transaction count by 95%. Other notable exchanges have adopted this approach as well, but it’s still not enough for the normal user who does not interact with custodial services. Non-custodial mobile wallets usually have manual parameters that can be set for a given transaction fee. In the early days, wallets would use a fixed fee on transactions - this is to incentivize miners to include their transactions into an upcoming block. Since then, wallets have evolved to create a dynamic fee estimation based on the current fee market and overall congestion. Even though this helps users determine when it may be best to submit a transaction to the network, it still makes it difficult to potentially use the network on an ongoing daily basis for facilitating transactions as a basic user or small service.

With the network congestion, high fees, stipulation on when Taproot will become activated on mainnet (we will go into this in a future blog post), and more - the adoption of layer-2 and the Lightning Network in particular become apparent. Elizabeth Stark, CEO and founder of Lightning Labs, best summed the need for layer-2 as a layer that can “use the underlying blockchain as an anchor for data”1. The Lightning Network which was proposed by Joseph Poon and Thaddeus Dryja in July of 2015, aimed at combating the scalability issues of Bitcoin with a P2P network that can facilitate high volume off-chain transactions. In addition to being a powerful P2P network, it would still use the underlying blockchain for security. These off-chain transactions are conducted through what are known as payment channels. A payment channel at its most simplistic core is just an agreement between two nodes on the network to defer what is broadcast to the blockchain in a single transaction netting the total balance between the two. Thus, this allows for the two nodes to facilitate transactions between one another privately in a trustless manner without the risk of counterparty default.

To move onto the Lightning network, one needs to have a hot wallet that will be used to facilitate the initial funding transaction as well as a Lightning compatible-wallet or even better, their own Lightning enabled node. Note that the hot wallet must contain enough funds to create the desired payment channel with some extra for possible re-balancing or facilitating other payment channels.

To start, the user Alice will create a new private/public key pair and send an open_channel message to Bob. Bob will then create a new private/public key pair on his end as well and accept the channel request from Alice, sending his public key back via an accept_channel message. Now that Bob has accepted the request to open a channel, Alice will use both public keys from herself and Bob to issue a funding transaction from her wallet to the newly created 2-of-2 multisig address that was generated via both public keys. Once both Alice and Bob create their version of a commitment transaction (transaction that will spend the funding transaction and send all BTC back to Alice but is not broadcasted on-chain) and send each other their signatures for the funding transaction - Alice broadcasts the funding transaction on-chain. There is much more information underlying for these first few steps, but will stay high-level for this post to gain some thorough understanding.

Now that a payment channel has been created, the channel can become public on the Lightning Network via the network’s gossip protocol. This protocol tells other nodes of the channel’s existence, capacity, and fees. I know…I know, one might be asking themselves why the hell we are talking about the Lightning network when we originally brought it up to combat fees. Fees within the Lightning network are slightly different than those on-chain. Fees within Lightning are known as routing fees. Due to the gossip protocol, nodes within the network have a topology of the entire network and all participants. If Alice wants to pay Charlie for a slice of pizza, and Alice has a channel with Bob and Bob has a channel with Charlie, then her payment will be forwarded and routed from her to Bob’s channel with Charlie. Typically, the routing node that forwards a payment through their channel to another channel will establish a minimum base fee and a fee rate which is prorated based on the value of the payment.

Within Bitcoin, the endless discussion of space in blocks has gone back and forth for years. As miners compete for rewards and fees, there is a major fee market that is based on block space. Transactions that have higher fees are more likely to get added to their blocks and included into the main chain much faster. On the Lightning Network, the fee market is driven by capacity of channels and connectivity. If a single Lightning node is connected to major nodes that facilitate a large amount of routing payments and have high uptime on the network, they will gain more satoshis over time. Routing a payment within the Lightning network is solely forwarding a payment through a channel with capacity for it. Most routers have a base fee of 1-2 satoshis with a fee-rate of < 0.000100 satoshis. As a majority of nodes on the network stay within this fee range, they become quite attractive to the network. These nodes are then used to route payments and the more nodes that do this, the more everyone benefits by contributing to the network.

From our earlier illustration of current Bitcoin on-chain fee ranges and the current off-chain Lightning network fees, there is a major contrast! For today’s current fee market compared to the base fee on Lightning being around 1-2 satoshis, there is a difference of $0.00048USD to $8.04USD. It is still quite early on in the overall adoption of Bitcoin within the mainstream ecosystem including major financial institutions and common consumer businesses. With the rise of Lightning Labs and the oncoming adoption, I see Lightning as the next frontier for the overall adoption of Bitcoin and a path that can facilitate everyday transactions as we move into a more decentralized payment environment. Jack Mallers delivering the Zap wallet to quickly onboard users from fiat to Lightning within seconds and now Strike Global partnering with Bittrex Global to launch Strike in over 200 countries is just the start. From Fold, which allows users to earn Bitcoin rewards through Lightning when using their Fold App or Fold Card in normal everyday payments, to OKCoin Exchange integrating Lightning Network into their platform in Q1 of 2021. More and more exchanges will start integrating and allowing users to move onto Lightning to side-step the on-chain congestion within Bitcoin and maintain their throughput and onboarding of new users. So if you are struggling with the current fee markets on-chain or are looking for somewhere to help the Bitcoin network and earn some small fees, run a Lightning node and welcome friends to the new frontier of Bitcoin! Layer-2 is here to stay!

Footnotes

  1. Stark, Elizabeth. The Importance of Layer Two. Blockstack Summit 2017. https://www.youtube.com/watch?v=3PcR4HWJnkY 

Jake Tarnow

Jake Tarnow

Not Your Average Engineer

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora