❮ BACK TO VIDEOS
Justin Dhingra (Crypto Garage), Thibaut Le Gilly (Crypto Garage), Ichiro Kuwahara (Crypto Garage)
[00:00:00] Justin Dhingra: Hi everyone. this is crypto garage and today we will be talking about discreet law contracts and how, you're able to do financial, contract transactions on the Bitcoin blockchain. I'm Justin I'm the chief, crypto finance officer at crypto garage. And I have two of my colleagues, in this session as well.
Thibaut Le Gilly: Yeah, my name is Thibaut. I'm a tech lead for the project called peer to peer derivatives, which is like mainly using discrete log, contracts, developing application around that.
Ichiro Kuwahara: Hi, I'm Ichiro. And I'm researching about DLC and the lightning network
at crypto garage.
Justin Dhingra: Okay. so, before we talk about, discrete log, contract, we'd like to give you a, a brief intro about a crypto garage.
Crypto garage architecting crypto finance crypto garage is established as a joint venture between three [00:01:00] companies, digital garage, the Tokyo time sheet. And Blockstream
we integrate. Highly specialized fields of both financial engineering and the blockchain technology. With blockchain technology, we aim to create a P2P financial platform that minimizes counterparty risk.
Blockchain is not here to replace the existing technology system and architecture of financial institutions and financial services. It is a worldwide architecture under a new network, such as Bitcoin side chain and the lightning network advancements in smart contract and cryptography technologies will accelerate the time for establishing a new financial.
Architecture crypto [00:02:00] garage will take the lead in this new financial architecture by creating crypto finance products, such as P2P based for contracts, derivatives and security backed contracts.
So, yeah, at crypto garage. we are here to create crypto finance, products. And, one of the crypto finance products we are working on is based on the discrete log contract protocol. before we get into, the product that we are working on, let me walk you through a, what a discrete log contract is.
So, in a discrete log contract, in the white paper for, discrete log contracts. I called, DLC, DLCs enable, the creation of monetary contracts directly on the Bitcoin blockchain using an Oracle to determine its outcome without having to reveal the existence of the contract to the Oracle, [00:03:00] as with any regular contract, parties, first need to agree on the terms, such as the different payouts based on different outcomes.
Then they pre commit the collateral for the contract in the Bitcoin transaction and broadcast to the, blockchain. So in this, animation, you could see how both counterparty a and B are locking their collateral onto the blockchain.
and once the collateral was locked, At maturity, the Oracle publishes the outcome of, for the contract. and, both parties can unilaterally re redeem their payout, based on the value of the oracle, This process, is, the idea of this process is you minimize the, the trust.
of the, other counterparty and do not need to lock your collateral through a kind of a third party custodian. So, from the concepts of, DLC, we [00:04:00] applied the ideas of financial engineering, to, with a goal of creating a trust, minimized financial derivative the first type of derivative we focused on was a forward contract.
we executed with a block screen. So, with, the derivative that we, worked with, block screen. it was a forward contract. and a forward contract is an agreement to buy or sell an asset at a predetermined price at a specific time in the future. And then at maturity, there are nonbounded to the profits or loss, of the counterparties, for the counter parties of this contract.
This is a illustration of the profit and loss, of the counterparty. Forwards are, forward contracts are used for a practical purpose by customers like mining pools. as a hedge against a volatility, risk upholding, large amount of BTCs on their balance sheet,
Forward contracts are typically [00:05:00] unsecure by any collateral. So, it requires some kind of collateral management, arrangement by both parties. This approach relies on the mutual trust between the two parties, engaged in, in the contract. The absence of any collateral means that each party is at risk, of the other failing to deliver upon the completion of the contract.
so for the derivative to work under the DLC framework, both parties need to, post collateral upfront where the maximum, profit and loss, our, of each counterparty is predefined in, in the payoff. So what at crypto garage, what we did was. We redesigned the forward contract, to be a collared forward, where there was a maximum and minimum to the payoff of the contract.
And then we applied the concepts of DLC and allowed a Bitcoin, collateral to be posted by both parties and locked in a two of two, multisig, contract, until it's a maturity date. [00:06:00] And at the maturity date, based on the price, published by the Oracle, we use the, the, that the Oracle's price feed and the signatures of, of the participants to, to, distribute the payouts of the contract.
we did this, transaction, in April of 2019. We were able to prove successfully that this trade works. the payoffs were both, confirmed by Blockstream and by ourselves. And, anyone could also confirm our transaction, on the blockchain, Explorer. from, from our first deal on, on doing, doing this, this trade led us to our second deal, in September, 2019, with Skew a cryptid, crypto derivative data platform.
And what we did was with skew was enter into a S&P 500 derivative contract that is settled in Bitcoin, using the DLC a protocol. This is [00:07:00] the summary of the terms of the contract. Rather than going to the details of the contract, I'd like to explain to you the motivation on why we did this contract.
so to step back, usually a, you know, very well established, you know, financial contracts are typically, traded in the local currency. So for example, the U S equity U S stock a S and P 500 index is typically . Traded in us dollars. There can be cases where an investor, you know, would like to get exposure to the S and P 500, but due to regional restrictions, they may not have, access to a US dollar account.
On the other hand for a Bitcoin investors, they are no regional restrictions. And, but the current product offering to invest in. you know, an S&P five hundred in using Bitcoin is not very common. So, we want to illustrate, with this transaction with you, that, you can engineer a [00:08:00] BTC, a settled contract on one of the most commonly traded derivatives in traditional finance, which is the S and P 500, option.
And our, our intent, was to, from this transaction is to draw interest from, BTC, investors in conducting, you know, derivative trades on, other traditional asset classes, you know, such as, you know, crude oil derivative, that is settled in, Bitcoin. Well, you know, from the lessons that we learned from 2019, right now w crypto got garage, what we're working on is a application, an MVP, a minimal viable product application based on DLC called P2P derivatives, that enables a trust minimize, derivative transactions between two parties.
we expect to release this, MVP, app, sometime this month in, in May. On w with the MVP, app, we hope to stir, interests for further development and, and usage of DLCs and P2P crypto [00:09:00] finance products.
Now I'm, I like to kind of pass the Baton to a Thibaut, who's been, the project lead for the MVP app and, I think, he can, kinda explain more further details on what he's working on.
Thibaut Le Gilly: All right. Thanks. yeah, so, well, as just, you mentioned, we're going to release a MVP application within this month, but already know what we believe is a, some kind of like library to enable developers to implement some applications that use DLC.
So, yeah. Oh, in order to be successful, like DLC, you know, has to become a bit more popular among developers first as a, you, the more applications will be out there using DLC. The more likely it is to succeed. And so in order to help, other people we, so we developed this library called crypto finance development kit for DLC.
the name comes from [00:10:00] libraries that we developed in crypto garage, called crypto finance development kits, which it's basically like, a library helping developing, applications for Bitcoin. So, yeah, the goal is, as I mentioned, is to, facilitate the development of our application. And another goal of ours was to, you know, target as many, a developer community as possible.
So many different programming languages, in order to do that, we chose to implement the library C++. So the base layer is basically, C++, and here you have like the link to the repositories, whereas there are some, you know, examples of how to use it. so if you're into C++, or if you have some applications into C++ where you want to integrate DLC, you can look into that.
I'll just play with it, you know, just to see how it works. then, for the MVP actually, which is using NodeJS. We implemented some bindings, and you can also like you have the link here. You can also have a look at it. There are some [00:11:00] examples. And the also we put together a tutorial that you can follow, to implement a small application.
And I'm just going to, I'm just going to show you the. What you can actually do with this application. So here is like a, I mean, of course it's like not a real world application is just like some small, tiny example to demonstrate how it can work. But this is just like a command line tool that you can use to create a DLC [unintelligible].
So here you have like Alice and bob, they each have like, Some Bitcoins and you know, they want to establish a DLC. So first Alice can choose like some parameters for the DLC. So as a choose the collateral. So one BTC each and they choose like the maturity date, then you can select like the refund times the refund time is like, in case your oracle, doesn't publish the signature.
Like when. will you be able to [00:12:00] recover your collateral, then you have some CSV delay, in case one of the parties tries to cheat. So here we put it bit too short, probably doesn't really matter, or some fee rates. And then for example, let's say we are betting on whether like the Halving is going to be bullish or bearish, so we can say like, okay, one of the parties is going to say he's going to be bullish.
And if that's right he's going to get two BTC or he's going to get zero. And then the other one is going to say, bearish, And, you know, the, the outcome is going to be the opposites. So now, Bob receives that he can look at it and, you know, he seems okay. Yeah. I think that's a, is that something, I agree.
I want to enter into this contract, so he accepts as any in the background, like, you know, all the transactions are going to get created. They're going to exchange signatures and Bob is going to broadcast the transaction. on the, on the Bitcoin network, in this case it's just practice, but in the real application it would go to the Bitcoin network. So now, we also play the role of the Oracle so we're going to say, of course the halving is going to be [00:13:00] bullish.
And now that we show the outcome. We can actually decide like how we want to close the contract so we can like [unintelligible] collaborate. To close the contracts or, you know, they can try to close like unilaterally. So in that case, we're going to choose collaborative and you can see that Alice's balances increased while Bob's balance is decreased.
And you know, like the trading steps, just because you need to pay some fees in order to, to render contracts. So let me go back to my slides. All right. Yeah. So that's, that's pretty much what you can do with this library and again, if you want to see, like, what is this, applications implemented like you can follow the tutorial. you can look at the code and, and again, this is libraries is really good. I think if you want to, if you're developing some like line applications, like, for example, if you want to use Electrum, I just want you to mention that, there are, people and those are companies working on, you know, kind of [00:14:00] tools.
there's Suredbits working on the Beacon S implementation, who is, developing DLC, things as well in scale up. And there is also some effort being done to implement something in Rust and to integrate it with Lightning. So that's it from me, I am going to let Ichiro introduce about a off-chain DLC.
Ichiro Kuwahara: Yeah,
As Thibault talked before, in addition to, [unintelligible], , we are researching our was, future development of a discreet log contracts. actually, just made available our paper. that is proposing a mechanism for updating discreet log contracts with [unintelligible] off chain DLCs.
And we have true motivation about previous DLCs. The first one is [unintelligible] discreet log contracts [00:15:00] conceptually, and then it to grow,[unintelligible] transactions for each contracts. [Unintelligble] and the settlement time for each contracts and to solve this problem. we propose the off chain DLC. And once each body establish a DLC channel, the DLC channel means, that means, they've locked their funds on the block chain. they can execute the consecutive off chain contracts. It does. It's quite similar to is a mechanism of the lightning network. And the second one is, we propose, integrating DLC channels in the lightning network, by doing this, we can leverage a lot of research and development on a lightning network for DLC.
And we can shares the funds that is locked on Blockchain between the DLC and lightning, and we can [00:16:00] [unintelligible] lightning and DLC.
I will talk about the simple use cases. let's say, the DLC market has, some few, a future product with, two weeks maturity and Alice is a user and, and she would probably be interested in renewing a contract regularly. And the existing DLC requires [unintelligible] transaction for each contract, with our proposal.
once the DLC channel is a storage, Alice can execute, contracts with off chain transaction. So she only needs, or one time for, broadcasting transaction. and if Alice in the DLC market already has a, lightning channel. they don't need to broadcast a transaction for DLC because they [00:17:00] can integrate a DLC Channel, with Lightning on and, and also, they can [unintelligible] the deposit between the Lightning an DLC.
And here is a references and. And actually we have started to discuss a discussion about, about it, about off-chain DLC on lighting the mailing lists. And also we created an open channel for DLC discussion or, Oh, also we are working on a theory specification with great developers. Suredbits is also contributing with this specification.
if anyone has interests about it, let me know, let us know. So I'm going to pass the Baton to Justin.
Justin Dhingra: So yeah, just to kind of recap our session. so yeah. With DLCs, what's possible is that you can [00:18:00] do a financial contract transaction on the Bitcoin blockchain. that said DLC is still a relatively new protocol and there's ample opportunity to standardize.
as, Ichiro mentioned, you know, Suredbits is contributing to that specifications. As people mentioned, we are expected to do a SDK release of P2P derivatives and we're open to feedback and, areas of improvement. As I mentioned, with MVP launch of P2P derivatives, we're looking to stir interest in the usage of DLCs and, P2P, derivative contracts.
And lastly, there are still, you know, scaling issues, with the DLCs and, there's a kind of a discussion, you know, in the, dev community about off chain DLCs. about, to lower transaction costs or shortening, settlement times and, and possible integration with the lightning network. so this is just a brief introduction about DLCs, if you're interested.
[00:19:00] Please, reached out to us, either to, through our Twitter, or, or github. Okay. All right. That's it for us. Thanks for your time. And yeah.