Discreet Log Contracts (DLCs)
Discreet Log Contracts (DLCs) enable Bitcoin smart contracts that depend on external data (oracles) without revealing contract details on-chain until execution.
DLCs are smart contracts that:
- Use oracles: Depend on external data (prices, events)
- Privacy-preserving: Contract terms hidden until execution
- Trustless: No need to trust oracle (uses adaptor signatures)
- Bitcoin-native: Work on Bitcoin blockchain
How DLCs Work
Oracle Attestation
1. Oracle signs outcome data
2. Signature reveals outcome
3. Contract parties use signature
4. Contract executes based on outcome
Adaptor Signatures
DLCs use adaptor signatures:
Adaptor Signature:
- Pre-commits to outcome
- Reveals outcome when used
- Enables trustless oracle integration
Use Cases
Prediction Markets
Example:
- Contract: "Bitcoin price > $50,000 on Jan 1"
- Oracle: Provides price data
- Outcome: Funds go to correct party
Derivatives
Example:
- Contract: Price difference payment
- Oracle: Provides reference price
- Settlement: Automatic based on price
Insurance
Example:
- Contract: Weather-based insurance
- Oracle: Provides weather data
- Payout: Automatic if conditions met
Code Examples
Creating a DLC
Oracle Providers
Types of Oracles
- Single Oracle: One data source
- Multi-Oracle: Multiple sources, consensus
- Decentralized Oracles: Distributed data sources
Trust Model
Oracle Trust:
- Oracle provides data
- Parties trust oracle accuracy
- Adaptor signatures prevent oracle from stealing
- Oracle can't change outcome after signing
Limitations
Current State
- Early stage: Active development
- Limited tooling: Few user-friendly implementations
- Oracle dependency: Requires trusted oracles
- Complexity: Technical knowledge required
Challenges
- Oracle reliability: Need trustworthy data sources
- Contract complexity: More complex than simple payments
- Adoption: Limited awareness and usage
Related Topics
- Smart Contracts - Bitcoin scripting
- Timelocks - Time-based conditions
- Taproot - Better privacy for contracts
