Discreet Log Contracts

On September 8th 2020 Nicolas Dorier and I (Chris Stewart) entered into a Discreet Log Contract predicated on the outcome of the US presidential election. I wagered 0.6 BTC on “Democrat_win”, while Nicolas Dorier wagered 0.4BTC on “Republican_win”. The total bet size was 1BTC.

As shown in the tweet, we used the OutcomeObserver as our oracle. The oracle information was distributed via tweet. Using the oracle’s

  1. Public key
  2. Nonce
  3. Listed outcomes (“Democrat_win”, “Republican_win”, “other”)

Nicolas and I entered into a DLC together that settles when the OutcomeObserver tweets a signature indicating which outcome occurred in real life. It is important to note there is no requirement for participants in a DLC to interact directly with the oracle.

We followed the Contract Negotiation protocol as specified and generated a funding transaction that locked our funds into a 2-of-2 multisignature output on the bitcoin blockchain. I used the bitcoin-s wallet, while Nicolas used NDLC which can be incorporated into the BTCPayServer suite of products. The funding transaction can be viewed here. This output could only be spent with joint authorization from both of us, or the OutcomeObserver broadcasting a signature. If you still have questions about what a DLC is please see our first blog post in our intro to Discreet Log Contract series.



On 2020-11-24, the OutcomeObserver broadcasted his signature corresponding to the case of “Democrat_win” via tweet.

The key piece of information in this tweet is


Using these 32 bytes that represent a signature of the “Democrat_win” message from the original bet, I can move funds from the 2-of-2 multisignature output into my own cryptocurrency wallet. On 2020-11-24 I claimed those funds, you can see the bitcoin transaction here. If you would like a detailed explanation of this process, please see our previous blog post on DLCs with adaptor signatures.

Settling a DLC is a non-interactive process. What I mean by that is I did not have to collaborate with Nicolas to claim my funds, or for that matter, I did not have to communicate directly with the OutcomeObserver. The OutcomeObserver can publish two tweets which can allow private users to transfer potentially millions of dollars in bitcoin. This is what makes DLCs an extremely powerful primitive for future DeFi protocols based on Bitcoin.

One of the original reasons Nicolas wanted to use the bitcoin blockchain for the bet was to retain price exposure to bitcoin for the duration of the bet.

While Nicolas may not have picked the correct outcome of the election, he most certainly was correct in bitcoin mooning while the bet was on going.

On 2020-09-08 — the day we entered the DLC — the bitcoin price was approximately $10,000. On 2020-11-24 — the day I executed the settlement of the DLC — the bitcoin price was approximately $19,000.

This means on top of receiving 0.4 BTC for correctly predicting the outcome of the election, I also received the added benefit of profiting

0.4 * ($19,000 – $10,000) = $3,600

Solely from bitcoin price appreciation. If you are a long term believer in Bitcoin, DLCs are a great way to participate in financial speculation, while retaining bitcoin price exposure.

Even more interesting, you can actually compose DLCs to create a contract for difference to nullify bitcoin price exposure if you would like. This may be a topic for a future blog post.


Post comment