What is a smart contract, and what are its main limitations?
What the interviewer wants to hear
- Program deployed on a blockchain that runs deterministically
- Holds state and funds and executes when called by transactions
- Code is public and usually immutable
- Cannot access off-chain data directly; needs oracles
- Every operation costs gas; storage is expensive
Model answer
A smart contract is a program deployed to a blockchain at its own address. It stores state, like token balances, and can hold funds. It runs only when someone sends a transaction or another contract calls it, and every node executes it and must get the same result, so it is deterministic. Its main strength is that the rules are public and enforced by the network, so no one can secretly change them. The limitations come from the same design. Code is usually immutable, so bugs are hard to fix unless you planned an upgrade path. Every operation costs gas, and storing data on chain is expensive. Contracts cannot call web APIs or know real-world facts like a stock price; they need oracles. They cannot run on a timer by themselves either; someone must trigger them. And because code is public, attackers can study it.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy Blockchain Developer questions
- Explain what a blockchain is to someone who is not technical.
- What is the ERC-20 standard and what are its key functions and events?
- What is the difference between proof of work and proof of stake?
- Describe the basic architecture of a decentralised application (dApp).
- How does a crypto wallet work, and what is the role of the private key and the seed phrase?
- How are transaction fees calculated on Ethereum today?
- Compare ERC-20, ERC-721 and ERC-1155. When would you use each?
- What are Layer 2 networks, and why are they important for Ethereum?
- What are events in Solidity, and how do you use them in a real project?