How do Kaspa covenants control how a UTXO can be spent?

A Kaspa covenant is a script that controls not just who can spend a UTXO, but how it must be spent. In a standard transaction, a script usually only verifies a signature proving ownership. Kaspa covenants go further: by combining introspection opcodes with OP_CAT and OP_SUBSTR, a script can inspect the transaction itself and enforce rules about what the output must look like — for example, requiring that every spend sends the new UTXO back to the same script address and includes an incremented counter value. This matters because it means Kaspa can enforce complex spending rules entirely on-chain without any external coordination or separate smart contract system.

Learn more ›