Suredbits Lightning Map

On April 19th, Blockstream and Crypto Garage successfully executed one of the first Discreet Log Contracts (DLCs).   Specifically, they engineered a forward contract within the DLC framework.  This achievement marks a significant step forward in P2P finance whose benefits we are just starting to explore.  

In this post we will review and summarize what the Blockstream and Crypto Garage teams did and share some ideas on what might be next for DLCs.  

What is a Discreet Log Contract?

A Discreet Log Contract is a “monetary contract redistributing their funds to each other, based on preset conditions, without revealing any details of those conditions to the blockchain”. DLCs require an “oracle”.  An oracle is simply a 3rd party source of data or information that the parties to the DLC look to as the source of truth for the contract. In the Blockstream/ Crypto Garage exercise, they used the pricing data provided by the ICE Cryptocurrency Data Feed as their oracle. But a DLC could just as easily be settled based on the outcome of an election, sporting event or any other “real world” phenomena. 

The Blockstream-Crypto Garage Contract

Blockstream and Crypto Garage executed a “collared forward contract”. This is a contract that has a known upper and lower bounds. This minimizes potential upside gain but also limits downside loss potential.  

DLC assumes both parties pre-deposit collateral in the middle, where the maximum profit & loss from the derivatives needs to be pre-defined.”

Essentially, all collateral must be posted in the channel upfront. Thus, no additional collateral can enter into the agreement once the channel and contract are created. 

This graphic from CryptoGarage does a nice job showing the flow of the transaction:

 

What is important to note is the “fund Tx” is the total collateral required for the contract. Within the DLC environment , the total potential profit or loss is predefined in the funding tx. 

Thus, the Contract Execution Transactions or “CETs” represents all possible outcomes of this derivative.  Recall this is knowable since the instrument is not a pure forward contract with unlimited exposure but a collared forward which again, puts in place upper and lower bounds. 

Last critical element is the Closing Tx.  This is where the oracle comes in. In this scenario, it is the external price data from the outside cryptocurrency feed.   

“The Oracle is a neutral 3rd party that broadcasts the BTCUSD exchange rate with an Oracle signature at the maturity date of the contract.”

Note: if one of the parties attempts to broadcast a false state, i.e. one for which the oracle has not given a signature, then the counterparty can claim the entire amount of funds once the false output has timed out.   

As Crypto Garage states, there are limitations in what can realistically be accomplished with financial instruments using DLCs in the near term.   One of the most significant being collateral locked up at creation. This is potentially very capital inefficient and makes engineering for longer term derivatives or volatility more challenging.  

But we are confident that these are short-term challenges that the crypto community will solve.  

Future Possible DLCs

Recognizing some of the near term technological challenges, we believe we are just starting to scratch the surface of “Crypto Finance”.  

So what are some other possible DLCs we may realistically see in the near future?  

We already know an oracle can be any data or piece of information that parties agree will resolve the contract.  Given that notion, here are some ideas:

“Real” Contracts – Discreet Log Contracts simply execute a pre-existing agreement.  As long as there is an agreed upon trusted oracle, any contract can be executed. As such, people can contract using DLCS for things such as delivery of goods or performing services.  Delivery of goods from Amazon, UPS and FedEx, or your local pizza delivery are a few examples. Services such as legal assistance or teaching of a class could also be potential DLCs where performance is verifiable.

Hash Rate Derivative – Miners could use this as a hedge against increasing hash rate difficulties. As the hash rate increases, bitcoin mining operations can hedge against their infrastructures obsolescence.  . 

Total Block Fee Levels  – This could be used as a hedge by exchanges or anyone looking to move large amounts of bitcoin in a transaction. We know fees increase as the value and volume of bitcoin increases.  

Sports Data  – Not all DLCs have to be financial instruments. A professional sports league, the National Football League (NFL) for example, could create their own oracle that broadcasts the official results of any game from scores to individual player statistics. The same could be said of any sports organization; the NBA, MLB, FIFA, etc. This opens up some really interesting new opportunities for these entities to monetize their data

Energy Pricing Hedge – Mining bitcoin consumes a lot of energy. A contract could be constructed that enables miners, much like a hash rate future, to hedge against rising energy costs. 

“American” Options – Options may be one of the more challenging instruments to create within a P2P crypto framework. However, they are also one of the most popular and useful financial instruments. Crypto Garage indicates they are exploring how this might be implemented.  

Conclusion

Blockstream and Crypto Garage’s forward contract is a significant accomplishment. Discreet Log Contracts, along with the use of Oracles, offer the ability for scaling P2P crypto financial products and solutions.  Oracles provide the critical connection between events in the “real” world and the blockchain. This allows the creation of new ways to hedge risk, invest or speculate. For example,  options contracts, real world transactions such as delivery of goods and services, hedging products for miners, and many other applications. We have only scratched the service of what Discreet Log Contracts and Oracles can create and are excited for its future development.

Contact us @Suredbits

Contact Dan @GoDanSmith


All of our API services 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:

038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com

To learn more about how our Lightning APIs work please visit our API documentation or checkout our new websocket playground to start exploring custom data feeds.

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].