🎲 Discreet Log Contracts (DLC)
DLCs allow parties to place bets directly on Bitcoin.
Let's say there are three people involved:
- Alice & Bob → Contract Makers
- Olivia → Oracle
Oracle = a trusted party who provides data from the outside world.
🪙 Game Setup
Alice & Bob bet on the outcome of a coin toss:
- Alice chooses “Heads”
- Bob chooses “Tails”
1. Contract Creation
They place their bet money in a 2-of-2 multisig (Funding Tx):
Each party sends 1 BTC.
The winner receives 2 BTC.
The winner receives 2 BTC.
2. Contract Execution Transactions (CETs)
They also create two commitment transactions, each representing a different outcome:
- CET 1: 2 BTC → “Heads” PubKey
- CET 2: 2 BTC → “Tails” PubKey
⚙️ Execution
Both CET 1 & 2 spend from the same Funding Tx.
The oracle determines that the result is “Heads.”
The oracle publishes the corresponding “Heads” signature.
Since the result is Heads:
- CET 1 is the valid transaction.
- 2 BTC go to the “Heads” PubKey.
Head_Pk = PubAlice + sheads * G
Because Alice chose “Heads,” she receives the 2 BTC.
🌐 Settlement
CET 1 is broadcast to the network,
and the winner (Alice) receives the 2 BTC.
and the winner (Alice) receives the 2 BTC.
Follow @bitcoin_devs for more Bitcoin technical explainers