DLCs on Lightning Open the Door for Bitcoin Smart Contracts
The first successful discrete log contract was completed on the Lightning Network by introducing a new type of transaction while opening a Lightning channel.

The first successful discrete log contract was completed on the Lightning Network by introducing a new type of transaction while opening a Lightning channel.
A transaction graph demonstrating how the DLC was carried out

It’s been precisely 11 months and two days since we wrote about discrete log contracts (DLCs) in this publication. For those of you who are unfamiliar with what a Discreet Log Contract is, it is a sort of bitcoin transaction that executes a smart contract with information given by the user.

It is a sort of bitcoin transaction in which a smart contract is executed using information given by an oracle.

If two people want to bet on the outcome of Saturday’s NBA game between the 76ers and Grizzlies, they could create a DLC by locking funds in a multisig address, pre-constructing outcome transactions — if the 76ers win, send the sats to this address, if the Grizzlies win, send the sats to this address — and selecting an oracle, a company that publishes final scores, such as Statmuse. The oracle predicts the outcome of the game. When the game concludes on Saturday, the winner of the bet may close off the DLC by signing the transaction that shifts the sats. by signing the transaction that uses Statmuse’s hash of the outcome to shift the sats in the smart contract to their address.

A sports wager is one example. Individuals might choose to bet on the price of bitcoin, the hash rate at a specific block height, the temperature on a specific day, or even develop peer-to-peer derivatives, as the ItchySats team has done. If you’ve been following our DLC coverage over the years, you’ll know that Uncle Marty is very positive on the potential for DLCs to disrupt a variety of sectors. However, one of the factors preventing DLCs from reaching a crucial tipping point is the fact that they have only been undertaken thus far performed on chain. Given the number of potential applications that may utilize DLCs and the number of end users they could possibly touch, growing this use case on chain appears unfeasible, especially when considering the likelihood of times of high transaction costs that render specific DLCs uneconomical. To me, it makes sense for DLCs to function on Layer 2 protocols with low costs, such as the Lightning Network or Fedimint.

The Crypto Garage team has stated that they have successfully launched and closed a Lightning channel on mainnet with an integrated DLC channel. According to their blog post, the Crypto Garage team forked the Lightning Development Kit to include capability for splitting a Lightning channel, allowing them to develop a Lightning channel splitter.

Make a DLC channel inside of a Lightning channel. They were then able to create special transactions — a split transaction and a glue transaction — that would allow the various parties involved in a DLC to update the state of their contract within the Lightning channel and the DLC channel without giving one of the parties an unfair advantage, which was one of the major design challenges that had previously gone unsolved. This is a significant step forward.

Having said that, the Crypto Garage team warns that this implementation is still in its early stages and should not be considered stable. In fact, they warn that if you try to do this on mainnet, you will most certainly lose your sats. Ultimately,

This is fantastic to witness. Thank you to the Crypto Garage team and all that assisted them in moving this forward.

Slowly but steadily, while every skeptic on the earth declares bitcoin a failed Ponzi scheme, others who see the revolutionary nature of the protocol are developing technologies that make bitcoin more helpful to folks all over the world.

Natasha Dean

With an eye for detail and understanding of this exciting industry. My experience has given me an understanding of crypto trends and how to effectively break them down. I have a soft spot for NFTs and the Metaverse.