🎉 [Gate 30 Million Milestone] Share Your Gate Moment & Win Exclusive Gifts!
Gate has surpassed 30M users worldwide — not just a number, but a journey we've built together.
Remember the thrill of opening your first account, or the Gate merch that’s been part of your daily life?
📸 Join the #MyGateMoment# campaign!
Share your story on Gate Square, and embrace the next 30 million together!
✅ How to Participate:
1️⃣ Post a photo or video with Gate elements
2️⃣ Add #MyGateMoment# and share your story, wishes, or thoughts
3️⃣ Share your post on Twitter (X) — top 10 views will get extra rewards!
👉
OP-DLC 2: Optimizing the Optimistic Challenge Mechanism of DLC Contracts
OP-DLC 2: The truth is always simple
DLC(Discreet Log Contract) is a contract execution framework based on oracles proposed by Tadge Dryja from MIT in 2018. It allows both parties to make conditional payments based on predefined conditions, executing payments through pre-signed agreements and oracle-signed results. DLC enables new decentralized financial applications while ensuring the security of Bitcoin deposits.
The previous text summarized the advantages and challenges faced by DLC, and proposed some optimization solutions. However, due to the multi-party involvement in DLC, the defense strategies are relatively complex and lack simplicity.
In the Bitcoin system, all actions are implemented through UTXO. As long as the UTXO is correct, it can defend against any attacks. Similarly, in DLC, all actions are implemented through CET(Contract Execution Transaction). Therefore, using the optimistic challenge mechanism to ensure the CET is correct can defend against any attacks.
Specifically, the oracle must stake 2 BTC to sign CET. An optimistic challenge mechanism is added to CET. If CET is not challenged or successfully responds to a challenge, it is considered correct and completes settlement, allowing the oracle to withdraw the stake and receive a fee. If the oracle attempts to act maliciously, anyone can successfully challenge, and the CET will not be settled, resulting in the oracle losing the stake and being unable to sign for the same CET again. This design is simple and effective.
DLC Principle
Taking Alice and Bob betting on the parity of the ξ-th block hash value as an example to illustrate the principle of DLC:
Capital Injection Transaction: Alice and Bob each lock 10 BTC into a 2-of-2 multisig output.
Build CET: Create two CETs for spending injection transactions.
The oracle computes commitments and generates signatures.
Settlement: The oracle signs the corresponding CET based on the block hash.
Withdraw: The winning party calculates the new private key and spends the locked funds.
Research has found that simply using an optimistic challenge mechanism to ensure CET is correct can withstand any attacks. Incorrect CETs will be challenged and not executed, while correct CETs will be executed. At the same time, oracles must pay a price for malicious behavior.
OP-DLC 2
The OP-DLC includes the following provisions:
The oracle is composed of alliances, and any member can sign CET. A pledge of 2 BTC is required to sign.
If the oracle behaves maliciously, anyone can initiate a challenge.
The CET signed honestly can be settled after 1 week, and the oracle will receive rewards.
Anyone can challenge the Oracle_sign.
The challenge is permissionless, and anyone can oversee the execution of the contract.
Advantages:
Disadvantages:
Conclusion
OP-DLC introduces an optimistic challenge mechanism to CET, ensuring that erroneous CETs are not settled and malicious oracles are penalized, while correct CETs are executed and honest oracles are rewarded. This simple yet effective design can resist various attacks.