Skip to content

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

MAST (Merkelized Alternative Script Tree)

Network & Protocol

Definition

A Merkelized Alternative Script Tree, or MAST, is a way to lock bitcoin to many possible spending conditions while only ever revealing the one condition you actually use. It is a core component of the Taproot upgrade, specified in BIP341, and it builds on the Merkle-tree technique already familiar from how transactions are summarized inside a block.

How MAST works

Each alternative script a contract might use is hashed and placed as a leaf in a Merkle tree. The coins are committed to the single Merkle root of that tree, similar in spirit to a P2SH script hash but covering multiple scripts at once. To spend, the owner reveals only the specific script being used plus a short Merkle proof showing that script was part of the committed root.

Privacy and efficiency benefits

Because the unused branches stay hidden, observers never learn what other spending paths existed. A complex contract with many possible outcomes records only the executed outcome on-chain, rather than the full set of conditions. This shrinks transaction data, lowers fees, and improves privacy. Under Taproot, when the cooperative key-path spend is used, even the script tree itself can remain invisible, so a sophisticated contract looks like an ordinary payment.

MAST is one half of what makes Taproot powerful; the other half is the signature scheme. Read more on the Schnorr Signature that aggregates keys for the key-path spend, and on the Block Header whose Merkle root commits the transactions that ultimately carry these scripts.

In Simple Terms

A Merkelized Alternative Script Tree, or MAST, is a way to lock bitcoin to many possible spending conditions while only ever revealing the one condition…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Mining Glossary

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Compare Miners