New Lightning Banner

While the Lightning Network is mostly known as a way to make Bitcoin payments instant and practically free, another often-touted aspect of the layer-two protocol has been its ability to enable a sort of decentralized exchange as a side effect of its original goals. However, the viability of this functionality has come under fire recently as developers have uncovered a potential exploit of this system.

How the Lightning Network Functions as a Decentralized Exchange

Although the Lightning Network is usually associated with Bitcoin, the payments-focused layer can be built on top of any other blockchain that has the proper underlying features. For example, Lightning transactions have been successfully tested on the Litecoin and Vertcoin networks.

When Lightning Network functionality is available on more than one blockchain, it becomes possible to instantly swap the native tokens of those blockchains in a decentralized, low-trust manner. This works by routing payments through Lightning Network users who are operating on multiple blockchains. If Alice wants to send some litecoin to Bob but she only has bitcoin available, she can route through a third party who is holding both bitcoin and litecoin on the Lightning Network.

The Issue with This Setup

While this decentralized exchange sounds amazing in theory, multiple developers have poked holes in the logic behind the feature.

As pointed out in the most recent issue of Bitcoin Optech Newsletter, Lightning Network developer Corné Plooy created a thread on the Lightning-Dev mailing list back in May of last year where he explained how cross-chain Lightning Network payments effectively create a nearly-free options contract for users. A pseudonymous developer recently brought the topic up again on the same mailing list.

The basic issue at hand is Lightning Network participants are able to delay transactions. Through this flaw, a user could pause an exchange from bitcoin to litecoin (for example) and see how the bitcoin to litecoin exchange rate changes over the next 24 hours.

If the exchange rate moves in the user’s favor, they’ll complete the transaction. If the exchange rate moves against them, then they’ll cause the transaction to fail. With this method, the user can make money by simply canceling unprofitable trades and accepting profitable trades. They basically get to trade based on knowledge of where the price will move in the future.

A Solution That’s Good Enough

While the pseudonymous developer behind the most recent mailing list thread on this topic believes the idea of a multi-asset Lightning Network should be abandoned, Plooy has offered a potential solution that involves the use of a third party between the two users who want to make a trade. It may seem paradoxical to solve a Bitcoin problem with the use of a trusted third party, but the amount of trust placed in the third party is rather low. More importantly, Plooy’s solution is still an improvement over traditional, centralized crypto asset exchanges.

“The system described here is not perfect, but when it comes to developing decentralized and trust-free alternatives to exchange services, it is an improvement,” writes Plooy in his explanatory paper on his solution (PDF), “Compared to a regular exchange service, which has control over customers’ funds, the routing service cannot steal from its customers, it cannot lose customers’ funds in case of a hack, and unless the service provider [decides] to add restrictions on who [or] when to serve, it doesn’t have to know any [identifying] information about its customers, or even what asset is being traded between them, at what exchange rate.”

In short, the only way the trusted third party can cheat is to conduct the same delay attack that Plooy’s solution is intended to solve in the first place. Trusted third parties can compete with each other on fees, trustworthiness (not doing the delay attack on their users), and other features. The need to preserve one’s reputation as an exchange provider on the Lightning Network should limit the proliferation of this attack.

For now, it remains unclear how a Lightning-based decentralized exchange will function in the real world, but Plooy’s solution appears to be a “good enough” approach that can still offer tremendous value to users. Additionally, it’s possible that someone else will come up with a better solution that would make the Lightning Network’s functionality as a decentralized exchange require even less trust in a third party.

About the author

E-Crypto News was developed to assist all cryptocurrency investors in developing profitable cryptocurrency portfolios through the provision of timely and much-needed information. Investments in cryptocurrency require a level of detail, sensitivity, and accuracy that isn’t required in any other market and as such, we’ve developed our databases to help fill in information gaps.

Related Posts

E-Crypto News Executive Interviews

Automated trading with HaasBot Crypto Trading Bots

Blockchain/Cryptocurrency Questions and Answers

How to Choose a Legit Crypto Casino?
August 5, 2022
Spend Crypto
5 Ways to Spend Crypto
August 2, 2022
What Is A DAO LLC?
What Is A DAO LLC?
August 2, 2022
Can Running A Lightning Node Earn You Passive Income?
Can Running A Lightning Node Earn You Passive Income?
July 5, 2022
Is The Crypto Market Combating A Lehman Brothers Moment?
June 30, 2022

CryptoCurrencyUSDChange 1hChange 24hChange 7d
Bitcoin24,445 1.49 % 6.80 % 6.93 %
Ethereum1,908.5 1.70 % 13.51 % 17.71 %
Tether1.003 0.11 % 0.15 % 0.14 %
BNB334.44 0.63 % 3.80 % 12.04 %
USD Coin1.001 0.14 % 0.00 % 0.06 %
XRP0.3854 0.33 % 5.22 % 4.23 %
Cardano0.5448 0.18 % 6.41 % 8.39 %
Binance USD1.002 0.06 % 0.11 % 0.07 %
Solana42.12 0.56 % 2.22 % 3.81 %
Polkadot9.630 0.88 % 11.47 % 20.08 %

Bitcoin (BTC) $ 24,187.00
Ethereum (ETH) $ 1,873.62
Tether (USDT) $ 1.00
BNB (BNB) $ 331.89
USD Coin (USDC) $ 1.00
XRP (XRP) $ 0.384515
Cardano (ADA) $ 0.543807
Binance USD (BUSD) $ 1.00
Solana (SOL) $ 42.84
Polkadot (DOT) $ 9.56