A Calculus of Covenants



Summary:

The author of this post presents a framework for thinking about covenants in the context of building infrastructure for them. The focus is on local covenants, or those where only one coin is examined. A covenant primitive is defined as having a set of transaction intents, a verifier generator function, a prover generator function, impedance-matched proofs, and assumptions under which the covenant is verified. To instantiate a covenant, the user would pick a particular element of the set of sets of transaction intents and generate a verifier and a prover function. The post analyzes three covenants under this framework: CTV, 2-3 online multisig, and 3-3 presigned. The author also raises questions about the cardinality of an intent set, composition of different covenants inside an intent, and unrollability of intents. The framework assumes statelessness but acknowledges that provers may need to maintain some external state. The author notes that the efficiency of a prover or verifier is out of scope of this framework. Finally, the framework is useful for generating tooling that can integrate covenants into Sapio.


Updated on: 2023-06-15T19:00:50.666674+00:00