MAST (Merkelized Abstract Syntax Tree)
A Bitcoin scripting technique that lets a transaction commit to many possible spending conditions while revealing only the one actually used, improving privacy and efficiency.
A Merkelized Abstract Syntax Tree organizes a Bitcoin transaction's possible spending conditions as a Merkle tree (see Kaavon's "Merkle Tree" glossary definition), committing on-chain only to the tree's root rather than every individual condition. When the funds are later spent, the spender reveals only the single branch and specific condition actually used, along with a proof that it belongs to the committed tree, rather than revealing every other possible spending path that was never used.
This improves both privacy and efficiency compared to listing every possible spending condition directly in the original transaction: outside observers can't tell from the initial transaction how many alternative spending paths existed or what they were, and the amount of data that ever needs to be published on-chain stays small regardless of how many conditions were defined. MAST is one of the key technical building blocks behind Taproot (see Kaavon's "Taproot" glossary definition), which combines it with Schnorr signatures (see Kaavon's "Schnorr Signature" glossary definition) to make complex spending conditions look indistinguishable from simple ones on-chain.
Examples
- A multisig arrangement using MAST can define many alternative signing conditions upfront, while only revealing the specific condition actually used whenever the funds are eventually spent.
- MAST keeps on-chain data small and private by requiring only the used spending path and its Merkle proof to be revealed, rather than every possible condition that was ever defined.