Miden rebuilt everything from scratch! In order to understand it, we need to revisit the basics. Let’s talk about one of the most fundamental pieces of bitcoin: The UTXO model It goes back to Hal Finney’s proposed Reusable Proofs of Work proposal. 1/13
Normally POW tokens can’t be reused because that would allow them to be double-spent. But RPOW allows for a limited form of reuse: sequential reuse. This lets a POW token be used once, then exchanged for a new one, which can again be used once, then once more. The sequential reuse allows to reuse tokens while preventing double-spending. 2/13
The concept has parallels to spending cash and getting change back. - Bob buys coffee with a $20 paper bill (Bob spent UTXO 1) - Alice keeps $15 (new UTXO 2 created for Alice) - Alice returns $5 (new UTXO 3 created for Bob) The UTXO1/$20 bill is spent and it cannot be spent again. Now Alice can spend $15 and Bob $5 in the form of new UTXOs. 3/13
- Every txs has at least one input and one output. - Each input spends the satoshis paid to a previous output. - Each output then waits as an UTXO until a later input spends it. Each output can be in one of two states - spent or unspent. If it hasn't been used, it's unspent, in contrast, once an output has been used in a tx, it becomes spent. 4/13
A wallet doesn’t actually "store" bitcoins in the way a physical wallet holds cash. Instead, bitcoins are recorded on the public ledger which keeps track of all txs across the network. The wallet simply uses private keys to sign transactions, which is a cryptographic way of saying, "I authorize the transfer of these bitcoins." 5/13
A script hash is a piece of data that represents the conditions under which a certain amount of Bitcoin can be spent. It is typically associated with a UTXO and is encoded in a scripting language known as Bitcoin Script. 6/13
A script is like a set of rules attached to each Bitcoin UTXO describing how the next person can get access to the bitcoins. To spend the Bitcoins, you need to provide: - A public key that, when hashed, matches the destination address in the script. - A signature to prove you own the private key linked to the provided public key. 7/13