Toccata 101 · Part 1 · card 1
Kaspa does not keep your balance as a number. It keeps pieces, each with its own amount and its own lock. Your balance is their sum.
A Kaspa transaction creates outputs: pieces of KAS, each with an amount and a lock. A piece that no later transaction has spent is an unspent transaction output, a UTXO. This is what the network stores, not balances, UTXOs. The amounts a wallet sums are counted in sompi: 1 KAS is 100,000,000 sompi.
When you pay, the transaction consumes whole pieces and creates new ones: one for the receiver, and one back to you with what is left after the fee, that's your change. Your wallet shows one number because it adds up every piece your keys can unlock. A covenant is a lock on one piece. The other pieces in the same wallet stay ordinary, or live in their own covenants.
Open an address in the Kaspa explorer and look at its UTXO list: kaspa:qp3teqqzngwu48…fckj765g. You see pieces, each with an amount and the transaction that created it, not one number. This address holds the three pieces from above, 10, 2 and 0.5 KAS, sent to it on 8 September 2026 and left there.
In rusty-kaspa, an unspent output is a UtxoEntry: an amount in sompi, a script public key (the lock), the DAA score of the block that created it, and whether it came from mining (consensus/core/src/utxo/utxo_entry.rs). A transaction output carries a value and a script public key (consensus/core/src/tx.rs). SOMPI_PER_KASPA = 100,000,000 (consensus/core/src/constants.rs). Read at release v2.0.1.