Coins Are Locked With Scripts
Every UTXO has a small program, a locking script, that says what is needed to spend it. To spend, you provide an unlocking script that satisfies it.
Pay to Public Key Hash (P2PKH)
- Check that the public key hashes to the stored hash
- Check that the signature is valid for that public key
- Script runs on a stack. It is not Turing complete, which keeps it simple and safe
Multisignature (Multisig)
- Needs M of N signatures, for example 2 of 3
- Use cases: company treasury, shared savings, escrow, and safer personal backup (keys in different places)
- One stolen key is not enough to steal funds
Timelocks
Scripts can say 'this coin cannot be spent before block 900,000 or date X'. Useful for inheritance plans and payment channels.
Upgrades in One Line Each
| Upgrade | Purpose |
|---|---|
| SegWit | Separates signature data, fixes transaction malleability, lowers fees, enables Lightning |
| Taproot | More privacy and flexibility for complex scripts, using Schnorr signatures |
Lightning Network (Layer 2)
Bitcoin's base layer is slow by design. Lightning lets people make many fast, cheap payments off-chain.
- Two people open a channel by locking coins in a 2-of-2 multisig on-chain
- They send many signed updates between them, instantly and almost free
- When finished they close the channel, and only the final balance is written on-chain
- Payments can route through other nodes, so you need not open a channel with everyone
Wallet Types in Bitcoin
| Type | Note |
|---|---|
| Full node wallet | Verifies everything itself. Most private and trustless |
| Light (SPV) wallet | Asks servers for data. Lighter, some trust needed |
| Hardware wallet | Keys stay in a safe device |
| Custodial app | Company holds keys |
Practice
- What does a locking script do?
- Why is 2-of-3 multisig safer than one key?
- Why does Lightning make small payments cheaper?
Conclusion
Bitcoin coins are locked by simple scripts, multisig adds shared control and Lightning adds fast cheap payments on top of the main chain.

