0
0
Blockchain / Solidityprogramming~5 mins

Common vulnerability patterns in Blockchain / Solidity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a reentrancy attack in blockchain smart contracts?
A reentrancy attack happens when a contract calls another contract that calls back into the first contract before the first call finishes, allowing the attacker to drain funds repeatedly.
Click to reveal answer
beginner
Why is integer overflow a risk in smart contracts?
Integer overflow occurs when a number exceeds the maximum value a variable can hold, causing it to wrap around and produce incorrect results, which attackers can exploit to manipulate contract logic.
Click to reveal answer
intermediate
What does 'front-running' mean in blockchain transactions?
Front-running is when an attacker observes a pending transaction and submits their own transaction with higher fees to get processed first, gaining unfair advantage.
Click to reveal answer
intermediate
Explain the 'unchecked call' vulnerability.
Unchecked call vulnerability happens when a contract calls another contract without checking if the call succeeded, which can lead to unexpected behavior or loss of funds.
Click to reveal answer
advanced
What is the risk of using tx.origin for authentication?
Using tx.origin for authentication is risky because it can be tricked by phishing attacks where a malicious contract initiates a call, making the contract think the original user authorized it.
Click to reveal answer
What vulnerability allows repeated withdrawal of funds before state updates?
AInteger overflow
BReentrancy attack
CFront-running
DUnchecked call
Which vulnerability involves numbers wrapping around their max value?
AInteger overflow
BFront-running
CUnchecked call
DReentrancy
What is front-running in blockchain?
ACalling a contract without checking success
BUsing tx.origin for authentication
CManipulating transaction order by paying higher fees
DOverflowing integers
Why is using tx.origin for authentication dangerous?
AIt ignores call success
BIt causes integer overflow
CIt allows reentrancy
DIt can be tricked by phishing attacks
What happens if a contract does not check the success of an external call?
AIt can lead to unchecked call vulnerability
BIt causes front-running
CIt prevents reentrancy
DIt fixes integer overflow
Describe three common vulnerability patterns in blockchain smart contracts and how attackers exploit them.
Think about how contracts interact and how attackers can manipulate transaction order or data.
You got /4 concepts.
    Explain why using tx.origin for authentication is unsafe and suggest a safer alternative.
    Consider who initiates the call and how contracts verify the caller.
    You got /3 concepts.