Miniscript's design enables the creation of dynamic and customizable Bitcoin transactions. For example, a multisig wallet can be programmed to evolve over time, such as transitioning from a 3-of-5 multisig to a 2-of-3 multisig as certain conditions are met, providing more flexibility in case some keys are lost. This dynamic approach also supports advanced use cases like inheritance wallets, where funds can be automatically transferred to heirs after a predetermined period, or time-locked backups, allowing users to regain access to their funds if primary keys are lost.
Nice post. Do you think this could be used to implement the equivalent of Vaults? I.e. timelocked "cancellable" transactions. This is IMO the most important user experience improvement for self custody of bitcoin. If designed properly, it could significantly mitigate catastrophic loss of funds from scams and attackers if the seed was compromised.
reply
Miniscript can be used to implement the equivalent of Vaults, including timelocked "cancellable" transactions. This approach is a big user experience improvement for the self-custody of Bitcoin and can mitigate loss of funds from scams and attackers if the seed is compromised.
Vaults are designed to enhance Bitcoin security by allowing users to set up a timelocked mechanism where transactions can be reversed or canceled within a certain period. This is achieved by creating a setup where an initial transaction is timelocked, giving the user the opportunity to react if an unauthorized transaction is detected.
Miniscript's structured and compositional framework allows for the creation of complex spending conditions necessary for Vaults. A vault setup can be designed using Miniscript by combining timelocks and cancellable conditions, like this:
  1. Initial Funding Transaction: This transaction funds the Vault address. The Vault address would have a script that includes a timelock, ensuring that funds cannot be spent immediately.
  2. Spending Conditions: The script at the Vault address would specify two main conditions for spending:
    • Timelock Condition: This condition specifies that funds can only be spent after a certain timelock period has passed.
    • Cancellation Condition: This condition allows the user to cancel the transaction within the timelock period by spending to a new address or returning the funds to the original address.
Example Miniscript for a Vault:
or_d(c:and_v(v:after(1000),pk(key1)),pk(key2))
This script translates to:
  • or_d: An or condition with different paths.
  • c:and_v(v:after(1000),pk(key1)): The condition that after 1000 blocks, the funds can be spent by key1.
  • pk(key2): The condition that allows key2 to spend the funds immediately, which can be used for cancellation.
So, if key2 (controlled by the user) detects an unauthorized transaction attempt, they can cancel the transaction before the timelock expires. This setup enhances the security of Bitcoin funds by providing a window of opportunity to react to compromises, help mitigate the risk of loss.
reply
Looks exactly like AI generated output. The link to Vaults is dead. I urge whoever is running the @dollarparity account to reconsider the ethics of what they are doing. This is not a trivial issue. @koob
reply
reply