FREE Blockchain Developer Blockchain Security and Vulnerabilities Questions and Answers Flashcards
6 cards from real Blockchain Technology practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 FREE Blockchain Developer Blockchain Security and Vulnerabilities Questions and Answers flashcards as text
What is a flash loan attack in DeFi?
Answer: Exploiting uncollateralized loans within a single transaction to manipulate protocol state
Flash loan attacks exploit the ability to borrow large amounts without collateral within one transaction, using the funds to manipulate prices or exploit vulnerable smart contracts before repaying.
Which vulnerability does the Checks-Effects-Interactions pattern specifically prevent?
Answer: Reentrancy attacks
The Checks-Effects-Interactions pattern prevents reentrancy by updating contract state before making external calls, so re-entrant calls see the already-updated state.
What is transaction front-running on a blockchain?
Answer: Submitting a transaction with higher gas to execute before a pending target transaction
Front-running involves observing a pending transaction in the mempool and submitting a competing transaction with higher gas fees to get it mined first.
What is the primary risk of using tx.origin for authentication in Solidity?
Answer: A malicious intermediate contract can pass the tx.origin check of the original sender
Using tx.origin for auth is dangerous because if a user interacts with a malicious contract, that contract can call the target contract and tx.origin will still be the user's address.
Which attack vector targets the random number generation in smart contracts that use block variables?
Answer: Block timestamp manipulation by miners
Miners can influence block timestamps and other block variables within certain bounds, making on-chain randomness based on these values predictable and exploitable.
What does a sandwich attack in DeFi involve?
Answer: Placing transactions both before and after a victim's swap to profit from the price impact
A sandwich attack places a buy order before and a sell order after a victim's large swap, profiting from the predictable price movement caused by the victim's trade.