What is the Policy and associated Miniscript that is used by this wallet?
The Policy it uses is:
or(9@pk(primary),1@and(older(X),pk(recovery)))
To run it through sipa's Miniscript C++ compiler on his site you need to substitute X
for a particular number for the timelock e.g. 12960
is approximately 90 days in number of blocks.
or(9@pk(primary),1@and(older(12960),pk(recovery)))
The resulting Miniscript from the C++ compiler is:
or_d(pk(primary),and_v(v:pkh(recovery),older(12960)))
The resulting Miniscript from the Rust compiler is the same (to be confirmed).
Why would I use this Policy?
In comparison to a 1-of-1 multisig this Policy gives you the extra protection of a recovery key in case you lose your primary key. In comparison to a 2-of-2 multisig or a 2-of-3 threshold this Policy is easier to spend from as you don't need to generate two signatures from two independent signers. In comparison to a 1-of-2 threshold this Policy prevents the recovery key being used until after the timelock in case the security around your recovery key isn't as strong as the security around your primary key.
What is fixed and what is configurable by the user?
The timelock can obviously be changed but this wallet isn't intended to support the user creating their own Policy. Apparently you can substitute multi keys instead of the single keys too (to be confirmed)
Does it support Taproot?
No. The use of Miniscript within a tr()
descriptor is not yet spec'ed at the time of writing (February 20th 2023). There is some discussion on this gist for some of the proposed changes to Miniscript to do this.
Thanks to darosior for answering some of this on IRC.
This was also discussed with NVK on Twitter in May 2023. Essentially this Policy is only useful if you can detect that the backup key has been leaked. If you detect your backup key has leaked you have until the timelock expires to move your funds to a different address before the attacker can use your backup key. Without the timelock the attacker could use the backup key immediately once it was leaked.
If you can't detect that the backup key has been leaked (or don't regularly cycle through backup keys) then you'll end up in a race with the attacker to get a transaction confirmed onchain once the timelock expires.