diff --git a/Bassey Gideon's Week 1 Assignment b/Bassey Gideon's Week 1 Assignment new file mode 100644 index 0000000..30add75 --- /dev/null +++ b/Bassey Gideon's Week 1 Assignment @@ -0,0 +1,172 @@ +Week 1 Day 2 — Blockchain infrastructure, DLTs, and how NFTs / tokens change ownership + +=> Question 1: Do a Quick Executive Summary +Blockchains are a type of distributed ledger where data is grouped in blocks and linked cryptographically; different blockchains use different node types, client software, and consensus algorithms (PoW, PoS variants, hybrid designs). + +Distributed Ledger Technology (DLT) is the umbrella term — includes blockchains, DAGs, Hashgraph, permissioned ledgers (Hyperledger). Not all DLTs chain data as blocks. + +NFTs (non-fungible tokens) are smart-contract tokens that represent unique items (usually ERC-721 / ERC-1155 on Ethereum). Fungible tokens (ERC-20 etc.) represent interchangeable units (currencies, governance tokens, stablecoins). Both change ownership by updating ledger state via transactions; marketplaces and smart contracts often automate transfer and provenance tracking. + + +=> Question 2: Researched blockchains — nodes, common clients, consensus (4+) + +Blockchains covered: Bitcoin, Ethereum, Solana, Polkadot, Cardano, and a permissioned DLT example Hyperledger Fabric. + +Blockchain/ Node types / roles/ Popular client implementations/ Consensus mechanism (short)/ Notes/ + +Bitcoin/ Full nodes,/ SPV/light clients, miners (PoW miners)/ Bitcoin Core (full), many forks/tools/ Proof-of-Work (SHA-256 mining): miners produce blocks; longest valid chain wins/ Simple UTXO model; highly decentralized; energy-intensive PoW./ +Ethereum/ (post-Merge)/ Execution clients (E),/ Consensus Beacon clients (C), Validators/ Execution: Geth, Besu, Nethermind. Consensus: Prysm, Teku, Lighthouse, Nimbus./ Proof-of-Stake (Beacon chain + execution layer). Validators attest & propose; finality via Casper-style LMD-GHOST + finality gadget./ Node stack often separated: execution + consensus + optional validator./ +Solana/ Validator nodes, RPC nodes, Archivers/ solana-validator/ Proof of History (PoH) + PoS + Tower BFT: PoH provides verifiable timestamping; Tower BFT finalizes blocks./ Architected for very high throughput & low latency; unique PoH clocking./ +Polkadot/ Validators, Nominators, Collators (parachain side),Fishermen/ Polkadot client (parity-based), Substrate-based node implementations/ Nominated Proof of Stake (NPoS): staking + nominators select validators; GRANDPA finality + BABE block production/ Relay-chain + parachain architecture for shared security & interoperability./ +Cardano/ Stake pool operators (SPOs), relay nodes, block producers/ cardano-node (official)/ Ouroboros family (PoS): epoch/slot leader election with provable security/ Research-driven PoS with formal proofs (Ouroboros variants). +Hyperledger Fabric (permissioned DLT)/ Peers, orderers (ordering service), endorsing peers, clients/ Hyperledger Fabric official implementations (Go/Java)/ Pluggable consensus (e.g., Raft, Kafka previously, PBFT-like implementations) — deterministic ordering by ordering service/ Permissioned model: identity & access control, private channels, not native cryptocurrency. Good for enterprise supply chains. + + +=> Question 3: Distributed Ledgers vs Blockchains — clear comparison +Short answer: All blockchains are distributed ledgers, but not all distributed ledgers are blockchains. Blockchains organize data into cryptographically linked blocks; other DLTs (DAGs, hashgraph, permissioned ledgers) may use different structures and consensus properties. + +Key differences (table): + +Feature/ Blockchain (public)/ Distributed Ledger (DLT, general) + +Data structure/ Linear chain of blocks (linked by hashes)/ May be blocks, DAGs, directed graphs, or ordered ledgers/ +Typical consensus/ PoW/PoS variants, proof hybrids/ Variety: BFT, PoS, deterministic ordering, etc./ +Permission model/ Often permissionless (public)/ Often permissioned for enterprise use (e.g., Hyperledger)/ +Immutability/ High (append-only chain + cryptographic link/ Varies (many DLTs still append-only but governance may allow modifications in permissioned setups)/ +Use cases/ Cryptocurrencies, open smart contracts, NFTs/ Enterprise applications Supply chain, private settlement, interbank recordkeeping/ +Example/ tech Bitcoin, Ethereum, Solana/ Hyperledger Fabric, Hedera, IOTA (DAG)/ + +Implication for ownership: On blockchains, ownership is usually a ledger state (address balance / token-ID holder) — the chain provides provenance and public verification. Permissioned DLTs may record ownership but access, identity, and governance rules differ (e.g., legal identity attached to ledger entries). + + +=> Question 4: NFTs and fungible tokens — how they change ownership (mechanics + real-world examples) + +=> How Ownership Changes Technically + +Fungible tokens (ERC-20 style): balance mapping in the contract is updated by transfer operations. Ownership is a numeric balance associated with addresses; transfers are atomic transactions. + +NFTs (ERC-721 / ERC-1155): ownership stored per token ID (ownerOf). Transfer functions update token ownership and emit Transfer events; metadata (often stored off-chain via IPFS or pinned URIs) describe the asset. Marketplaces invoke the ERC transfer logic (or use approved operator patterns) so purchase = contract transfer. + + +Legal/real-world note: Blockchain ownership shows who controls the private key for a token ID / address. Commercial or copyright ownership (IP rights) may be separate unless explicitly conveyed by the project. Marketplaces and smart contracts can convey rights (e.g., commercial use licenses) in contract metadata or TOS. + + + +=> Real-world examples (5+), each with quick analysis of token type & how ownership is effected + +1. CryptoPunks (Ethereum, ERC-721-like collection) + +Type: NFT collection (unique pixel portraits). Ownership recorded on Ethereum; transfers executed via smart contract; provenance visible on-chain. Example of cultural/digital-art ownership and provenance. + + + +2. Bored Ape Yacht Club (BAYC) (Ethereum, ERC-721) + +Type: NFT collection that also grants certain owner privileges (community access, merch, events). Ownership change is on-chain; holders sometimes use IP rights for merchandising under the project's grants. Shows NFTs enabling community membership access. + + + +3. NBA Top Shot (Flow blockchain, Moment NFTs) + +Type: NFT "Moments" (video highlight collectibles) on Flow. Ownership recorded on Flow; custody/market features built by Dapper Labs; collectors buy/sell on marketplace; Flow designed to make collectible UX friendlier (scalability & lower costs). Shows NFTs as licensed sports collectibles. + + + +4. Axie Infinity (Axies on Ronin/Ethereum ecosystem) + +Type: Game NFTs (Axies) + in-game fungible tokens (AXS, SLP). Players buy Axies (NFTs) and earn fungible tokens via gameplay; marketplace transfers NFT ownership when trade occurs; demonstrates play-to-earn where NFTs enable digital asset ownership used for economic activity. Also a cautionary example: bridge & security risks (Ronin hack). + + + +5. USDC / USDT (Fungible stablecoins, ERC-20 / multi-chain) + +Type: Fungible tokens (stablecoins). Ownership change is ledger update (ERC-20 transfer). These tokens represent value and are interchangeable — used as medium of exchange, liquidity, payment rails. Demonstrates fungible tokens changing monetary ownership instantly on-chain. + + + +6. Art Blocks (Generative art NFTs on Ethereum) + +Type: Programmatically generated NFTs (ERC-721). Ownership & provenance on-chain; creator royalties & on-chain data examples show how smart contracts automate resale royalties and provenance tracking. + + + +7. Uniswap UNI (governance token, ERC-20) + +Type: Fungible governance token. Ownership confers governance voting rights; transfers change who holds governance weight. Example of fungible tokens changing control/voice in protocols. + + + +=> Question 5: Comparables — NFTs vs Fungible tokens ( + +Aspect/ NFTs (ERC-721 / ERC-1155)/ Fungible tokens (ERC-20)/ + +Uniqueness/ Each token ID is unique (non-interchangeable)/ Tokens are interchangeable; 1 token = any other token unit/ +Ownership Record/ Owner Of(tokenId) on contract; explicit provenance/ balance of(address) mapping; balances change by transfer/ +Typical use cases/ Collectibles, art, in-game items, identity, tickets/ Currency, stablecoins, governance, utility, rewards/ +Transfer semantics/ Transfer specific token IDs; may include metadata/ Transfer arbitrary amount; divisible/ +Standards/ ERC-721,/ ERC-1155 (multi) ERC-20/ +Royalties & metadata/ Often include metadata URIs; royalty patterns implemented on marketplaces/ Metadata limited; royalties uncommon at token level/ +Market behavior/ Liquidity varies; marketplaces list items/ High liquidity across DEXs & exchanges/ + + +=> Question 6: Comparison table — Blockchains + +Blockchain/ Consensus/ Typical node/client stack / Best use-cases + +Bitcoin / PoW (SHA-256) / Bitcoin Core full node; SPV wallets/ Sound money, high security store of value. / +Ethereum/ PoS (Beacon/execution split)/ Execution clients (Geth/Besu), Consensus (Prysm/Lighthouse)/ Smart contracts, DeFi, large NFT ecosystem./ +Solana/ PoH + PoS + Tower BFT/ solana-validator/ High throughput apps, low-latency trading/games./ +Polkadot/ NPoS + GRANDPA/BABE/ Polkadot/Substrate nodes/ Interoperability (parachains), shared security. +Cardano/Ouroboros PoS/ cardano-node/ Research-backed PoS, academic use-cases./ +Hyperledger Fabric/ Pluggable BFT/Raft/ Fabric peers & orderers/ Enterprise private ledgers, supply chain. + + + +=> Question 8: Highlight References Used + + +1. Bitcoin dev guide — Blockchain overview / nodes. + + +2. BitPay — Bitcoin nodes explained. + + +3. Ethereum docs — Nodes & clients (execution + consensus). + + +4. Prysm / consensus client notes (Ethereum validator docs). + + +5. Solana — Proof of History / Tower BFT / validator setup. + + +6. Polkadot docs — NPoS consensus explanation. + + +7. Cardano — Ouroboros PoS overview. + + +8. Hyperledger Fabric docs — What is Fabric / orderer & peers. + + +9. Consensus article — Blockchain vs DLT explainer. + + +10. OpenZeppelin — ERC-721 (NFT standard). + + +11. OpenZeppelin / OpenEthereum — ERC-20 docs (fungible token standard). + + +12. ERC-1155 multi-token standard (Ethereum docs). + + +13. OpenSea — NFT primer and metadata/marketplace notes. + + +14. NBA Top Shot explainer (Gemini / NFT guides). + + +15. Axie Infinity official / coverage & Ronin bridge hack coverage (security risks). + + diff --git a/submissions/week-2/Assignment/Bassey Gideon Solomon/Blockchain and Web3 Deep Dive day 1-3.md b/submissions/week-2/Assignment/Bassey Gideon Solomon/Blockchain and Web3 Deep Dive day 1-3.md new file mode 100644 index 0000000..c8c7a6d --- /dev/null +++ b/submissions/week-2/Assignment/Bassey Gideon Solomon/Blockchain and Web3 Deep Dive day 1-3.md @@ -0,0 +1,152 @@ + + + +Section 1: +1. Proof of Work (PoW) Analysis + +=> How PoW Works + +Proof of Work (PoW) is a consensus mechanism where miners compete to solve a complex computational puzzle in order to create the next block on the blockchain. The process begins when miners gather unconfirmed transactions and assemble them into a block. They then repeatedly compute hashes using a mathematical function (SHA-256 for Bitcoin) until they find a hash value that meets the difficulty requirement set by the network. +The “work” refers to the computational effort needed to find a valid hash. This work ensures that producing a block costs real energy, making it expensive to attack the network. The difficulty adjustment ensures consistent block production: if blocks are being mined too quickly, the difficulty increases; if too slowly, it decreases. When two miners solve the puzzle simultaneously, the chain may temporarily split, but eventually the longest chain wins as more blocks pile on one side. This natural resolution mechanism maintains consistency across the network. + +=> Security Model of PoW + +PoW is secure because an attacker must control more than half of the total mining power to rewrite history or double-spend. This is known as a 51% attack. Executing such an attack is extremely costly because the attacker must acquire massive computational hardware and continually pay high electricity costs while racing against honest miners. + +Economic incentives drive miners to act honestly: they earn block rewards and transaction fees only if they mine valid blocks accepted by the network. Invalid blocks are instantly rejected, resulting in a financial loss. Because mining requires real resources, attacking the network becomes prohibitively expensive, while honest behavior is rewarded. + +=> Real-World Examples of PoW + +Bitcoin is the most prominent PoW blockchain, using SHA-256 hashing. It has maintained strong security since 2009 due to its enormous hash rate. Ethereum also used PoW (Ethash algorithm) before The Merge in 2022, when it transitioned fully to Proof of Stake. Other PoW blockchains include Litecoin (Scrypt), Dogecoin (merged mining with Litecoin), and Monero (RandomX), each optimized for different use cases. +Over time, PoW networks have evolved from CPU mining to GPU mining and eventually to ASIC mining. This evolution increased performance but also raised decentralization concerns, as specialized hardware tends to be dominated by large mining companies. + +=> Trade-offs of PoW + +PoW offers strong security and a proven track record, but it comes with trade-offs. Advantages include high resistance to attacks, decentralization through global miners, and predictable issuance. However, PoW consumes significant energy, raising environmental concerns. Mining hardware is expensive, creating entry barriers that may lead to mining centralization. +PoW’s throughput is also limited because block production requires solving computational puzzles, making transaction speeds slower compared to other mechanisms. Despite these limitations, PoW remains one of the most secure and battle-tested consensus models in blockchain. + +2. Proof of Stake (PoS) Analysis + +=> How PoS Works: + +In Proof of Stake (PoS), validators secure the network by locking up a portion of their cryptocurrency (a stake) instead of performing energy-intensive computations. Selection of validators is based on factors such as amount staked, randomness, and sometimes validator reputation or performance. +Validators propose and attest to blocks. If they behave honestly, they earn rewards; if they act maliciously, they can lose part or all of their stake through slashing. Finality in PoS means that once validators reach a threshold of agreement on a block, it becomes irreversible according to the network’s rules. + +=> Security Model of PoS + +PoS prevents attacks by making dishonesty economically irrational. An attacker must acquire a large percentage of the total staked tokens—often billions of dollars—which makes attacks extremely expensive. Additionally, slashing penalties ensure that malicious validators lose their stake automatically if they attempt attacks like double-signing or surrounding attacks. + +Stake size affects security because the more tokens staked, the more difficult it is for an attacker to gain majority control. Rewards and penalties reinforce honest participation, while decentralized validator sets increase overall resilience. + +=> Real-World Examples of PoS + +Ethereum is the largest PoS blockchain after The Merge. It uses Casper FFG and Gasper for validator selection and finality. Cardano uses Ouroboros, a provably secure PoS protocol that rotates slot leaders. Solana uses a hybrid approach combining PoS with a Proof of History timing mechanism for high throughput. +Other PoS networks include Avalanche (Snowman consensus), Polkadot (NPoS), and Tezos (Liquid Proof of Stake). Each implements PoS differently but shares the central idea of staking as the security foundation. + +=> Trade-offs of PoS + +PoS offers major energy efficiency benefits, since it does not rely on physical hardware or electricity. It supports higher scalability and lower transaction costs. However, PoS can introduce centralization risks because wealthier participants naturally control larger stakes. There are also concerns about governance capture if institutions accumulate large amounts of tokens. + +Finally, newer PoS systems have less historical battle-testing compared to PoW, meaning long-term security models are still evolving. + +3. Comparative Analysis: PoW vs PoS + +When comparing PoW and PoS, several dimensions stand out. PoW’s security depends on computational power, while PoS relies on economic incentives and locked assets. PoW consumes far more energy, whereas PoS is environmentally efficient. PoS networks generally offer better scalability and faster transaction finality. +In terms of decentralization, PoW initially promotes equal opportunity but can drift towards centralization due to ASIC dominance. PoS risks wealth concentration because token ownership influences power. Cost structures differ as well: PoW requires ongoing electricity and hardware investment, while PoS requires the acquisition of stake. +Real-world adoption shows both mechanisms succeeding in different ways. Bitcoin remains the strongest PoW chain, while Ethereum leads PoS innovation. Each model has proven effective depending on the network’s goals. + +4. For Creatives: Practical Implications + +Consensus mechanisms directly affect creators who deploy NFTs or smart contracts. On PoW chains, NFT minting costs can be high because gas prices fluctuate based on mining demand. PoS chains generally offer cheaper and faster minting, making them attractive for creators with large collections. +Gas fees vary significantly between PoW and PoS networks due to differences in throughput and block space competition. PoS chains typically provide more predictable and lower costs. Creators choosing a blockchain must consider transaction speed, security level, community adoption, and long-term reliability. Consensus is therefore a key factor in determining where to launch digital assets. + +Section 2: Gas, Blocks and Confirmations + +### 1. Gas Economics + +=> What is Gas? + +In blockchain—especially on Ethereum—gas refers to the unit that measures how much computational work is required to execute an operation. Every action on a blockchain, whether it is sending tokens, minting NFTs, or interacting with a smart contract, consumes computational resources. Gas provides a way to quantify the cost of using those resources. + +It is called gas because it functions like fuel: users must pay gas fees to “power” their transactions. The relationship between gas and computation is direct—complex operations require more gas, while simple operations require less. Gas provides a flexible pricing system that helps maintain network efficiency. + +=> How Gas Pricing Works + +Gas price is measured in Gwei, a small unit of ETH. The gas price fluctuates based on network demand. When the network is congested, users must offer higher gas prices to incentivize miners or validators to include their transactions quickly. + +Gas price is determined by supply and demand in the network’s mempool. Factors that influence gas price include network congestion, the type of transaction being sent, and user competition for block space. Gas price reflects how much a user is willing to pay per unit of computational work. + +The main difference between gas price and gas limit is that gas price determines how much you pay per unit, while gas limit determines how many units a transaction may consume. + +=> Gas Calculation + +Total gas cost is calculated using a simple formula: + +Total Fee = Gas Used × Gas Price + +Different transactions have different typical gas costs. For example, sending ETH is cheap, interacting with a smart contract is more expensive, and minting NFTs can be significantly higher. + +Some transactions cost more because they require more computational steps. Smart contract interactions involve reading and writing to storage, running logic, and verifying signatures—all of which consume more gas. + +Users can estimate gas before sending by using gas estimators in wallets or blockchain explorers like Etherscan. These tools simulate the transaction and suggest the appropriate gas limit and gas price. + +=> Gas Optimization Strategies + +Gas prices tend to be lowest during periods of low network activity, such as late nights or weekends. Users can reduce gas costs by batching transactions, avoiding peak hours, or using Layer 2 networks. + +Layer 2 solutions like Optimism, Base, and Arbitrum help reduce gas costs by performing computations off-chain and only submitting proofs to the main chain. Batching is another strategy where multiple transactions are combined into one, saving gas through shared overhead. + + +### 2. Block Structure + +=> What is a Block? + +A block is a structured data container that holds a group of validated transactions. In narrative terms, a block is like a “page” in the blockchain ledger. It contains the essential information needed to permanently record activity on the network. + +Blocks are linked together cryptographically, meaning each block references the previous block’s hash. This linking creates immutability—changing a single block would require rewriting all subsequent blocks. + + +=> Block Components + +A block contains several important components: + +Block Header: includes metadata such as timestamp, difficulty, and the previous block hash. + +Block Hash: a unique identifier generated from the block header. + +Previous Block Hash: this links the new block to the last block, forming the chain. + +Transactions: the actual validated operations included in the block. + +The number of transactions in a block depends on gas limits and block size restrictions. + + +=> Block Time + +Block time refers to the average time it takes to produce a new block. Different blockchains have different block times—for example, Bitcoin targets 10 minutes, while Ethereum targets 12 seconds. + +Block time affects user experience: shorter block times lead to faster confirmations, but may increase the probability of temporary chain forks. The relationship between block time and finality is important: faster block times lead to quicker transaction visibility, but finality may still require multiple confirmations. + +### 3. Confirmations + +=> What Are Confirmations? + +Confirmations refer to how many blocks have been added on top of a particular transaction’s block. A transaction receives 1 confirmation when it is included in a block, and each additional block adds another confirmation. + +Confirmations matter because each new block makes it more difficult for an attacker to reverse the transaction. This increases security and reduces the risk of double-spending. + +The network uses confirmations to provide security by making past blocks increasingly hard to reorganize. + +=> Confirmation Requirements + +Different scenarios require different numbers of confirmations. Small personal transfers may only need 1–2 confirmations, while large exchanges often require 20 or more. Exchanges require more confirmations to reduce risk from chain reorganizations. + +Accepting transactions with very few confirmations carries risk: if a reorganization happens, those transactions might be invalidated. Different blockchains handle finality differently. For example, Bitcoin relies on probabilistic finality, while Ethereum’s PoS system has economic finality through checkpoints. + + +=> Real-World Application + +One confirmation may be enough for micro-transactions or low-value transfers. For high-value transactions, users should wait for more confirmations to ensure security. + +NFT marketplaces typically require at least 1 block confirmation but may require more depending on network congestion. During a chain reorganization, transactions in the replaced blocks may be reversed or included in later blocks, depending on how the chain stabilizes. +