OP_CHECKCONTRACTVERIFY and its amount semantic

Posted by salvatoshi

Mar 17, 2025/18:49 UTC

In the realm of CCV-based state machines, it's notable that output scripts often appear as completely distinct from their input counterparts. However, a method exists to achieve congruence between input and output scripts by applying CCV processes to both ends. This technique is exemplified in the construction of vaults, particularly for scenarios involving partial revaulting, showcasing its feasibility across various outlined variations. The exception lies within the "Fan-out" scenario, which necessitates an introspective approach towards the distribution of output amounts to maintain its logical coherence.

When delving into transactions characterized by a singular OP_CCV input and output, questions surrounding fee management arise. In such instances, the integration of an anchor output, followed by CPFP (Child Pays for Parent) strategies, emerges as a viable solution. Importantly, CCV does not impose restrictions on non-introspected inputs and outputs, allowing for the allocation of dedicated inputs for fees and separate outputs for change. Alternatives extend to leveraging anchor outputs, package relay, or other mechanisms that align with existing relay policies, thereby offering flexibility in handling transaction fees.

Furthermore, the concept of utilizing a "deduct" feature presents itself as an additional avenue for fee allocation. This enables a portion of the OP_CCV amount to be repurposed for fee payment without contravening covenant constraints. Consequently, the handling of fees within the CCV framework can effectively accommodate either exogenous fees or the use of anchors, underscoring the inherent adaptability of covenant constructions to facilitate fee management.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback