This is a draft for a consensus change enabling on-chain vaults, as detailed in the BIP: https://github.com/bitcoin/bips/pull/1421
In short, it introduces two opcodes, OP_VAULT
and OP_UNVAULT
, that facilitate constructing vaults which
- allow multiple deposits,
- allow partial unvaultings and recursive re-vaults,
- allow batch operations (recoveries and unvaultings) using vaults with compatible parameters,
- support dynamic withdrawal target specification, and
- support robust fee management.
For the last item, the proposal has a hard dependency on package relay and ephemeral anchors.
The code as-written here lacks specific activation mechanism, and there’s probably some policy/wallet stuff missing, but in substance it is implemented and comes with some interesting functional tests.