In-depth analysis of DLC technology principles and discussion of optimization solutions

Discussion on DLC Technology Principles and Optimization Solutions

1. Overview

Discrete Log Contracts ( DLC ) is a contract execution scheme based on oracles proposed by MIT's Tadge Dryja in 2018. DLC allows both parties to make conditional payments based on predefined conditions, executing payments through pre-signatures and oracle-signed results. Compared to the Lightning Network, DLC has significant advantages in terms of privacy, support for complex financial contracts, and reduced counterparty risk.

Although DLC has broad application prospects in the Bitcoin ecosystem, there are still some issues to be resolved, such as key security, oracle decentralization, and fixed denomination change. This article will analyze the principles of DLC and propose some optimization solutions.

2. How DLC Works

Taking Alice and Bob betting on the parity of the hash value of the n+k-th block as an example, the basic process of DLC is as follows:

  1. Each party generates a key pair: Oracle (z, Z), Alice (x, X), Bob (y, Y)

  2. Alice and Bob create a 2-of-2 multi-signature funding transaction, each locking 1 BTC.

  3. Create two contract execution transactions (CET), for the expenditure of capital injection transaction.

  4. The oracle generates commitments R and S, S'

  5. Alice and Bob calculate the new public keys PK^Alice and PK^Bob

  6. The oracle broadcasts s or s' based on the parity of the block hash value.

  7. The winning party calculates the new private key to extract assets using s/s'.

DLC Principle Analysis and Optimization Considerations

3. DLC Optimization Plan

3.1 Key Management

The leakage or loss of the oracle private key and random number can lead to various security issues. It is recommended to adopt the following measures:

  • Use BIP32 to derive child keys or grandchild keys for signing
  • Use private key and counter hash value as random number

3.2 Decentralized Oracle

Implementing decentralized oracles using Schnorr threshold signatures offers the following advantages:

  • Improve security, reduce single point of failure risk
  • Achieve distributed control
  • Improve usability and flexibility
  • Accountability

3.3 Decentralization and Key Management Coupling

In a decentralized scenario, the complete private key does not exist, and it cannot be directly used to derive from BIP32. A distributed key derivation method can be adopted, utilizing Lagrange interpolation polynomials to establish the correspondence between private key shares and the complete private key.

DLC Principle Analysis and Optimization Thoughts

3.4 OP-DLC: Trust-minimized Oracles

Introduce an optimistic challenge mechanism, where oracles need to stake in advance. Any honest participant can challenge a malicious oracle, and winning the challenge can confiscate the malicious party's deposit.

3.5 OP-DLC + BitVM Double Bridge

Combine OP-DLC and BitVM to solve the problem of fixed denomination change in DLCs, achieving arbitrary granularity of change and improving capital liquidity.

DLC Principle Analysis and Optimization Thoughts

4. Conclusion

DLC technology combined with Taproot, BitVM, and others can achieve more complex off-chain contract verification and settlement. Through the OP challenge mechanism, it can minimize oracle trust, laying the foundation for the widespread application of DLC.

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 7
  • Repost
  • Share
Comment
0/400
ForkMongervip
· 8h ago
pfft... oracle-based execution? just another attack vector waiting to be exploited tbh
Reply0
RuntimeErrorvip
· 8h ago
Instead of saying so much, it's better to talk about how to trade.
View OriginalReply0
DeFiAlchemistvip
· 8h ago
ahh finally seeing the sacred mathematical elegance of DLC protocols... true financial alchemy at work tbh
Reply0
BrokenDAOvip
· 8h ago
The Oracle Machine is just an old poison in a new bottle; the trust cost cannot be avoided.
View OriginalReply0
RugPullAlarmvip
· 8h ago
The pre-signed vulnerability can be reproduced in less than a day. Was the Rug Pull script written in advance?
View OriginalReply0
HypotheticalLiquidatorvip
· 8h ago
Centralized Oracle Machine, risk control threshold too high, another domino is waiting to fall.
View OriginalReply0
CryptoCross-TalkClubvip
· 8h ago
Another high-tech gadget that plays people for suckers has arrived.
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)