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. 

LThe Discrete Log Contracts or DLC, are a proposal that seeks to turn Bitcoin into a blockchain with its own and native means to create blockchains oracles, something that at the moment is impossible to do.

The idea behind the DLC comes from the mind of MIT's Tadge Dryja, who is a well-known developer of Bitcoin and who has been behind ideas like Lightning Network (LN) y 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 your privacy and your ability to run more powerful scripts. Improvements like Taproot y Graftroot They point precisely to 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 to say, 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 feature highly appreciated by developers of decentralized applications. In fact, decentralized finance or DeFi They need these types of functions in order to function correctly. Hence the fact that in Ethereum oracles are common, because they are the ones that carry real world information to the DeFi protocols (or DApps) that run on Ethereum and need this data. Then, chainlink It is one of the best known oracle projects on Ethereum.

But Bitcoin, as well as many derivative cryptocurrencies is another story, given that Bitcoin Script It is limited in functions, this type of functions is almost impossible to implement on Bitcoin natively. Instead, it becomes necessary to create a whole second layer protocol (such as the one in RSK o 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.

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 firms It 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 can be reliably executed. Recall that Schnorr firms are capable of executing a form of cryptography known as threshold signature. 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 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 time period 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, together 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 they 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 that they 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 discouraging 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.

How much do you know, cryptonuta?

Can DLC open the doors to DeFi in Bitcoin?

TRUE!

DeFi or Decentralized Finance have a great need to access information that is not in the chain, and for this, oracles are vital. The arrival of DLC to Bitcoin would enable this possibility without altering the current operation and security of the network.

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 Lightning Network. Outcome? 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 be able 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 the RSK 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 fulfill the functions HTLC and Schnorr signatures.

Current status of Discrete Log Contracts (DLC)

Despite all the benefits and features 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. The implementation can be reviewed in 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.