Glad to see this post. I have been following Miniscript for some time, and the static
analysis that is possible with Miniscript is particularly interesting to me.
Today, new Bitcoin applications such as JoinMarket, Wasabi wallet, and Arwen all
suffer from a problem of having novel bitcoin scripts. Bitcoin script is not easy to
analyze, and historically it has been difficult for me to get comfortable using these
applications because I have been unable to convince myself to have complete
confidence in the integrity of the transactions these applications want me to sign.
Well established applications can eventually overcome this issue for users by
getting sufficient expert review and commentary, however this proves as a
substantial barrier to entry in an ecosystem that is ideally as open as possible.
Miniscript can make a huge difference here. With Miniscript, it possible to create
hardware wallets that can perform static analysis on novel miniscripts and provide
the user with assurances about the nature of the transactions. A hardware wallet
with a Miniscript analyzer may not be able to tell you that a transaction is a
CoinJoin transaction, but it will be able to tell you that under all possible scenarios,
you end up with just as many coins in your addresses that you started with, modulo
some transaction fee.
This is a big deal for novel application writers, as it significantly reduces the barrier
for them to convince both themselves and others that the code they wrote does not
risk user funds being lost, especially if all transactions are being externally analyzed
and signed.
Miniscript is not of course a complete solution, for example it cannot solve all of the
high-risk edge cases that are present in the lightning network, but it is a big step
forward and I believe that widespread use of Miniscript would be a huge boon to the
Bitcoin ecosystem.