Basic vault prototype using OP_CAT

the ‘complete withdrawal’ case must enforce input index = 0, too – otherwise you can take two input utxo that are in ‘trigger withdrawal’ state and use one as ‘contract input’ and second one as ‘fee-paying input’, and they can be from different vaults. The second utxo can then be drained to the miner as the fee.

1 Like