The Discrete Log Contracts or DLC, are a proposal to make Bitcoin have a smart contract implementation that allows the creation of blockchain oracles that are simple to implement, secure and easy to use.
The Discrete Log Contracts or DLC, are a proposal that seeks to turn Bitcoin into a blockchain with its own and native means to create blockchain oracles, something that at the moment is impossible to do.
The idea behind DLCs comes from the mind of MIT’s Tadge Dryja, who is a well-known Bitcoin developer and has been behind ideas like the Lightning Network (LN) and UTreeXO.
Discrete Log Contracts (DLC), the gateway to powerful smart contracts for Bitcoin
Lately much of the development of Bitcoin is focused on offering improvements to its privacy and its ability to run more powerful scripts. Improvements like Taproot and Graftroot aim precisely at this, and among them come the Discrete Log Contracts (DLC). However, the DLCs have a slightly more specific purpose. And it is that these are designed to connect the Bitcoin blockchain with the world outside the blockchain. That is, DLCs seek to establish communication bridges that bring information from the real world to the blockchain. So that once there, that information is processed by smarts contracts within Bitcoin, or any other blockchain that implements the DLCs.
In this sense, it is understandable that connecting the blockchain to the real world is a functionality highly appreciated by developers of decentralized applications. In fact, decentralized finance or DeFi need these types of functions in order to function properly. Hence the fact that oracles are common in Ethereum, because they are the ones that carry information from the real world to the DeFi protocols (or DApps) that run on Ethereum and need this data. In that case, Chainlink is one of the best-known oracle projects on Ethereum.
But Bitcoin, as well as many derivative cryptocurrencies is another story, since Bitcoin Script is limited in functions, these types of functions are almost impossible to implement on top of Bitcoin natively. Instead, it is necessary to create a whole second layer protocol (such as RSK or Blockstack) to add these functionalities.
Well, Tadge Dryja‘s proposal wants to change this, and allow Bitcoin to implement oracles natively on its blockchain. The possibilities for this are many. Starting because Bitcoin could finally have a decentralized DeFi application suite of its own. Something that would greatly expand its functionality and make its use even more widespread. On the other hand, it would generate problems if the scalability problems suffered by Bitcoin are not solved.
How does a DLC work?
In the whitepaper presented by Tadge Dryja, it clearly specifies the basic operation of the DLC. First of all, you should know that a DLC is a contract that has monetary value. When a DLC is created, three entities act. Two of them are the parties that are making the exchange, and a third is the oracle. The latter is the one who will release the necessary data to carry out the negotiation. Depending on the data provided by the oracle, a distribution of funds is made according to the conditions stipulated by the contract.
But it is thanks to the structure of the blockchain, that the parties that act in a DLC are never known as such. What’s more, not even the oracle is able to obtain such data. This ensures that operations are private and secure, and at the same time that these operations are decentralized. Not only that, the use of Schnorr signatures is vital in this operation, and at the same time the use of technologies such as Taproot and Graftroot, since it is these that amplify the final functionality of the DLC. In other words, DLCs are a complementary technology to these other technologies already mentioned.
Now this is just a cursory view of how a DLC works, so let’s dive a little deeper into this technology. In particular, about its “discreet” section and what allows these characteristics: the Schnorr signatures.
Schnorr signatures, and the discretion of DLCs
The operation of the DLC falls especially to the Schnorr firms. These signatures are the method of choice for creating the digital signatures necessary for a multi-party contract to be reliably executed. Remember that Schnorr signatures are capable of executing a form of cryptography known as threshold signatures. This means that several parties can participate in the digital signature of a cryptocurrency contract or transaction. All this without any of the parties knowing what the signature of each of the parties is, or the secret data associated with said signature. In fact, it is the signature of all the parties that ultimately guarantees a single and uniform signature for the contract or transaction.
Imagine this as follows:
Two people will create a Bitcoin futures contract. Both parties have decided to create this contract and rely on an oracle to determine if the conditions that favor one or the other of the parties involved are met within the period of time defined in the oracle. At this point, having established the conditions, the creation of the DLC begins. Thus each of the parties creates their own Schnorr signature, including the oracle.
Once the signatures have been created and the script or smart contract signed, it is sent to the blockchain waiting for the conditions to be met. The conditions are constantly monitored by the oracle, which at the end of the operation is consulted for the information necessary for the fulfillment of the smart contract. This information is delivered by the oracle, along with its signature Schnorr and once the authenticity of the information is verified, the DLC activates the conditions of the contract given the information received. In this way, the smart contract created by the parties at the time will send the funds according to what is stipulated, and all this without any intermediation.
In this example, the Schnorr signatures are vital because these are the ones that clearly demonstrate that the information is correct (in the case of the oracle) and that the parties (winning or losing) have received the information and agree with the same. In fact, if one of the parties tried to claim the money without authorization from the oracle, the money could go directly to its counterpart, thus demotivating malicious actions.
Additionally, the fact of using Schnorr signatures and being able to join with contracts such as those promoted by Taproot and Graftroot solve a common problem with smart contacts: privacy. And, these creations are designed to protect it in the best possible way at all times.
Discrete Log Contracts (DLC) and Lightning Network
Now, certainly the function of Discrete Log Contracts (DLC) is interesting, but there is a serious problem on the horizon: scalability. Well, this might not be a problem at all, since Tadge Dryja has created the DLC so that they can be executed on the Lightning Network. Result? DLC operations can be performed by the thousands on a dedicated Lightning Network channel. And, once the channel limit is reached, it is simply closed, the block is issued on the Bitcoin blockchain, and the accounts are closed for all parties involved.
In this way, it would be possible for DLCs to perform thousands and even hundreds of thousands of operations without having an unwanted impact on the Bitcoin blockchain. Although it is true, it would not be native anymore.
It is even possible to bring DLC to systems compatible with the Lightning Network, such as RSK’s Lumino Network, where it could greatly enhance the functionality of this second layer Bitcoin protocol. Not only that, the system could be moved to other second layer networks or protocols that meet HTLC functions and Schnorr signatures.
Current status of Discrete Log Contracts (DLC)
Despite all the benefits and functionalities described here about Discrete Log Contracts (DLC), it is sad to say that DLCs are still a technology in development. In fact, it was in January 2020, when the first theoretical implementation of the DLCs was formally presented. You can review the implementation on this GitHub, where you can not only read the current advance but also help develop this idea.
Of course, there is great interest in taking this work forward, and that is that it would allow cryptocurrencies like Bitcoin to expand their capabilities in an unprecedented way. For example, we would be able to run DeFi applications directly on top of Bitcoin.
And that would only be the beginning. The truth is that the functionalities that the DLCs put within reach are many. Something that will surely increase once technology shows all the potential it can achieve.