For the past couple months, in collaboration with our friends at Crypto Garage, we have been working on implementing and creating a specification for Discreet Log Contracts (DLCs). We have written extensively about what DLCs are, how they work, and why they are great. Make sure to check out our series of DLC blog posts to learn more.
A Discreet Log Contract is simply a Bitcoin payment contingent on an oracle signature. In this post, I wanted to give an update on how things are going in the form of a demonstration. I have also written documentation for those feeling adventurous enough to experiment with DLCs for themselves.
The following video demonstrates a DLC setup and execution between two parties, Alice and Bob, who wish to speculate on whether or not the BTC/USD price will stay above $10,000 for an entire day. In this example, Alice believes the BTC/USD price will stay about $10k and stakes 40,000 sats. Bob stakes 60,000 sats that it will not. Whoever is right will win 100,000 sats.
The setup process is executed between the two parties’ nodes as shown in this diagram. Once the setup process has been complete, either party has the power to unilaterally execute the contract without assistance from their counter-party. I only demonstrate one execution path, but if you would like to explore others such as the penalty and refund executions, check out the documentation on how to run this yourself below.
If you want to get hands on with DLCs and try executing one on testnet, you will have to set up a Bitcoin-S node first. You can find instructions here. You will then need to follow the DLC execution instructions here. If you run into any issues, do feel free to join our slack and ask for help.
If you are interested in reviewing or contributing to the work-in-progress specification for DLCs, please see this repository. We welcome questions in the form of issues or open PRs if you see something that needs changing!
Join our Suredbits Slack community here.
Get in touch with us Suredbits
Get in touch with Nadav Kohen
All of our API services, for both Cryptocurrency APIs as well as Sports APIs, are built using Lightning technology and the Lightning Network. All API services are live on Bitcoin’s mainnet. Our fully customizable data service allows customers to stream as much or as little data as they wish and pay using bitcoin.
You can connect to our Lightning node at the url:
If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at [email protected].