๐ฆ MetaMask & Wallet Fundamentals
A practical introduction to how wallets, keys, gas, and DeFi actually work.
๐ค What Is a Wallet? (Itโs not what you think)
โ MetaMask is NOT
- A place where your money is stored
- A bank
- A blockchain
โ MetaMask IS
- ๐ Key manager โ securely stores your private keys (encrypted)
- ๐ RPC client โ talks to blockchains via
window.ethereum - โ๏ธ Signer โ cryptographically signs transactions and messages
Key takeaway:
The blockchain is the database.
MetaMask is just the communicator.
If MetaMask disappears, your account still exists.
๐ Public vs. Private Keys
-
Private Key ๐
- Proves ownership
- Never share (outside dev/test scenarios)
-
Public Key ๐
- Derived from the private key
-
Address ๐ฌ
- Hash of the public key
- Safe to share
- Used to receive funds
โ ๏ธ Blockchain transactions are final.
There is no undo button.
๐ฑ Seed Phrases (BIP-39)
๐งฎ The math
- 12 words = representation of massive entropy
- Based on a fixed list of 2048 words
- Total combinations: ~5.4 ร 10ยณโน
๐ณ The hierarchy
Seed Phrase โ Private Keys โ Public Keys โ Addresses
๐จ The danger
- One seed controls all derived accounts
- Leaking the seed = total loss
- Wallet passwords only protect locally, not on-chain
Whoever has the seed is you.
โฝ Gas = Compute Credits
You cannot write to the blockchain for free.
The formula
Transaction Fee = Gas Used ร Gas Price
Key concepts
- Gas โ amount of computation
- Gas limit โ max youโre willing to pay
- Gas price (Gwei) โ priority in the network
- Nonce โ your personal transaction counter
(prevents replay attacks)
Higher gas price = faster inclusion โฉ
๐ Reading the Blockchain (Etherscan)
- The blockchain is a public database
- Anyone can inspect:
- Transactions
- Balances
- Contract interactions
- Tools like Etherscan are just explorers โ not special permissions
Sending crypto = writing to the database
Reading Etherscan = reading the database
๐ What Is Uniswap?
๐ง As a protocol
- Smart contracts deployed on Ethereum
- Runs autonomously (no servers, no company)
- Can be used without a website
๐ฅ๏ธ As a dApp
- Website = graphical interface
- Generates complex transactions for you
- Your wallet signs and submits them
The frontend is optional.
The smart contracts are the real product.
โ The โApprovalโ Pattern (Very Important)
The problem
Smart contracts cannot move your tokens automatically.
The solution (ERC-20 standard)
- Approve
โI allow Uniswap to spend 100 USDCโ
- TransferFrom
โUniswap takes the USDC and gives ETHโ
ETH vs Tokens
- ETH โ native currency (no approval needed)
- ERC-20 tokens โ separate contracts (approval required)
โ ๏ธ Token โ ETH swaps always need approval first.
๐ To-Do (Recommended Practice)
- Swap ETH โ USDC on Uniswap
- Supply USDC as collateral
- Borrow DAI
- Research:
- Lending protocols (Aave)
- Health factor
- Liquidation risk
๐ง Final Takeaways
- Wallets manage keys, not money
- Seed phrases are absolute power
- Gas is payment for computation
- dApps = frontend + smart contracts
- Approvals are fundamental to DeFi
Understand this once โ avoid costly mistakes forever. ๐ก๏ธ