UTXO model
Tokens on Spark work like Bitcoin. You have outputs. To spend, you consume outputs and create new ones. Math has to balance. Inputs equal outputs.TTXOs
A TTXO (Token Transaction Output) is a single token holding. It contains:- Owner: Who can spend it
- Token: Which token (identified by a 32-byte identifier)
- Amount: How many
- Revocation commitment: For double-spend protection
- Withdrawal parameters: For L1 exit
Operators and threshold
Spark Operators validate and co-sign transactions. A threshold of operators must agree for any transaction to go through.| Operators | Threshold |
|---|---|
| 2 | 2 |
| 3 | 2 |
| 5 | 3 |
(n + 2) / 2 rounded down. This is majority, not 1-of-n.
What operators can do:
- Delay transactions by refusing to sign
- See transaction metadata
- Run watchtowers
- Move your tokens without your signature
- Steal your tokens (even if all collude)
- Block your exit to L1
Revocation
The key innovation. How do you prevent double-spending in an off-chain system? When you receive tokens, each output has a revocation commitment. This is a public key where the private key is split among operators via DKG. Nobody knows the full key. When you spend those tokens, operators release their key shares. Now you can reconstruct the full revocation key for those outputs. If you try to cheat by broadcasting old (spent) outputs to L1:- Watchtowers detect it
- They have the revocation key
- They sweep your funds
- You lose everything
DKG
Distributed Key Generation. How operators create shared secrets without any single party knowing the full secret. Operators pre-generate batches of keys where:- Each operator holds a share
- No single operator has the full private key
- Threshold cooperation is needed to reconstruct
Watchtowers
Services that monitor Bitcoin L1 for attempted double-spends. Each operator runs one. If someone broadcasts a revoked output:- Watchtower detects it
- Uses stored revocation key to sweep
- Cheater loses everything