# Basic vault prototype using OP\_CAT

**URL:** <https://delvingbitcoin.org/t/basic-vault-prototype-using-op-cat/576>\
**Category:** Protocol Design\
**Created:** [February 15, 2024, 10:13pm UTC](https://delvingbitcoin.org/t/basic-vault-prototype-using-op-cat/576 "2024-02-15T22:13:48Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![dgpv](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/dgpv/32/75_2.png) [@dgpv](https://delvingbitcoin.org/u/dgpv)\
**Post date:** [April 12, 2024, 5:45pm UTC](https://delvingbitcoin.org/t/basic-vault-prototype-using-op-cat/576/12 "2024-04-12T17:45:07Z")

</div>

> [@dgpv](#):
>
> There could also be other complications on the ‘complete withdrawal’ phase, but I did not analyze it yet

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.

---

_[View the full topic](https://delvingbitcoin.org/t/basic-vault-prototype-using-op-cat/576)._
