Blockchain Developer question bank
333 questions. Filter by level and skill, track what you've solved, and see how many people get each one right.
- What gas measures
- Changing deployed code
- Keys and addresses
- Letting a contract spend tokens
- storage, memory, calldata
- Why emit events
- Standard for unique tokens
- What msg.sender is
- What links one block to the next
- The account nonce
- EOA vs contract account
- Wei and ether
- view vs pure
- Sending ETH to a function
- receive vs fallback
- Reading a missing mapping key
- What revert undoes
- What a modifier does
- Private variables are public data
- constant vs immutable
- One contract, many token types
- Token decimals
- Integer division result
- Verifying a contract on Etherscan
- Where to try a deployment
- Sharing a seed phrase
- When a block is final
- Foundry's local node
- Why use OpenZeppelin
- Properties of keccak256
- What a rollup does
- Function selector
- Running out of gas
- external vs internal
- How proof of stake secures the chain
- The Merkle root in a block
- What the mempool is
- Hot vs cold wallet
- How USDC keeps its value
- Why contracts need oracles
- Reading a transaction on a block explorer
- How often Ethereum makes a block
- The Bitcoin halving
- A 2-of-3 multisig wallet
- Coins held on an exchange
- What makes a flash loan possible
- What a zero-knowledge proof shows
- Running your own validator
- What the contract ABI is for
- How an AMM sets prices
- What a lock-and-mint bridge does
- Why Ethereum moved to proof of stake
- Bitcoin's UTXO model
- What a 51% attack allows
- What "Connect wallet" shares
- Where NFT images usually live
- How a DAO usually votes
- Layer 1 vs layer 2
- Cost of reading a view function
- Mixed-case Ethereum addresses
- What TVL measures
- Why WETH exists
- Tokens sent to the token's own address
- A stablecoin pool paying 40%
- The checks-effects-interactions order
- What nonReentrant does
- What front-running is
- Anyone can mint
- Why old contracts used SafeMath
- What an audit means
- Protecting the admin key
- Why add a timelock
- An emergency stop
- A suspicious NFT approval
- A key pushed to GitHub
- Using a DEX price directly
- What a flash loan is
- What a sandwich attack is
- Calling renounceOwnership by mistake
- Setting the treasury to zero
- A key inside the web app
- Signing a message you cannot read
- Protecting a deployer key
- A sale that ends a second late
- Why run a bug bounty
- 100% test coverage
- Contracts are fine but users lost funds
- Old unlimited approvals
- Red flags in a new token
- Admin changes with no trace
- Sending ETH to a plain address
- Looping over a mapping
- Default value of an enum
- Overriding a parent function
- What an interface may contain
- The using ... for syntax
- Comparing two strings
- What pragma ^0.8.20 allows
- How much is one gwei
- Calculating a transaction fee
- Do view functions cost gas
- Calling as another address in a test
- Seeing why a Foundry test failed
- Reading past events on chain
- A standard for yield vaults
- Spot the reentrancy bug
- Using tx.origin for auth
- Packing storage variables
- Custom errors
- Upgrading a proxy safely
- Front-running a swap
- Fuzz tests in Foundry
- Overflow in Solidity 0.8
- Base fee and priority fee
- Predicting a CREATE2 address
- Refunding outbid bidders
- Safer ownership transfer
- Tokens that return nothing
- Fee-on-transfer token deposits
- EIP-712 domain separator
- Approving with a signature
- Unchecked ecrecover
- expectRevert in the wrong place
- Testing against real protocols
- Invariant tests
- What Slither is good for
- Transient storage locks
- Blobs and rollup fees
- Reading vs writing with viem
- When to show "payment received"
- Showing a user's history
- Chain ID in transactions
- Reset that does not reset
- UUPS vs transparent proxy
- Constructors behind a proxy
- Unlimited token approvals
- Random winners on chain
- SELFDESTRUCT after Dencun
- Roles instead of one owner
- Working out a transfer fee
- Sending 1.5 USDC in base units
- Choosing slippage tolerance
- Computing a health factor
- Multiple browser wallets fighting
- What an L2 sequencer does
- How an upgradeable proxy works
- Speeding up a stuck transaction
- Later transactions all stuck
- Shares minted by an ERC-4626 vault
- Loading 40 token balances fast
- Showing an ENS name safely
- When the RPC provider goes down
- Market cap vs fully diluted value
- APR vs APY
- A positive funding rate
- How far a 10x position can fall
- Using a pull-based oracle
- Same seed, different address
- Losing precision with Number
- Tokens vested after 18 months
- Fee earned on a swap
- Why algorithmic stablecoins can collapse
- "Cannot estimate gas" before sending
- Filtering events by user
- Querying a protocol's history
- Asking the wallet to switch network
- Effective gas price with a fee cap
- Where Solana keeps program state
- Validium vs rollup
- The extra risk of restaking
- Blind signing on a hardware wallet
- stETH vs wstETH
- Why governance uses a timelock
- A transaction that was replaced
- Building Sign-In with Ethereum
- Balance not updating after a swap
- Reading a balance from last year
- A transfer fee in rupees
- An implementation nobody initialised
- Reordering variables in an upgrade
- A signed voucher used twice
- Lowering an allowance Bob can see
- A swap with no minimum output
- A swap that executes much later
- USDC payout loop reverts
- Rebasing tokens in a vault
- Assuming 18 decimals
- Casting uint256 to uint96
- An unchecked subtraction
- Hiding a trade from bots
- Mixing oracle and token decimals
- approve reverts for USDT
- Adding a variable to a base contract
- Two arrays of different lengths
- Hiding a 4-digit code with a hash
- A signature that leaves out a field
- How much to trust block.timestamp
- Finding out about an attack
- An initialize function without a guard
- Signatures from smart wallets
- What formal verification proves
- An exploit is happening now
- Anyone can grow a list
- A signed order with no expiry
- Who holds DEFAULT_ADMIN_ROLE
- Checking an upgrade before it ships
- Casting a negative price
- A token you can buy but not sell
- Address poisoning
- An NFT stuck in a contract
- A deposit of a token that does not exist
- A burn function with a from parameter
- What unchecked does
- transfer() fails for a smart wallet
- Ignoring a low-level call result
- Minimum gas for a transaction
- Reading the same slot twice
- Cost of a new storage value
- Contract too large to deploy
- msg.sender inside delegatecall
- Relying on the contract balance
- What try/catch can wrap
- An update that does not stick
- Storing history cheaply
- Computing a fee in basis points
- Removing an item from an array
- Length of a rupee string
- Testing a 7-day lock
- Catching gas regressions
- Address of a contract made with new
- Indexed event parameters
- Lending protocol price oracle
- Replaying a signed message
- First depositor in a vault
- Reentrancy through a view function
- Rollup withdrawal times
- Paying everyone in a loop
- delegatecall to user input
- Account abstraction
- Reentrancy through safeMint
- EIP-7702 and "only EOAs" checks
- Namespaced storage layout
- Using a signature as a nonce
- Domain separator after a chain split
- Hash collision with encodePacked
- msg.value inside a multicall
- Which way to round in a vault
- Constant product swap output
- Trade-offs of a TWAP oracle
- Checking a Chainlink price
- Flash-loaned voting power
- Return data gas griefing
- Relayer forwards too little gas
- Indexer shows phantom deposits
- Using block.number for time on L2
- Deployment fails on one chain
- Trusting a cross-chain message
- Why transparent proxies split callers
- A fee that rounds to zero
- Commit-reveal that can be copied
- Missing account checks on Solana
- Why ZK rollups still post data
- Expensive loop over storage
- Impermanent loss at a 4x price move
- Collateral seized in a liquidation
- The forgotten implementation contract
- Building leaves for a Merkle airdrop
- Concentrated liquidity out of range
- Why the first storage write costs most
- A private key in a NEXT_PUBLIC variable
- Changing an allowance from 100 to 50
- When collateral can be frozen
- A lookalike address in the history
- Who actually builds Ethereum blocks
- One liquid staking protocol gets too big
- Borrow rate above the kink
- How a lending pool gets bad debt
- Liquidity leaves when rewards end
- LP tokens minted on deposit
- A proposal passed at 3am
- The real trust in a bridge
- A compromised npm package in a dapp
- Drained after "just signing a message"
- Holding a rebasing token in a pool
- Scaling a price feed correctly
- Trading through intents
- Why an L2 fee spiked
- The trusted setup in a SNARK
- Signing payouts from a backend
- Pricing USDC at exactly $1
- Admin check fails for the real admin
- Why stablecoin pools use StableSwap
- Is block.timestamp safe to use
- Reentrancy through token hooks
- Guarding only one function
- Reentrancy across two contracts
- The first depositor attack
- Reward rate from the token balance
- A router that calls anything
- Pulling tokens from any address
- Merkle leaves that look like nodes
- A permit that someone uses first
- Oracle prices after an L2 outage
- Transferring tokens to yourself
- Trusted forwarder plus multicall
- How far one swap moves a pool price
- Deploy then initialise in two transactions
- One signature, two meanings
- A permit call that silently succeeds
- A harmless-looking proposal
- Claiming someone's future wallet
- A flash loan callback anyone can trigger
- Sending funds to a missing contract
- Rewards while nobody is staked
- Trading ahead of an oracle update
- Modifier order and reentrancy
- One signer counted twice
- A position that cannot be liquidated
- Where a mapping value is stored
- Where array elements are stored
- How much refund clearing storage gives
- Memory in inline assembly
- Very large memory arrays
- Price that comes out as zero
- Indexed strings in events
- Order of super calls
- Storing claim flags cheaply
- A factory with a huge init code
- A view call that reverts
- Libraries that must be linked
- A try/catch that still reverts
- A catch clause that does not match
- Immutables behind a proxy