# OP\_CHECKCONTRACTVERIFY and its amount semantic

**URL:** <https://delvingbitcoin.org/t/op-checkcontractverify-and-its-amount-semantic/1527>\
**Category:** Protocol Design\
**Tags:** softfork, bitcoin-core\
**Created:** [March 17, 2025, 5:57am UTC](https://delvingbitcoin.org/t/op-checkcontractverify-and-its-amount-semantic/1527 "2025-03-17T05:57:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![instagibbs](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/instagibbs/32/28_2.png) [@instagibbs](https://delvingbitcoin.org/u/instagibbs)\
**Post date:** [March 17, 2025, 1:42pm UTC](https://delvingbitcoin.org/t/op-checkcontractverify-and-its-amount-semantic/1527/2 "2025-03-17T13:42:37Z")

</div>

Thanks for finally writing a real life BIP!

Given the value forwarding piece is the most bike-sheddy part, I’m going to pick on that for now.

> [@salvatoshi](#):
>
> (however, this would likely require a `CHECKSIG` or additional introspection on the exact amount going to X, which `CCV` alone can’t provide).

An alternative, which IIRC I proposed for OP\_VAULT, was having explicit ability to introspect the (aggregate) output amounts.

Something like:

1. OP\_IN\_AMOUNT: pushes input amount on stack
2. CCV with value introspection: takes value off stack (can be \>4 bytes), allocates to an output, and pushes residual of input back on stack, where residual is always the full amount minus the specified amount

This way value forwarding is always explicit when desired, no there’s no default/deduct mode split, you can do math checks on the values (below a certain value), rate-limiting / collateral is pretty straight forward. Obviously it has downsides including that Bitcoin Script math is probably more footgun than feature in practice… but muh GSR?

---

_[View the full topic](https://delvingbitcoin.org/t/op-checkcontractverify-and-its-amount-semantic/1527)._
