🎉 Gate xStocks Trading is Now Live! Spot, Futures, and Alpha Zone – All Open!
📝 Share your trading experience or screenshots on Gate Square to unlock $1,000 rewards!
🎁 5 top Square creators * $100 Futures Voucher
🎉 Share your post on X – Top 10 posts by views * extra $50
How to Participate:
1️⃣ Follow Gate_Square
2️⃣ Make an original post (at least 20 words) with #Gate xStocks Trading Share#
3️⃣ If you share on Twitter, submit post link here: https://www.gate.com/questionnaire/6854
Note: You may submit the form multiple times. More posts, higher chances to win!
📅 July 3, 7:00 – July 9,
In-depth Analysis of DLC Technology Principles: Optimizing Solutions to Crack the Oracle Machine Trust Problem
Discussion on DLC Technical Principles and Optimization Solutions
1. Introduction
The Discrete Logarithm Contract ( DLC ) is a Bitcoin contract execution scheme based on oracles, proposed by Tadge Dryja from MIT in 2018. DLC allows both parties to make conditional payments based on predefined conditions, where participants pre-sign potential outcomes and execute payments when the oracle signs the result. This enables DLC to realize new decentralized financial applications on Bitcoin while ensuring the safety of deposits.
Compared to the Lightning Network, DLC has the following advantages:
However, there are still some issues and risks with DLC:
This article will explore the principles of DLC and propose some optimization solutions to address the aforementioned issues.
2. DLC Principle
Taking the example of Alice and Bob signing a betting agreement, the wager is the parity of the hash value of the n+k block. If odd, Alice wins; if even, Bob wins.
Initialization:
Funding Transaction: Alice and Bob each lock 1 BTC into a 2-of-2 multisig output.
Contract Execution Transaction: Create two CET for spending capital injection transaction.
Oracle promises: R := k·G S := R - hash(OddNumber,R)·Z S' := R - hash(EvenNumber,R)·Z Broadcast (R,S,S')
Alice and Bob calculate the new public key: PK^Alice := X + S PK^Bob := Y + S'
Settlement: Odd result: s := k - hash(OddNumber,R)·z Even result: s' := k - hash(EvenNumber,R)·z
Withdraw Alice's new private key: sk^Alice := x + s Bob's new private key: sk^Bob := y + s'
3. DLC Optimization Plan
3.1 Key Management
The oracle key management faces the following risks:
Suggestion:
3.2 Decentralized Oracle
Implementing decentralized oracles using Schnorr threshold signatures has the following advantages:
3.3 Decentralization and Key Management Coupling
Decentralized oracles cannot directly use BIP32 to derive keys. A distributed key derivation method can be employed:
The private key shard z_i and the complete private key z satisfy the Lagrange interpolation relationship: z = Σ(z_i · λ_i)
The interpolation relation is still satisfied after increasing the derived increment ω: z + ω = Σ((z_i + ω) · λ_i)
Each participant can derive a child private key shard z_i + ω.
But the difference between enhanced and non-enhanced BIP32 needs to be considered.
3.4 OP-DLC: Trust Minimization of Oracles
Propose OP-DLC solution:
Advantages:
3.5 OP-DLC + BitVM Dual Bridge
Combine OP-DLC with BitVM:
4. Conclusion
DLC combines technologies such as Taproot and BitVM to enable more complex off-chain contract verification and settlement. The OP challenge mechanism allows for minimal trust in oracles, providing new possibilities for the development of DLC.