协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
bitcoin-dlcs【开发与工程】Discreet Log Contracts: smart contracts on Bitcoin via oracle attestations + adaptor signatures. Oracle publishes nonces upfront, reveals signed outcomes; CETs (Contract Execution Transactions) enforce payouts. No on-chain footprint of the contract logic. USE WHEN: building betting / prediction markets, parametric insurance, derivatives, oracle-drive…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
DLCs let two parties bet on real-world outcomes (price, sports, weather) with on-chain settlement, without revealing contract terms on chain. The oracle never knows about the bet; the chain only sees a 2-of-2 multisig + a CET that looks like an ordinary cooperative spend.
Original 2017 paper: Tadge Dryja. Wire format and transaction
construction come from github.com/discreetlogcontracts/dlcspecs,
which still labels itself an "In Progress Specification" and has not
merged a change to master since February 2023 — see Standardization
below before treating any of it as a moving target.
Oracle setup (one-time):
P_oracle.R_event = k * G in
advance.s_outcome such that
s_outcome * G = R_event + e_outcome * P_oracle where
e_outcome = H(R_event, outcome_label).Funding (party setup):
(outcome → (a, b)).T_outcome = R_event + e_outcome * P_oracle.Settlement:
s_outcome for the actual outcome.s_outcome and broadcasts.Refund (timeout):
For continuous outcomes (e.g., BTC price ∈ [0, 100k]), oracle uses
multi-nonce attestation: publishes one R_i per bit / digit of
the outcome. Parties pre-sign CETs covering ranges of bit patterns.
CET count grows with precision:
| Property | DLC | HTLC | LN PTLC |
|---|---|---|---|
| On-chain footprint | 1 funding + 1 settlement | 1 setup + 1 redeem | LN channel update |
| Oracle/preimage | external oracle attestation | internal preimage | internal point |
| Outcome space | discrete or numerical | binary (revealed/not) | binary |
| Atomicity | enforced via adaptor sigs | enforced via hash | enforced via point |
github.com/discreetlogcontracts/dlcspecs defines:
Wire protocol uses Lightning-style TLV messages over Tor / clearnet.
Status (as of September 2026): the spec is a de-facto standard
frozen at its early-2023 state. The newest commit on master is
9cd9148 "Correct Typo in Signature Point calculation" (2023-02-13);
the README still describes a work-in-progress draft with an unfinished
v0 milestone, and 43 issues are open. No DLC BIP has ever been filed —
the bitcoin/bips index contains no entry for DLCs or discreet log
contracts as of September 2026. The repo is not archived and 22 pull
requests are open, six of them updated with new commits or comments in
March 2026, but nothing has merged in over three years. Everything the
README lists as "Future Work" — DLC transfers/updates, option-style
DLCs, Taproot DLCs, DLC construction inside Lightning — remains
unspecified. Treat the 2023 documents as the interop contract and
cross-check field-level details against a live implementation rather
than waiting on spec updates.
Maintenance state as of September 2026:
rust-dlc (p2pderivatives org, by Crypto Garage) — most
complete Rust stack, but slow-moving.
dlc-manager orchestrates the funding/CET/refund tx chain,
dlc-trie covers numerical contracts, dlc-messages the wire
format.rust-bitcoin, bdk.master. The repo carries git tags but
has published no GitHub releases.bitcoin-s (Suredbits) — Scala; dlc-wallet, dlc-oracle and
dlc-node modules. The most actively maintained full node-plus-DLC
stack; 1.9.12 released 2026-03-21.node-dlc (Atomic Finance) — TypeScript; v1.2.1 (July 2026),
still taking feature work.cfd-dlc (Crypto Garage) — C++ library with a JS wrapper, used
by the P2PDerivatives client. Last pushed February 2023; dormant.NDLC (Nicolas Dorier) — C# implementation intended for
BTCPayServer. Last pushed January 2021; abandoned.Earlier revisions of this skill also listed dlc-protocol (DLC.dev,
Python), dlc-tools (JS/TS) and DLCKit (Bitfinex iOS). None of the
three could be located in September 2026: no matching repositories
surface in a GitHub search, dlc.dev does not respond, and none appear
in the dlcspecs implementation list. Treat them as gone.
Earlier revisions of this skill paired "Lava / Atomic Finance" here as
live DLC apps; both halves are stale as of September 2026. Lava's CEO
stated in November 2025 that Lava "no longer uses DLCs … for loans
because the technology doesn't meet our security standards", and
reporting that month described collateral moving to a custodial
cold-storage model — though lava.xyz again markets loans as "fully
Bitcoin-collateralized and self-custodial" as of September 2026, with
no mention of DLCs anywhere on the page. Atomic Finance sunset its own
consumer app in 2025 and atomic.finance no longer resolves, but its
node-dlc library is still maintained (see Implementations).
e_outcome derivation).