Skip to content

In-depth lesson · bug class

Smart contract vulnerabilities

What every disclosed Smart contracts report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.

reports cited in this lesson
586

Learning Smart contracts reading list Smart contracts, step 1

Overview

What it is and why programs pay for it.

Smart contract vulnerabilities are flaws in on-chain code that let someone act outside the rules the contract was meant to enforce. For bug bounty hunters they are a broad and rewarding class of target, because the code is public, the state is observable and the impact is usually measurable in tokens or in broken protocol behaviour. Programs care because a single flaw can drain a pool, freeze deposits or let an attacker take control of a freshly deployed contract, and because these bugs often survive audits when they sit in edge cases such as unusual tokens, callbacks or initialisation order.

Seen in these reports1

How it works

The mechanics, as the reports show them.

A second pattern is state updated after an external call. A function sends tokens, native currency or an NFT, or calls a receiver callback, and only then writes the new balances. If the recipient is a contract, it can re-enter the function before the write lands and act on the old state. Variants include a guard that covers the direct entry point but not a callback path, a read-only reentrancy where a dependent contract trusts a price that is mid-update, and re-entry through token hooks such as ERC777. The fix is always the same shape: update state first and guard every entry point, including callbacks.

A fifth pattern is a price source that can be moved within a single transaction or that returns stale data. Spot prices from a pool, pool share weights and Curve or Balancer pool oracles can be shifted with a flash loan before a lending or vault operation reads them. Oracles that time out may return a huge but valid high price instead of reverting. Slippage bounds computed from manipulable pool state, or with division before multiplication, can be far looser than intended. The common thread is that the contract trusts a number it did not verify against a manipulation-resistant source with a freshness check.

Year by year

6 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2025: 269
Reports per year
20172
20181
20191
202152
2022220
2023206
2024171
2025269
202661
  1. 2026

    61 reports

    Kept working1

    • Cross-contract and cross-service reentrancy recurred in staking withdraw, service creation and liquidation paths, in the disclosed reports.

    Turned up less1

    • Vault deposit, withdraw and redeem slippage findings, common in 2024 and 2025, are rarer in this year's reports.
  2. 2025

    269 reports

    New this year2

    • Cross-contract or cross-service reentrancy rather than simple single-function reentrancy appears clearly in this year's reports.
    • DEX aggregator integrations and their leftover approval handling appear as a target in the disclosed reports.

    Turned up less1

    • Simple single-function reentrancy, the largest group in 2022 and 2023, is rarer in this year's reports as findings shift to cross-contract forms.
  3. 2024

    171 reports

    New this year1

    • Deploying a contract to an address that collides with a precompile and checking whether deployment succeeds appears in the disclosed reports.

    Kept working3

    • Reentrancy appeared throughout withdrawals, claims, flash loans, mints and cross contract calls, in the disclosed reports.
    • Missing or incorrect slippage control remained dominant across swaps, vaults, staking, bridging and reward claims, in the disclosed reports.
    and 1 more
Every point, year by year

Where it is found

15

The features and places the reports found it in, most-reported first.

  1. Functions that make external calls to tokens, native currency or NFTs before updating state.

    Seen in 18 reports
  2. Any contract that calls transfer or transferFrom directly on an arbitrary token.

    Seen in 6 reports
  3. Price feeds, pool share weights and Curve or Balancer pool oracles used for lending and vaults.

    Seen in 6 reports
  4. Strategy allocation and deallocation functions in vaults.

    Seen in 5 reports
  5. Contracts that accept arbitrary ERC20 tokens as assets, collateral or rewards.

    Seen in 3 reports

Technologies in these reports6

View all 15

Root causes

31

The mistakes in the code or configuration behind the reports.

  1. State is updated after an external call, or a function with a callback lacks a reentrancy guard.

    Seen in 18 reports
  2. State is updated after an external call, or the reentrancy guard can be bypassed, in withdraw, claim, swap and mint paths.

    Seen in 11 reports
  3. Return values from transfer and transferFrom are ignored, so failed transfers are treated as successful.

    Seen in 6 reports
  4. The price source can be moved within a single transaction or returns stale data.

    Seen in 6 reports
  5. Functions that swap, mint, redeem or provide liquidity do not enforce a minimum output or maximum input.

    Seen in 5 reports
View all 31

Things to try

The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.

ticked in this lesson

Reentrancy in withdrawals and redemptions

of 3 ticked
More in Reentrancy in withdrawals and redemptions

Other

of 3 ticked
More in Other

Reward and harvest distribution

of 3 ticked
More in Reward and harvest distribution

Minimum output and slippage bounds

of 3 ticked
More in Minimum output and slippage bounds
View more things to try

Bypasses and variations

3

How reports got past filters, encoders and other defences.

  1. Re-enter through a token callback or a read-only call rather than the main function.

    Seen in 1 report
  2. Make the oracle revert so the code falls back to a path with no slippage check.

    Seen in 1 report
  3. Re-enter through a token or receiver callback to get past a guard that only covers the direct entry point.

    Seen in 1 report

Payouts

Public bounties in US dollars, from the data. 0 of 1,035 reports show an amount.

None of these reports shows a public amount yet.

Typical fixes

11

How programs fixed it, as the reports describe.

  1. Add a non-reentrancy modifier and update state before external calls.

    Seen in 18 reports
  2. Update state before external calls and apply a reentrancy guard across all entry points including callbacks.

    Seen in 11 reports
  3. Use a safe transfer helper that checks the return value and reverts on failure.

    Seen in 6 reports
  4. Require a caller-supplied minimum output, maximum input and deadline on every swap, mint, redeem and liquidity operation.

    Seen in 5 reports
  5. Enforce a minimum output or slippage bound on every strategy allocation and redemption.

    Seen in 5 reports
View all 11

Tips for beginners

3

Advice for a first hunt, drawn from the reports.

  1. For price dependent code, identify the exact source and ask whether it can be moved inside one transaction. Spot pool prices, pool share weights and pool oracles are the usual suspects. Also check what happens on timeout: a stale or huge but valid price is often worse than a revert.

    Seen in 2 reports
  2. Check the order of operations in every function that makes an external call. If state is written after the call, or if a callback path exists without the guard used on the main path, you have a candidate. Confirm it by tracing what the recipient can do before the write lands.

    Seen in 1 report
  3. Test with unusual tokens rather than the standard one. A token that returns false or no value, one with decimals other than eighteen, one that charges a fee on transfer, and one that rejects non-zero-to-non-zero approvals will each expose a different assumption. Report the specific token behaviour that breaks the contract, not a generic complaint about token support.

    Seen in 1 report

Guides and techniques

View all

The best explainers, cheat sheets and technique posts on Smart contracts, from around the web.

Keep learning

Where this lesson fits, and what to read next.

How this is made: our model read every listed Smart contracts report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 27 Nov 2026 from 594 reports. All Smart contracts reports.