Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bitcoin-dlcs

БесплатноБез исполняемых скриптовНе проверен

Discreet Log Contracts: smart contracts on Bitcoin via oracle attestations + adaptor signatures. Oracle publishes nonces upfront, reveals signed outcomes…

claude-dev-suiteот claude-dev-suite★ 51 звезда на GitHub

Об этом скилле

Discreet Log Contracts (DLCs)

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.

Core mechanism

  1. Oracle setup (one-time):

    • Oracle has long-term key P_oracle.
    • For each event, oracle publishes nonce R_event = k * G in advance.
    • Oracle pledges: when event happens, publishes s_outcome such that s_outcome * G = R_event + e_outcome * P_oracle where e_outcome = H(R_event, outcome_label).
  2. Funding (party setup):

    • Alice and Bob agree on contract: payout function (outcome → (a, b)).
    • They pre-sign all possible CETs as adaptor signatures over each outcome's T_outcome = R_event + e_outcome * P_oracle.
    • Together they fund a 2-of-2 multisig output (the funding tx).
  3. Settlement:

    • Oracle publishes s_outcome for the actual outcome.
    • The party favored by that outcome adapts their pre-signed CET with s_outcome and broadcasts.
    • Settlement happens in a single tx, looking like a generic 2-of-2 spend on chain.
  4. Refund (timeout):

    • If oracle never publishes (event canceled), parties can refund via a CSV time-locked refund tx pre-signed during funding.

Why "discreet"

  • On chain, an observer sees: funding tx (2-of-2 multisig output), settlement tx (a regular spend). No contract terms, no oracle key, no payout structure.
  • Oracle never learns about the contract. Oracles can serve many unrelated DLCs from one event publication.

Numerical outcomes

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:

  • 0.1% precision over a 100k range → ~1000 CETs.
  • Modern DLC libraries use CET trees + adaptor combinator tricks to compress.

DLC vs other primitives

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

Standardization

github.com/discreetlogcontracts/dlcspecs defines:

  • Funding protocol.
  • CET construction.
  • Adaptor sig encoding.
  • Oracle attestation format.

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.

Implementations

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.
    • Integrates with rust-bitcoin, bdk.
    • v0.8.0 on crates.io, published 2025-12-13, which is also the date of the newest commit on master. The repo carries git tags but has published no GitHub releases.
    • Its own README says the library "has not been thoroughly tested in production yet", recommends "avoiding using it on main-net", and notes it "is not yet fully compliant" with dlcspecs. Do not bill it as production-grade on the strength of feature coverage alone.
  • 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
Полный SKILL.md на GitHub

Установить bitcoin-dlcs в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob

FAQ

Что делает скилл 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-driven settlements on Bitcoin.

Как установить скилл bitcoin-dlcs?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bitcoin-dlcs запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bitcoin-dlcs с