Reviewed Aug 2026
DE
DA-05 · LESSON 03

BIP340 commitment hash

KEY DEFINITIONS

Terms used in this lesson

BIP340
The Bitcoin Improvement Proposal specifying Schnorr signatures for the secp256k1 curve.
Oracle
A system that reports outside information, such as a market price, for use by a protocol.
UTF-8
A standard variable-length byte encoding for Unicode text.
SHA-256
A cryptographic hash function used throughout Bitcoin to produce fixed-size 256-bit digests.
Collateral
An asset pledged against a debt; it can be used to cover the debt if agreed conditions are breached.

Wallet and oracle compute a tagged commitment over oracle key, network, base price, timestamp, and threshold price.

55 min Difficulty 4/5 Not started

Loading lesson visuals...

01

Learn the idea

A commitment fixes exact data before later use. Ducat uses BIP340-style tagged hashing for domain separation, meaning the same bytes cannot be confused with an unrelated hash context.

GUIDED EXPLANATION1/4 ideas inspected
1

Build the domain tag

Hash the UTF-8 tag ducat/price_contract_commit, then prefix the message with that tag hash twice.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionA commitment hash hides a price because hashes are encryption.

The commitment fixes the fields and resists substitution. Public low-entropy values may be guessed; secrecy comes from the separately derived threshold key.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.