Categories
.General Economics

Story of the Bitcoin Wallet

This is my impressionistic explanation of how the Bitcoin Wallet works and how it fits within the larger Bitcoin ecosystem.

There are 3 components to the Bitcoin core.  The Bitcoin core is the software or programmatic implementation of the Bitcoin software system.

1. Bitcoin Mining

2. Bitcoin Node

3. Bitcoin Wallet

Bitcoin miners compete for new bitcoin and to write to the blockchain.  They get paid for both functions.  When new bitcoin is created through “proof of work”, via solving mathematical problems, they can earn Bitcoin.  The same “proof of work” allows them the ability to write to the blockchain.  In the future when all Bitcoin has been mined, they will only be working and competing to write to the blockchain and earn transaction fees.

Imagine a room filled with super smart mathematicians taking tests.  Whoever completes a page first earns Bitcoin and/or has the privilege of writing the next entry to the Bitcoin blockchain and gets paid.

Imagine an auditor overseeing a ledger book.  His job is to confirm all entries are correct.  But he doesn’t make adjustments or entries.  That’s the job of miners.  Nodes verify the entries, miners verify and write to the big ledger.  Nodes help verify entries as well as relay entries to other Nodes that are keeping duplicate ledgers.  There are thousands of duplicate ledgers.  The job of the nodes or auditors is to make sure all these thousands of ledgers are identical.

Imagine a giant room filled with mathematicians solving complex math and there are ledger books in front of the room where the answers are written.

There are thousands of Nodes or auditors busily checking the entries and then copying these entries to thousands of other duplicate ledger books.  Every ledger book is an identical copy of each other.

You look around and notice busy clerks helping customers.  They are taking customer queries, orders and assignments.  Each clerk has their own small ledger book or Wallet.

Each wallet is unique and has its own special key.  Unless you have the passcode to the wallet, you can’t open it or see what’s inside it.  Wallets have the ability to communicate with the main big ledger.

Every Bitcoin mined is connected or associated to a Wallet.  There is an owner to every bitcoin, and every bitcoin is in someone’s wallet, which can’t be opened unless you have the pass code, master key, pass phrase, or seed phrase etc..

Anyone can create a wallet and have as many wallets as they please.  Each wallet has its own unique pass code.

Imagine going to the store and buying a leather wallet, and it’s preinstalled with a lock.  Much like a real combination lock with a preset code.  Every combination lock you buy already has the code built in.

Every Bitcoin wallet you create also has a built in pass phrase built in (based on the Bitcoin architecture).  Every new wallet you create, also comes with its own unique seed phrase or private key.

If every bitcoin is associated with a wallet, then in order for you to acquire bitcoin, someone who already has bitcoin, let’s say a miner, has to send you their bitcoin.

Broadly there are 3 kinds of Wallets:

1. Soft Wallets (Hot) or Digital Wallets (runs on your computer, mobile device, running on software)

2. Hard Wallets or Cold Wallets (runs from a device that’s not connected to a computer or the internet)

3. Paper Wallet (A piece of paper with your passphrase or seed phrase written on it)

Bitcoin wallets are programmed to generate private keys, public keys and pass phrases that are recognized by the bitcoin network.  Ethereum wallets generate keys that are compatible with Ethereum, Solana wallets follow the Solana protocol and so on.

Hot wallets and digital wallets are programs or apps that run on a desktop computer, laptop or your smartphone.  They are connected to the internet and can connect to Bitcoin Nodes in real time, checking your balance and verifying your bitcoin holdings in real time.

Hardware wallets or cold wallets are physical devices that may have a screen, and input ability.  May or may not be connected to the internet or a pc in real time.  Some may have the ability to connect to a pc or laptop via usb cable, wifi or bluetooth, but hardware wallets/cold wallets main goal is to be “offline” and “cold”.  If connected to the internet, it reduces their level of security.

Paper wallets are your seed phrases written on a piece of paper.  Your seed phrase alone can regenerate a new wallet and identify all your bitcoin holdings.

There are a number of software and mobile phone app wallets you can download, install and use.  You can retrieve an existing wallet or create a new wallet with a Bitcoin Wallet application.  If you want to recreate your old wallet, all you need is your master key or seed phrase.

When you create a new wallet, it will come with a seed phrase or master key, which is unique to that wallet.

Once you have a wallet, your wallet can generate a public key (almost unlimited number of public keys) so that you can receive bitcoin from anyone with a wallet or bitcoin account on an exchange.  Send them your public key (never your master key or seed phrase), and they can send you bitcoin.

In any software or digital wallet, you can create as many wallets as you want.  You can have an unlimited number of wallets, just like you can physically go and buy an unlimited number of leather wallets from the store.  

Keep in mind that each wallet has its own set of master keys and to transfer your money (or bitcoin) from one wallet to another wallet will cost you a transaction fee, which miners earn.  

Unlike a real physical leather wallet, you can just take a dollar, pull it out from your wallet and put it into another wallet.  But in the world of Bitcoin, you have to request that your bitcoin gets transferred from one wallet to another wallet, and then pay a fee to do so.  The fee you pay depends on the network traffic and maybe the value of the bitcoin you are sending.

Whenever you transfer or send bitcoin from one wallet to another, whether that 2nd wallet belongs to you or someone else, you are writing to the blockchain.

The blockchain records which public address sent bitcoin, received bitcoin, the time, date and transaction fee.  The blockchain keeps track of who owns every bitcoin and which account or address it’s associated with.  The blockchain does not track wallets or persons but addresses.

Every Bitcoin wallet is unique in its signature.  Each wallet creates public addresses that are unique to that wallet and can generate an almost unlimited number of public keys.  For privacy reasons, use different public keys.

Since each wallet has its own unique signature, much like a fingerprint, the Bitcoin system can identify which wallet owns every public address and thus who controls or owns which bitcoin or satoshi.

You can have multiple wallets that are tagged or associated with the same bitcoin by using your master key phrase to create other wallets.  For example, you can have a digital wallet on your mobile phone and your pc, all created from the same seed phrase, and thus they are overseeing the same wallet or bitcoin holdings.  That’s like having multiple leather wallets, each with the same duplicate amount of paper dollars.

If you have a bitcoin wallet from the same seed phrase on your phone, computer and hardware wallet, then essentially you have 3 wallets all controlling the same universe of bitcoin.

In this scenario, your cold wallet wouldn’t be secure.  For a truly secure cold wallet, don’t recreate a soft wallet using the same seed phrases.

Wallets allow you to send bitcoin and receive bitcoin and your wallet keeps track of your history.

When an existing seed phrase is used to create a new wallet, the system scans the blockchain to secure all your bitcoins to the new wallet.

How can a seed phrase recreate an entire wallet and identify all your bitcoin holdings?  Seed phrases are uniquely generated by every wallet.  Based on the “fingerprint” of the wallet, it generates public keys and a seed phrase that follows its DNA.  Based on that structure, seed phrases can track down all your bitcoin holdings that fit that structure and match your wallet signature.  It’s like magic, and it’s cryptography.

At a bare minimum, you need to secure your seed phrase.  As long as you have your seed phrase, you can “recreate” your wallet and retrieve your bitcoin.

If anyone discovers your seed phrase, they can recreate your wallet on another computer, mobile phone, or cold wallet and access the bitcoin.

Imagine a giant room.

The room is filled with mathematicians, auditors and clerks.  Mathematicians solve problems and earn rewards.  They can write in the big ledger.  Ledgers hold the history of every bitcoin transaction and identifies who owns every bitcoin.  Auditors check the ledgers for accuracy and copy any new entries on the ledger to thousands of other ledgers that are identical.  Clerks help customers and manage their wallets.  Each wallet is unique and can send, receive and hold bitcoin.  Bitcoin wallets have the magical ability to be recreated from a master key connected to the big ledger.

AnalogyBitcoin TermExplanation
Room of mathematicians solving problemsBitcoin MinersSpecialized computers competing to solve complex cryptographic puzzles (Proof of Work) in order to add a block to the blockchain and earn Bitcoin.
Solving math = earning the right to write to the ledgerMining a BlockThe process of finding a valid hash for a new block and broadcasting it to the network. The winning miner earns a reward and includes transactions in the block.
Ledger booksBlockchainThe permanent, public record of all Bitcoin transactions. Every full node maintains a full copy of this ledger.
Auditors reviewing the ledgerNodes (Full Nodes)Devices that validate and share transactions and blocks. They ensure all entries follow the rules of Bitcoin. Some nodes also store the entire blockchain.
Miners write, nodes verifyMiner Nodes vs. Full NodesAll miners are full nodes, but not all full nodes mine. Miners propose blocks; full nodes validate them.
Clerks with mini ledger booksWalletsWallets are software or devices that store private keys and allow users to send/receive Bitcoin. They “see” and control Bitcoin on the blockchain via those keys.
Wallet with lock/codePrivate Key / Seed PhraseThe private key or seed phrase is your secret access to a wallet. Whoever has it can control the associated Bitcoin.
Sharing an address to receive fundsPublic Key / Public AddressA wallet generates a public key/address, which you can safely share to receive Bitcoin. It’s like your account number.
Preloaded wallet lock combinationsSeed Phrase (Mnemonic Phrase)A human-readable backup (typically 12 or 24 words) that can regenerate your wallet and all associated private keys.
Recreating a wallet with your codeDeterministic Wallet (BIP39)Wallets use cryptographic standards to derive all addresses from your seed phrase. This means you can restore your wallet on any compatible app/device.
Multiple wallets from same phraseHD Wallet (Hierarchical Deterministic)A type of wallet that can create a tree of private/public keys from a single seed phrase. Multiple apps/devices can access the same wallet.
Bitcoin being in someone’s walletUnspent Transaction Output (UTXO)Technically, Bitcoin exists as unspent outputs on the blockchain, not inside wallets. A wallet just knows how to access and spend them.
Bitcoin needing a fee to moveTransaction FeeEach Bitcoin transaction includes a fee, paid to miners. The fee amount can vary based on network congestion and transaction size.
Defragging your holdingsUTXO ConsolidationUsers sometimes consolidate small unspent outputs into a single larger one, like tidying up change in your pocket. This is optional but helps reduce future transaction fees.
Wallets as signature-based IDsWallet Fingerprint / Key DerivationEvery wallet generates keys and addresses that follow a cryptographic structure. This makes each wallet unique, and all keys derivable from the same seed.

Epilogue:

What I find amazing and magical is how every Wallet has its own DNA or unique fingerprint.  When a new digital or cold wallet is created, it comes with its own seed phrase that is unique to that wallet, but it also follows a DNA that’s unique to that wallet.  So much so that any public key created by the wallet is identifiable to that wallet or secret phrase by the Bitcoin software.

If every wallet is unique with its own fingerprint, then theoretically we can create millions of different wallets and from each wallet create millions of public keys, throw them all in a box, randomly pick out a public key, and the Bitcoin ecosystem would know from which wallet it came from.  Magic!

Based on a secret phrase, you can recreate a new wallet, query the Bitcoin system and retrieve all the bitcoin that was in your old wallet.  But how does it know?  The Bitcoin system checks every blockchain entry and DNA matches every public key with your secret phrase and recreates your wallet with your bitcoin.  It knows if a random anonymous public key belongs to your secret phrase.  

That’s magic.

Footnote – Reality Check: While it’s fun to imagine that Bitcoin can trace every public key back to a unique wallet like DNA, that’s not exactly how it works. In reality, your wallet uses your seed phrase to recreate all the public keys (addresses) it generated before, and then it scans the blockchain to find which ones hold your Bitcoin. The blockchain itself doesn’t store any info about your wallet or seed — it just records which addresses have received or spent coins. So it’s not that Bitcoin “knows” who you are, but rather your wallet knows how to search for itself.

The End

Tae-Sik FirstDialogue.com

By Tae-Sik

Thinking it through with my writing...
~
https://taesikk.substack.com/