Mast-LN made cheaper

sames(66)
Published in
#bitcoin
Words
612
Reading
3 min
Listen
Play
8y

image.png

Well Schnorr signatures is coming really soon to the real Bitcoin(BTC) in the near future. The BIP is out and now just for testing to be done.

Now to talk about another scalability feature of Bitcoin that will be coming after Schnorr.

MAST

Mast is short for Merklized Abstract Syntax Tree .

As you know Bitcoin main scalability plan involves the LN.

However the LN still needs onchain transactions. Schnorr and MAST(used with Segwit) provide discounts to opening/closing LN channels(Onchain Txs).

So how does Mast work?

Let's say you have a script address (P2SH) with multiple conditions on how funds can be spent like: if CONDITION1 or CONDITION2 or CONDITION3, where just one of them is necessary to spend the funds.

Before MAST, when you submit a transaction to the bitcoin network, you need to include the whole "redeem script" detailing all the conditions. The more branches/conditions there is in the script the more space it takes, so the more expensive the fee is.

With MAST, let's say if you spend funds only according to the rules of "CONDITION2", you only need to include the part of the script detailing that condition + a "proof" that the instructions of "CONDITION2" are included in the script hash (i.e. the address). As a result the transaction will take much less space than including the whole script.
image.png

An example of usage that would benefit from that is Lightning Network transactions, where the contracts have multiple conditions (oversimplified: spend IF specific hash provided OR if a specific time has elapsed...).

Increased Privacy

This info mostly came from https://bitcointechtalk.com/what-is-a-bitcoin-merklized-abstract-syntax-tree-mast-33fdf2da5e2f

if all you saw was the other branch (above, right example), you wouldn’t know that the funds were spendable before the timeout or that a single person (Alice) could spend them. Again, you might guess that there were other conditions, but you couldn’t be sure just by looking at the blockchain.
image.png

With just this information, you wouldn’t know whether or not anyone besides the owner could access the funds or what conditions might restrict their spending. You might guess from the use of MAST that there were other conditions, but that would be only a guess — the owner Alice might be just pretending to have other spendable parts of her merkle tree.

Alternatively, if all you saw was the other branch (above, right example), you wouldn’t know that the funds were spendable before the timeout or that a single person (Alice) could spend them. Again, you might guess that there were other conditions, but you couldn’t be sure just by looking at the block chain.

Anything that makes it easy to identify particular users also makes it easy to treat their bitcoins differently than other people’s bitcoins, called a lack of fungibility. If someone knows what Alice’s encumbrances look like, they can bribe or force miners not to mine those transactions in order to prevent Alice from spending her bitcoins.

MAST alone can’t entirely fix this because Alice (or Bob and Charlie) still need to reveal part of the encumbrance when Alice’s bitcoins are spent, but it is possible that many different complex encumbrances can be resolved down to a smaller number of simple MAST-style encumbrances.

For example, Alice’s default spend looks like the default spend for any transaction where just a single signature is required, so Alice’s MAST-based transactions blend in with other MAST-based single-signature transactions. This returns Alice’s privacy and increases both her fungibility and the fungibility of everyone else who uses MAST-based encumbrances that can be satisfied by a single signature.
image.png

And that is why MAST is super cool.
If you want to read a complete overview of MAST go to here:
https://bitcointechtalk.com/what-is-a-bitcoin-merklized-abstract-syntax-tree-mast-33fdf2da5e2f