DLCs on Lightning Allow Bitcoin Smart Contracts To Exist

The following is an excerpt from Marty’s Bent Issue #1286: “The first Lightning mainnet DLC has been executed.” Subscribe to the newsletter here.

It’s been exactly 11 months and two days since we discussed discrete log contracts (DLCs) in this publication. For those of you who are unfamiliar with what a Discreet Log Contract is, it is a type of bitcoin transaction that executes a smart contract with information provided 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 ends on Saturday, the winner of the bet could close out the DLC by signing the transaction that moves the sats in the smart contract to their address using the hash of the outcome provided by Statmuse.

A sports wager is one example. Individuals could choose to bet on the price of bitcoin, the hash rate at a specific block height, the temperature on a specific day, or even create 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 pretty bullish on the potential for DLCs to disrupt a variety of industries. However, one of the factors preventing DLCs from reaching a critical tipping point is that they have only been conducted on chain. Given the number of potential applications that could leverage DLCs and the number of end users they could potentially touch, scaling this use case on chain appears untenable, especially when considering the possibility of periods of elevated transaction fees that render certain DLCs uneconomical. To me, it makes sense for DLCs to operate on Layer 2 protocols with low fees, such as the Lightning Network or Fedimint.

The Crypto Garage team has announced that they have successfully opened and closed a Lightning channel on mainnet with an embedded DLC channel. According to their blog post, the Crypto Garage team forked the Lightning Development Kit to include support for splitting a Lightning channel, allowing them to create a DLC channel within 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 represents 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 likely lose your sats. Regardless, this is incredible to witness. Thanks to the Crypto Garage team and those who assisted them in moving this forward.

Slowly but steadily, as every skeptic on the planet declares bitcoin a failed Ponzi scheme, those who recognize the revolutionary nature of the protocol are developing tools that make bitcoin more useful to people all over the world.

Add a Comment

Your email address will not be published. Required fields are marked *