This article will dive into an innovation connected to the lightning network, called ‘watchtowers.’
Breaking down the name
First and foremost, we must clarify what exactly the ‘lightning network’ is. This is a piece of second layer technology whose creation is specifically for Bitcoin. It utilizes micropayment channels as a way to measure the blockchain’s capability of carrying out transactions.
By removing transactions from the main blockchain, the lightning network’s primary intent is to decongest Bitcoin. In addition, the network cuts down on transaction fees that are in association with the system. Transactions that go through on the lightning network are instantaneous. Furthermore, the technology is able to enhance Bitcoin’s general serviceability as a medium for daily usage.
The lightning network also aids in executing off-chain transactions that involve exchanges between various of other cryptocurrencies. For instance, they are a vital component for atomic swaps, which utilize smart contract technology. In this particular case, the technology allows one cryptocurrency to exchange for another without needing an intermediary. Such intermediaries include a cryptocurrency exchange.
To learn more about the lightning network, read “Lightning Network Explained Simply.”
The next step in securing the network
The titular ‘watchtowers’ are not technically a new concept. In fact, one can say they have been around since the conceptualization of the original Lightning Network paper. Since then, they are improving and developing as Bitcoin’s lightning network aspires to grow into a global peer-to-peer payment network. In a way, watchtowers are an ecosystem consisting entirely of third-parties. Users employ these third-parties to outsource overseeing on-chain transactions that are significant to their lightning channels.
For a long time, many consider watchtowers to be a missing component of Bitcoin’s lightning layer. This is because they are critical for extinguishing fraud on the experimental, off-chain network. This could effectively result in Bitcoin payments becoming much faster and more scalable.
Watchtowers essentially function as the blockchain’s “watchdogs,” identifying and disciplining any malicious users that cheat others within the channels. Their job is to determine whether or not a participant in a lighting channel improperly transmits a prior channel state. This could be a way to recover funds following the closing of the channel with an invalid state.
As a sign of gratitude for their services, they will receive fees from users. Moreover, an array of monetization methods could be subject to deployment. Users are even able to outsource channel monitoring to multiple watchtower services just in case one were to fail.
What lightning network watchtowers can fix
Watchtowers are, on the whole, third-parties that watch the Bitcoin blockchain 24/7 on their clients’ behalf. They are on the lookout for conflicts that occur between on-chain transactions and closing off-chain channels with baseless states. Each off-chain lightning channel payment requires an authentic commitment that conceives a current state of the channel balance. The update of the state can be done by either party in a channel. Additionally, the next iterative commitment that accompanies a transfer updates it.
A string of commitments is indicative of the channel’s balanced state, though a counterparty can broadcast past balance states. In other words, states that are invalid. They do this as a means to benefit from those states. In essence, they want to have much more Bitcoin on their end of the channel. These types of scenarios can occur should Party A distribute a previous balance state. To elaborate, they broadcast it following a departing transaction to Party B within the channel that reduces Party A’s balance.
Because of the timing constraints within a channel, a participant will have to wait for a certain period of time. Following this, they are able to claim funds in their wallet. Be that as it may, this requires the users to remain online periodically to confirm that there was no broadcasting of an invalid state. Moreover, confirming that a counterparty isn’t acting in a malicious manner.
This leads to clear-cut hindrances for a majority of people who don’t have the time or expertise to recognize these situations. That, and to remain online as consistently as possible.
This is where watchtowers come into play. They monitor the blockchain by remaining online on behalf of the user and receive fees in return. So, users are absolutely certain that nothing malicious is happening while they are offline
How they work
As previously touched upon, whenever someone uses lightning, it is important for them to remain online. This is to make sure that their counterparty does not make an attempt to steal those funds. However, this evidently becomes an issue pertaining to user experience (UX). A notable example is a fact that customers for Wells Fargo do not have to monitor their accounts every day for embezzlement.
The watchtower keeps watch of old ‘states’ that are set to be broadcast. Basically, if an actor with malicious intentions attempts to broadcast an old transaction, the watchtower will punish them in response. Therefore, watchtowers redistribute this anti-fraud functionality, which makes it beneficial for users as they don’t have to do any monitoring.
The basic breakdown of how a lightning network watchtower mechanism works between two users in a single payment channel goes like this:
- Person A updates the state channel by way of sending Person B 1 BTC within their channel.
- Person A simultaneously sends a ‘hint’/‘secret’ of a specific transaction to a watchtower. This is representative of a specific transaction to look out for without ever revealing the contents of the transaction.
- At this point, Person A’s signature goes to the watchtower. It will pre-authorize the channel’s funds to be sent back to Person A, just in case there is a breach.
- The watchtower will cross-reference the ‘hints’ with the use of a hash table of hints. It receives this table from both its clientele and the Bitcoin blockchain.
- If the watchtower picks up on a channel breach by Person B with an invalid state broadcast, then it will create a penalty transaction. It does this by using Person A’s signature. Following this, it will return the channel funds to directly to Person A.
The subsequent results
Person A is under protection from a breach in the channel without ever having to actually be online. Furthermore, watchtowers cannot connect state updates to any specific channels.
With that said, drawbacks with the above example are noticeable when you take one key thing into consideration. That being the broadcast of previous channel states is not always something that someone performs with malicious intentions. Should a software bug cause Person B to distribute a worthless channel state that a watchtower penalizes, they will lose their funds in the channel. Unsurprisingly, this is a pretty severe punishment.
A group of developers eventually came up with a solution for the protection against these types of scenarios with the proposal of ‘eltoo’. Eltoo conjures up two transactions for each and every channel state. One is an update transaction and the other is a settlement transaction. By applying this structure, a chain of recurring invalidations of prior channel states update. By doing so, they become a new state in a chain of transactions with a time-lock.
Something important to note is that counterparties have plenty of time to respond to previous state broadcasts. This effectively provides them with the chance to diminish the settlement of a channel consisting of a previous state. Regardless, this particular model results in the requirement of the chain of transactions to distribute to the Bitcoin blockchain. Moreover, an updated BIP proposal that fixes the issue, ‘sighash_noinput’, is up for inclusion into the Bitcoin protocol. Specifically, under BIP-0118 as a soft fork.
Watchtowers’ role in assisting Bitcoin’s LN to scale is an important one. They function as the tenacious defense system that prevents the cheating of a channel. Even still, they continuously encounter a variety of economic hurdles and monetization methods that are still a work in progress.
Running a lightning network watchtower requires a substantial infrastructure. At the very least, a watching server has to have enough resources to properly store blobs (state data) – potentially billions – and operate a Bitcoin node. So, a watchtower cannot provide its services free of charge; there needs to be a reward of some kind. Otherwise, an owner may end up halting an operation at some point in time and leave wallet users feeling uncertain.
One of the more popular proposals for making it incentive-compatible is including a watchtower reward in every punishment blob. This way, whenever a breach occurs, the watchtower obtains part of a channel balance by issuing a punishment transaction. This approach has two reasons for why it’s flawed:
- Channel breaches don’t typically happen on the regular, so services may not sustain itself by way of earning rewards alone.
- This provides some unorthodox incentives. Watchtower wants all peers to breach their channels as often as they can. This could potentially result in countless hacks and several other attempts to clout owners of lightning network nodes.
Watchtowers may need to function as businesses due to the fact that they preserve operational overhead. Moreover, they are under the influence and constraints of user bases and they redistribute models of monetization. The two dominant monetization methods for watchtowers to utilize are fees for penalty transactions and subscription services.
The operation of watchtower services are thanks to overhead concerning bandwidth, calculation, and disk space. With Bitcoin’s privacy-conserving lightning network implementation, watchtowers have to collect all prior channel states of their clientele. This can often result in expanding costs within the storage space.
Where bandwidth and calculation can increase with continuously growing watchtower user bases, the potential challenge resides. Along with this is the quadratically expanding growth issue correlating with disk space requirements. Watchtowers of a larger scale would need enough resources to allow them to store blobs. With the user base gradually increasing, the number of states in saving increases quadratically. As a result, there are considerably high operational costs for the business, presenting as data storage.
In spite of this, the size of the data in storage is small. In fact, blob sizes are comparable to the size of a conventional Tweet. So, watchtowers scaling with satisfactory capital can effectively achieve that demand.
Sizable watchtower operations are a more probable development within the ecosystem. Watchtower procedures are able to maintain profits through services that draw from subscriptions. In turn, this would actually permit the scaling of their revenue, with it being analogous to the usage of their service.
The lightning network watchtower market is still under development, due to the lightning network still progressing into a larger peer-to-peer payments network. Still, the field’s persistent research provides an ensemble of anecdotes for an ecosystem of lightning network watchtowers.
In time, the ideal marketplace for lightning network watchtower services will consist of intricate technical components that withdraw from the end-user. However, substantial progress is crucial before fully achieving that level of lightning network features. Bitcoin’s lightning network is progressively growing with gradual user adoption, channel balances, and – above all else – innovation.
Overall, watchtowers are an ambitious creation set out to mitigate security risks from the Bitcoin’s ever-growing second layer.