What is the Singleton covenant pattern in Kaspa?

The Singleton pattern is a special covenant rule in Kaspa that guarantees exactly one authorized output is produced per transition, keeping precisely one UTXO with a given covenant ID in the UTXO set at all times. In Kaspa, a UTXO (unspent transaction output) is the basic unit of value — think of it as a locked box of coins with rules about who can open it. A covenant adds extra conditions on how that box can be spent and what new boxes must be created when it is. The Singleton pattern tightens that further: every time the covenant transitions, only one new output is permitted, so the system can never accidentally create two copies of the same state. This matters for beginners because it means applications like zk-based rollups or app covenants built on this pattern always have a single, unambiguous source of truth on-chain — duplication of state is architecturally impossible.

Learn more ›