Audit practice · Free study companion
Spot the Bug: Solidity Security Challenges
Ten pause-before-the-reveal Solidity challenges. Identify the broken invariant, explain the impact and propose a fix with a regression test.
12 Whop lessons · 3 study checkpoints · 10 matching quizzes
Watch the course on Whop ↗
Checkpoint 1
Identity, state and time
Check what a guard actually establishes. A nonzero address is not proof of the correct contract or interface. An external call can move control before your state is safe, a Merkle claim needs the right binding and consumption rules, and time comparisons need tests at the boundary.
Watch the matching lessons (4)
Check your understanding
Spot the Bug: the empty-address trap →
3 questions · Worked answers · No sign-in needed
Spot the Bug: sends first, asks later →
3 questions · Worked answers · No sign-in needed
Spot the Bug: the Merkle proof that proves the wrong thing →
3 questions · Worked answers · No sign-in needed
Spot the Bug: the cliff that never held →
3 questions · Worked answers · No sign-in needed
Practical challenge
Choose one identity or state challenge and write a minimal counterexample.
Check your work
- Name a reachable precondition.
- Test the fix at and immediately around the boundary.
Further reading
Checkpoint 2
Prices, shares and arithmetic
Arithmetic and economic assumptions interact. Spot prices may be manipulable, feeds may be stale, donations can distort share accounting and integer division can erase a small entitlement. State the asset and share invariant, then test small values and adversarial transaction order instead of only typical deposits.
Watch the matching lessons (4)
Check your understanding
Spot the Bug: spot price from reserves →
3 questions · Worked answers · No sign-in needed
Spot the Bug: the stale price trap →
3 questions · Worked answers · No sign-in needed
Spot the Bug: first-depositor share inflation →
3 questions · Worked answers · No sign-in needed
Spot the Bug: divide before multiply →
3 questions · Worked answers · No sign-in needed
Practical challenge
Create a toy share or rounding example with small integer values.
Check your work
- Show the expected and actual entitlement.
- Include a donation, stale input or reordered operation where relevant.
Further reading
Checkpoint 3
Replay and governance
Valid authorization is not the same as safe reuse. A bridge message needs appropriate identity and one-time consumption, and a governance check must consider how voting power is obtained. Explain the attacker’s reachable sequence, then propose a regression that rejects it without blocking intended behavior.
Watch the matching lessons (2)
Check your understanding
Spot the Bug: the bridge replay trap →
3 questions · Worked answers · No sign-in needed
Spot the Bug: voting power you can rent →
3 questions · Worked answers · No sign-in needed
Practical challenge
Describe a replay or borrowed-vote sequence and a regression.
Check your work
- Specify the message identity or voting-power assumption.
- Check legitimate one-time use still succeeds.
Further reading
Explain the decision, not just the answer.
After each checkpoint, write one assumption you changed and one test you would add. Bring a sanitized example or a specific question to the free Academy community.
Find your way around the community →