Blockchain interview questions answer for preparation

Here are 100 blockchain interview questions and answers, covering core concepts, cryptography, consensus mechanisms, smart contracts, Ethereum, Solidity, DeFi, and scalability.

Blockchain Fundamentals

1. What is blockchain?
A decentralized, distributed ledger that records transactions across many computers so that the record cannot be altered retroactively without altering all subsequent blocks. It ensures transparency, immutability, and trust without a central authority.

2. What are the key properties of a blockchain?
Decentralization, immutability, transparency, security, censorship‑resistance, and consensus-driven.

3. What is a block?
A container that holds a list of transactions. It contains a block header (previous block hash, timestamp, Merkle root, nonce) and a transaction list.

4. What is the genesis block?
The first block in any blockchain, hardcoded into the software, having no previous block reference.

5. What is a node?
A computer running the blockchain software that maintains a copy of the ledger and validates and relays transactions and blocks.

6. What is the difference between a public, private, and consortium blockchain?
Public: open for anyone to join and participate (Bitcoin, Ethereum). Private: restricted access, controlled by a single organization. Consortium: multiple organizations share control.

7. What is the double‑spend problem?
The risk that a digital currency can be spent twice. Blockchain solves it using decentralized consensus and public verification.

8. What is the Byzantine Generals Problem?
A coordination problem in distributed computing where some nodes may be faulty or malicious; it’s the core challenge that consensus protocols like Proof of Work must overcome.

9. What is the role of a miner?
Miners validate new transactions, bundle them into blocks, and compete to solve a computational puzzle (PoW) to add the block and earn rewards.

10. What is a transaction pool / mempool?
A staging area where unconfirmed transactions are held before miners pick them up to include in the next block.

11. Explain the structure of a blockchain.
A chain of blocks, each linked by cryptographic hashes. Each block contains a block header (hash of previous block, timestamp, Merkle root, nonce, difficulty) and the transaction data.

12. What is a Merkle tree?
A binary hash tree that allows efficient and secure verification of large data structures. In blockchain, it’s used to summarize all transactions in a block, and enable lightweight clients (SPV).

13. What is a Merkle root?
The top hash of a Merkle tree, stored in the block header, representing all transactions in the block. Any change to a transaction would change the root, thus breaking the chain.

14. What is immutability in blockchain?
Once data is added to a block and confirmed by the network, it becomes practically impossible to alter because changing one block would require re-mining all subsequent blocks and controlling majority consensus.

15. What is decentralization and why is it important?
No single entity controls the network; decision power is distributed. It removes single points of failure, censorship, and reduces trust in a single central authority.

16. What is a distributed ledger?
A database that is consensually shared, replicated, and synchronized across multiple nodes; blockchain is a type of distributed ledger.

17. What is the difference between blockchain and a traditional database?
Traditional databases are centralized, support CRUD operations, and are controlled by a single entity. Blockchain is append‑only, decentralized, and highly resistant to tampering.

18. What is a fork?
A split in the blockchain. A soft fork is backward‑compatible (tightened rules); a hard fork is not backward‑compatible and can create a new chain (e.g., Bitcoin vs. Bitcoin Cash).

19. What is a 51% attack?
When a single entity or group controls more than 50% of the network’s mining hashrate (PoW) or staking power (PoS), allowing them to double‑spend, censor transactions, and rewrite the chain’s history.

20. What is coinbase transaction?
The first transaction in a block that creates new coins (block reward) and is paid to the miner; it has no inputs.

Cryptography & Security

21. What cryptographic primitives are used in blockchain?
Hash functions (SHA‑256, Keccak‑256), digital signatures (ECDSA, EdDSA), Merkle trees, and public‑key cryptography.

22. What is a hash function?
A one‑way function that takes an input and returns a fixed‑size string. It’s deterministic, pre‑image resistant, and collision‑resistant. SHA‑256 is used in Bitcoin.

23. What is the role of hashing in blockchain?
Linking blocks (prev block hash), creating addresses, generating Merkle trees, and securing the network through mining puzzles.

24. What is a digital signature?
A cryptographic technique where a message is signed with a private key; anyone with the public key can verify the signer’s authenticity. Used to prove ownership of transactions.

25. How does a transaction get signed?
The owner creates the transaction, hashes it, and signs the hash with their private key using ECDSA. The network verifies with the public key.

26. What is a private key and a public key?
Private key is a secret number allowing spending of associated coins. Public key is derived from it and shared; it’s used to create addresses and verify signatures.

27. What is a wallet?
Software or hardware that manages private keys, generates addresses, and signs transactions. It does not store coins but the keys to control them.

28. What is a seed phrase?
A set of 12 or 24 words from which all private keys in a HD wallet are derived (using BIP39). It provides easy backup and recovery.

29. What is the difference between hot and cold wallets?
Hot wallets are connected to the internet (software wallets, web wallets). Cold wallets are offline (hardware wallets, paper wallets), offering greater security.

30. What is AES and why is it sometimes used in wallet encryption?
Advanced Encryption Standard is a symmetric cipher used to encrypt the private key storage on disk, requiring a user‑provided passphrase to decrypt.

Consensus Mechanisms

31. What is a consensus mechanism?
A set of rules and incentives that allow distributed nodes to agree on a single version of the blockchain state without a central authority.

32. What is Proof of Work (PoW)?
Miners compete to find a nonce that, when hashed with block data, produces a hash below a target difficulty. Used by Bitcoin, it secures the network through computational power.

33. What is a nonce?
A random number miners change repeatedly to find a valid hash for the next block. A critical part of the PoW puzzle.

34. What is mining difficulty?
A measure of how hard it is to find a valid hash; it adjusts every 2016 blocks in Bitcoin to maintain a 10‑minute block time.

35. What is Proof of Stake (PoS)?
Validators stake coins to propose and attest to blocks; the chance of being chosen is proportional to stake. It’s more energy‑efficient than PoW. Used by Ethereum 2.0.

36. What is Delegated Proof of Stake (DPoS)?
Token holders vote for a limited number of delegates (witnesses) who produce blocks on their behalf; faster and more scalable but more centralized. Used by EOS, Tron.

37. What is Proof of Authority (PoA)?
A reputation‑based consensus where approved validators (often identity‑verified) seal blocks. Used in private/consortium chains.

38. What is Proof of History (PoH)?
A verifiable delay function used by Solana to timestamp transactions before consensus, providing a cryptographic clock to improve throughput.

39. What is the nothing‑at‑stake problem?
In early PoS, validators could vote for multiple conflicting chains without cost, preventing convergence. Solved by slashing conditions in modern PoS (Casper).

40. What is slashing?
A penalty in PoS protocols that destroys a portion of a validator’s stake if they act maliciously (double‑signing, being offline).

41. What is Nakamoto consensus?
Bitcoin’s consensus model combining PoW with the longest chain rule (heaviest cumulative work) and economic incentives.

42. What is the difference between finality in PoW and PoS?
PoW has probabilistic finality (the deeper a block, the more secure). PoS protocols like Tendermint achieve deterministic finality within a bounded time.

43. What is the role of miners/validators in a blockchain network?
To validate transactions, produce new blocks, and secure the network; they receive block rewards and transaction fees as incentive.

44. What is selfish mining?
A strategy where a miner withholds mined blocks to gain an advantage, increasing their effective share of rewards. Possible in PoW systems.

45. What is the longest chain rule?
In Bitcoin, nodes consider the valid chain with the most accumulated work (not necessarily the longest by number of blocks) as the true chain.

Smart Contracts & Ethereum

46. What is a smart contract?
Self‑executing code stored on the blockchain that automatically enforces the rules and agreements when predefined conditions are met, without intermediaries.

47. Who proposed the concept of smart contracts?
Nick Szabo in 1994, long before blockchain; Ethereum popularized them.

48. What is Ethereum?
A programmable blockchain that enables developers to build decentralized applications (dApps) using smart contracts, with its native cryptocurrency Ether (ETH).

49. What is gas?
A unit measuring the computational effort required to execute operations on Ethereum. Users pay gas fees in Ether (gwei) to compensate validators.

50. What is gas limit and gas price?
Gas limit is the maximum gas a transaction can consume. Gas price is how much the sender is willing to pay per gas unit. The product is the max transaction fee.

51. What is the Ethereum Virtual Machine (EVM)?
A runtime environment that executes smart contract bytecode. It’s sandboxed, Turing‑complete, and runs on every Ethereum node.

52. What is ether (ETH)?
The native cryptocurrency of the Ethereum network, used to pay for gas, staking, and as a store of value.

53. What is an ERC‑20 token?
A token standard for fungible tokens on Ethereum, defining a common set of rules (transfer, approve, balanceOf) so tokens are interoperable with wallets and exchanges.

54. What is ERC‑721?
A standard for non‑fungible tokens (NFTs), where each token is unique and has a distinct identifier and metadata.

55. What is the difference between fungible and non‑fungible tokens?
Fungible: identical, interchangeable (like money). Non‑fungible: unique with distinct properties, not directly interchangeable.

56. What is a DAO?
Decentralized Autonomous Organization – an organization represented by rules encoded as a smart contract, controlled by token holders and without central management.

57. What was The DAO hack?
In 2016, an attacker exploited a recursive call vulnerability to drain ~3.6M ETH from The DAO, leading to a hard fork (Ethereum Classic split).

58. What is a reentrancy attack?
A smart contract bug where an external call allows the called contract to re‑enter the calling function before state is updated, draining funds. Mitigated by checks‑effects‑interactions pattern.

59. What is a flash loan?
A loan that must be borrowed and repaid within the same transaction; no collateral required. Frequently used in arbitrage and DeFi exploits.

60. What is a decentralized application (dApp)?
An application with its backend logic running on a blockchain (smart contracts), paired with a front‑end; typically open‑source, trustless, and tokenized.

61. What is Web3?
The vision of a decentralized web where users control their data, interactions are peer‑to‑peer, and value is exchanged natively via blockchain‑based protocols.

62. What is the difference between web3.js and ethers.js?
Both are JavaScript libraries to interact with Ethereum. Ethers.js is lighter, has cleaner API, and better documentation; web3.js is older but still widely used.

63. What is MetaMask?
A browser extension and mobile wallet that allows users to manage Ethereum accounts, sign transactions, and interact with dApps.

64. What is a blockchain oracle?
A service that brings external, real‑world data onto the blockchain (e.g., price feeds) so smart contracts can use it. Chainlink is a leading oracle network.

65. What is the difference between on‑chain and off‑chain data?
On‑chain data lives on the blockchain (immutable, expensive). Off‑chain data is stored externally (cheaper, faster) and referenced by hash or oracle.

Solidity Programming

66. What is Solidity?
A statically‑typed, contract‑oriented programming language for writing smart contracts on Ethereum and other EVM‑compatible blockchains.

67. What is a constructor in Solidity?
A special function executed only once when a contract is deployed, used to initialize state variables and set the owner.

68. Explain msg.sender.
The address of the account that called the current function (the transaction originator or another contract). Critical for access control.

69. What are storage, memory, and calldata in Solidity?
Storage: persistent on blockchain, expensive. Memory: temporary, used during function execution, cheaper. Calldata: read‑only location for external function arguments, immutable and cheap.

70. What are the common data types in Solidity?
uintintbooladdressstringbytesmappingstructenum, and arrays (fixed and dynamic).

71. What is a modifier?
Code that can be attached to function declarations to add pre‑conditions (e.g., onlyOwner). They modify function behavior.

72. What are events in Solidity?
A way for contracts to log information that can be picked up by off‑chain applications. Indexed parameters allow efficient filtering.

73. What is require vs assert vs revert?
require: validates user inputs (gas refunded). assert: checks invariants (should never fail; consumes all gas). revert: manually abort execution with a custom error; often used in conditionals.

74. What is a fallback function?
A special function executed when a contract receives plain Ether without a matching function call. Can be fallback() or receive().

75. What is the difference between transfersend, and call for sending Ether?
transfer: forwards 2300 gas, reverts on failure (safe default). send: also 2300 gas, returns bool. call: forwards all gas (or specified), recommended currently but needs security checks against reentrancy.

76. What is a mapping?
A key‑value store similar to a hash table. Cannot be iterated natively; used to store balances, allowances, etc.

77. How do you create a contract from another contract?
Using new ContractName(args) or by calling a factory function that deploys a new contract.

78. What is inheritance in Solidity?
Contracts can inherit from other contracts using is keyword. Supports multiple inheritance, with linearization (C3 linearization) to resolve conflicts.

79. What are libraries in Solidity?
Reusable code that can be called by contracts. They are deployed once and can be called via delegatecall to execute in the context of the calling contract.

80. What is the checks‑effects‑interactions pattern?
A security pattern: first check conditions, then update state (effects), and finally interact with external contracts. Prevents reentrancy.

Decentralized Finance (DeFi) & NFTs

81. What is DeFi?
Decentralized Finance – a suite of financial applications built on blockchain offering services (lending, borrowing, trading) without intermediaries, using smart contracts.

82. What is a DEX (Decentralized Exchange)?
A peer‑to‑peer marketplace where users trade crypto directly with liquidity pools instead of a central order book. Examples: Uniswap, SushiSwap.

83. What is an Automated Market Maker (AMM)?
A protocol that uses a mathematical formula (e.g., x*y=k) to provide liquidity automatically; traders swap against liquidity pools.

84. What is liquidity mining / yield farming?
Providing liquidity to DeFi protocols in exchange for rewards (typically protocol tokens), maximizing returns.

85. What is impermanent loss?
The temporary loss of value when the price of deposited tokens in a liquidity pool diverges, compared to simply holding them. It becomes permanent if withdrawn during divergence.

86. What is a stablecoin?
A cryptocurrency designed to minimize price volatility, often pegged to a fiat currency or other asset. Types: fiat‑collateralized (USDC), crypto‑collateralized (DAI), algorithmic.

87. What is an NFT and how does it work?
A Non‑Fungible Token – a unique digital asset recorded on a blockchain, representing ownership of digital or physical items (art, music, virtual land). Uses ERC‑721 standard.

88. What is minting an NFT?
Creating a new token on the blockchain, recording its metadata and ownership.

89. What is the difference between ERC‑721 and ERC‑1155?
ERC‑721: single token type, unique assets. ERC‑1155: multi‑token standard supporting both fungible and non‑fungible tokens within one contract, more gas‑efficient for gaming/NFTs.

90. What is a rug pull?
A scam where developers suddenly withdraw all liquidity from a DeFi project or abandon it after raising funds, leaving investors with worthless tokens.

Architecture, Scalability & Interoperability

91. What is the scalability trilemma?
The trade‑off between decentralization, security, and scalability; improving one often compromises another. Proposed by Vitalik Buterin, it’s a core challenge in blockchain design.

92. What are Layer 2 solutions?
Protocols built on top of a base blockchain (Layer 1) to increase transaction throughput and reduce fees, by handling transactions off‑chain while inheriting L1 security. Examples: Lightning Network, Optimistic Rollups, ZK‑Rollups.

93. What is a Rollup?
A Layer 2 solution that executes transactions off‑chain and posts compressed transaction data to Layer 1. Optimistic rollups (fraud proofs) and Zero‑Knowledge rollups (validity proofs).

94. What is sharding?
Splitting the blockchain network into smaller partitions (shards) that process transactions in parallel, increasing throughput. Part of Ethereum’s original scalability roadmap.

95. What is an inter‑blockchain communication (IBC) protocol?
A standard enabling different blockchains to communicate and transfer assets (Cosmos IBC). Also, Polkadot’s parachain model uses similar cross‑chain messaging.

96. What is a sidechain?
A separate blockchain connected to a main chain via a two‑way peg, often with its own consensus; assets can be transferred between them.

97. What is a bridge in blockchain?
A protocol that enables the transfer of tokens or data between two distinct blockchains, often using lock‑and‑mint or burn‑and‑release mechanisms.

98. What is a zero‑knowledge proof?
A cryptographic method where one party can prove to another that a statement is true without revealing any information beyond the validity of the statement. Used in ZK‑Rollups, privacy coins.

99. What is a verifiable delay function (VDF)?
A function that takes a specified amount of time to compute, but can be verified quickly. Used in randomness generation and Proof of History (Solana).

100. What are the main differences between Bitcoin and Ethereum?
Bitcoin is primarily a digital currency/store of value with simple scripting (UTXO). Ethereum is a programmable blockchain with a Turing‑complete virtual machine, enabling smart contracts and dApps. Bitcoin uses PoW; Ethereum moved to PoS. Ethereum has faster block times and a more versatile ecosystem.

Conclusion

You’ve come to the end of this guide, and you’re glowing. Not with sweat or stress — but with a radiant confidence that radiates from deep inside, the kind that tells you: “I’ve put in the work, and it shows.” Every consensus mechanism, every smart contract principle, every cryptographic puzzle you’ve reviewed now lives inside you like a quiet, brilliant light.

You also feel utterly refreshed. Gone is the mental exhaustion that once came from trying to piece together scattered resources. In its place is a crystal-clear understanding of blockchain fundamentals and beyond. It’s the clean, cool clarity that comes after a truly meaningful study session — the kind where confusion washes away and everything suddenly clicks.

And now, you’re completely rejuvenated. Your curiosity about decentralized technology has been revived, your energy is high again, and any doubt that may have crept in earlier has been replaced by a youthful readiness to go out there and prove yourself. Walk into that interview with a radiant smile, a refreshed mind, and a rejuvenated passion for the future of trust and technology. You’re ready to be brilliant. 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top