Blockchain Security and Risk Management
This domain tests whether you can identify threats across the whole stack - network, consensus, smart contract, key management and governance - and select proportionate controls. Questions often present an incident or code snippet and ask for the root cause or the correct mitigation, so distinguish protocol-level risks from implementation bugs.
Core rules
- Network layer: eclipse attacks isolate a node's peers; Sybil attacks create fake identities; DDoS targets endpoints and RPC services.
- Consensus layer: a 51% attacker can reorder or censor transactions and attempt double spending; finality assumptions matter.
- Smart contracts: reentrancy, integer issues, unchecked external calls, access-control gaps, oracle manipulation and front-running are recurring classes. Use checks-effects-interactions, reentrancy guards, pull payments, tested libraries and independent audits.
- Key management: hardware security modules, multisignature or threshold signing, separation of duties, and tested recovery procedures. Lost keys mean lost assets; leaked keys mean immediate compromise.
- Privacy: on-chain data is replicated and permanent. Use private channels, zero-knowledge proofs or off-chain storage with on-chain hashes.
- Governance and operations: upgrade paths, endorsement policies, monitoring, incident response and vendor risk all belong in the risk register.
Worked example
A Solidity withdrawal function sends Ether with an external call and only then sets balances[msg.sender] = 0. An attacker's fallback function calls withdraw again before the balance is cleared, draining funds. Reasoning: control transfers to untrusted code before state is finalized. Fix: apply checks-effects-interactions by zeroing the balance first, add a reentrancy guard, and prefer pull-over-push payments. The vulnerability is an implementation defect, not a flaw in Ethereum consensus.
Traps
- Treating a completed audit as proof that a contract is secure.
- Assuming immutability is purely beneficial; deployed bugs are also permanent.
- Believing hashing or encryption makes public ledger data private.
- Ignoring endpoint and key security while focusing only on consensus.
- Confusing a 51% attack with theft of private keys.