Hunt prep
Before you test K2
What 60 disclosed reports say about K2: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing 15
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
Rounding mismatch between allowance deduction and scaled share movement
Business logic Read the lesson
The aToken transfer_from path deducts allowance in nominal units while moving rounded-up scaled shares, and a sibling report shows the router validating transfers against rounded nominal views. Test other allowance and balance paths (transfer, withdraw, borrow) for the same nominal-versus-scaled mismatch, since the rounding technique recurs in this codebase.
Backed byApproved spender exceed nominal allowance by splitting aToken tr... (2026) Scaled-share rounding mismatch breaks transfer and withdraw acco... (2026)From the lessons: Swap, deposit, mint, withdrawal and settlement functions in AMMs, vaul...; Test the protocol with several ERC20 variants (different decimals, no...
-
2
Reserve deficit omitted from other risk-limit checks
Business logic Read the lesson
Borrow-cap and debt-ceiling checks ignore the stored reserve deficit, and a related report shows the interest-rate update also treats deficit as available liquidity. Test every place that reads total debt or available liquidity (caps, ceilings, rate updates, reserve queries) to see whether the deficit is consistently excluded or included.
Backed byReserve deficit is excluded from borrow-cap and debt-ceiling che... (2026) Deficit treated as available liquidity (2026) Reserve accounting breaks fee collection when debt exceeds suppl... (2026)From the lessons: Solidity lending and commitment pool contracts with maturity borrows,...; Liquidation and force repay paths.
-
3
Pause flag coverage across entry points
Access control Read the lesson
Several reports show the global pause is checked inconsistently: repayments blocked but interest accrues, flash loans and direct aToken transfers still work. Enumerate every state-changing entry point (supply, withdraw, borrow, repay, transfer, flash loan, liquidation, swap) and check which ones consult the global pause versus only per-reserve state.
Backed byGlobal pause freezes borrower repayment but not borrow interest,... (2026) Global pause can be bypassed via direct aToken transfers, breaki... (2026) Global pause does not stop flash loans (2026)+1 more report
From the lessons: Frozen-market liquidation and voluntary close paths during the weekend...; Flash loan entry points and their interaction with frozen pools and ut...
-
4
Oracle cache freshness and config invalidation
Business logic Read the lesson
Cached prices ignore per-asset max_age, bypass disabled assets and survive oracle config changes, and a related report shows the router caches oracle config keyed only by address. Test every consumer of cached prices (borrow, withdraw, liquidation, swap) after admin config changes and after per-asset heartbeat expiry to see whether stale data is still trusted.
Backed byCached oracle prices ignore per-asset freshness limits (2026) Stale price cache bypasses oracle config changes (2026) Disabled oracle assets remain usable through the batch-price TTL... (2026)+1 more report
From the lessons: Check whether the oracle can return a stale price or a deprecated pool...; Price feeds, pool share weights and Curve or Balancer pool oracles use...
-
5
Liquidation accounting when seizure equals or exceeds collateral
Business logic Read the lesson
Reports show exact-match seizure skips deficit accounting, deeply underwater positions panic, and per-asset exhaustion forgives all debt. Test liquidation with collateral exactly equal to the bonus-inclusive seizure, with multiple collateral assets where one is dust, and with deeply underwater positions to see whether deficit and remaining debt are recorded correctly.
Backed byExact-collateral liquidation skips deficit accounting (2026) Deeply underwater liquidations panic instead of capping collater... (2026) Single-asset cap check wrongfully forgives all remaining debt (2026)+1 more report
From the lessons: The liquidation routine that seizes collateral, deducts a liquidator f...; Liquidation and force repay paths.
-
6
Close-factor and minimum-remaining-debt interaction
Business logic Read the lesson
One report shows the close factor is validated before the minimum-remaining-debt bump, and another shows the engine forwards uncapped debt. Test the liquidation entry points with amounts just under and just over the close-factor cap, with and without a configured minimum remaining debt, to see whether the final debt covered matches the validated amount.
Backed byinternal_liquidation_call validates close factor before min_rema... (2026) Engine uses uncapped debt for executed liquidation (2026) MIN_LEFTOVER_BASE Prevents Valid Max-Close-Factor Liquidations (2026)From the lessons: Liquidation and force repay paths.; Front-run a liquidation with a minimal repayment of the outstanding de...
-
7
Reward index checkpointing across config and balance changes
Business logic Read the lesson
Reports show stale reward indexes accrue across inactive periods, config setters rewrite unaccrued rewards, claims use stale balances and post-exit settlement erases pending rewards. Test reward configuration changes, deactivation and reactivation, and full exits to see whether the index is checkpointed before each state change and whether the prior balance is used for settlement.
Backed byStale reward indexes accrue emissions across inactive periods (2026) Emission updates retroactively rewrite unaccrued rewards (2026) Manual reward claims use stale accrued balances (2026)+2 more reports
From the lessons: Staking contracts with reward indexes, vesting periods, native reward...; Reward accumulation updates in staking and vault contracts.
-
8
Reserve slot and collateral-bit invariants across entry points
Business logic Read the lesson
Reports show the slot-limit check uses the wrong predicate, transfers auto-enable collateral without consent, and swap_collateral skips the reserve cap and minimum first deposit. Test every path that can set a collateral bit or create a reserve position (supply, transfer, swap_collateral, manual enable) against the 15-reserve limit and pause/freeze state.
Backed byWrong active-slot check (2026) Reserve-slot squatting DoS via forced aToken recipient collatera... (2026) swap_collateral bypasses MAX_USER_RESERVES and MIN_FIRST_DEPOSIT... (2026)From the lessons: Solidity lending and commitment pool contracts with maturity borrows,...; Initialise and setup functions on newly deployed contracts.
-
9
Cross-contract ABI and caller forwarding in configurator and incentives
Access control Read the lesson
Reports show the configurator forwards the wrong caller, calls cap setters with an extra argument, and the incentives contract decodes scaled_total_supply with the wrong type. Test every configurator-to-router and incentives-to-token call for argument count, caller identity and return type, since these silent failures disable admin and reward paths.
Backed byWrong actor forwarding bricks token upgrade flows (2026) Cap and ceiling setters call the router with the wrong ABI (2026) Incentives silently skip reward checkpointing by querying scaled... (2026)+1 more report
From the lessons: Two-step admin and ownership transfer functions.
-
10
ACL list bounds and membership enforcement
Access control Read the lesson
One report shows ACL membership checks only examine the first 64 entries while setters store unbounded lists, and another shows liquidation bypasses reserve-level access rules. Test whitelist and blacklist enforcement at the boundary (entries beyond 64, tail entries) and across liquidation and settlement paths that may skip reserve-level checks.
-
11
Health-factor threshold and overflow edge cases
Business logic Read the lesson
Reports show the configurable health-factor threshold is ignored in key paths and that tiny nonzero debt with large collateral overflows the health-factor calculation. Test liquidation and collateral-management paths with a non-default threshold and with dust debt plus large collateral to see whether the stored threshold is read and whether the calculation saturates.
Backed byConfigured health-factor threshold is ignored in key paths (2026) Dust-sized debt can turn a very safe account into a MathOverflow... (2026) Stale collateral indices understate health factor (2026)From the lessons: Solidity lending and commitment pool contracts with maturity borrows,...; Liquidation and force repay paths.
-
12
Token transfer accounting for non-standard reserve tokens
Business logic Read the lesson
One report shows minting and collateral credit use the requested amount rather than the received balance, and a sibling shows swap output is trusted without settlement verification. Test supply, swap and liquidation settlement with fee-on-transfer and non-returning tokens to see whether the actual balance delta is measured before crediting.
Backed byUnchecked token transfers mint unbacked collateral (2026) Swap output is trusted without settlement verification (2026)From the lessons: Use a fee-on-transfer token as the asset or collateral and check wheth...; Use a token that returns false or no value from transfer and check whe...; Any contract that calls transfer or transferFrom directly on an arbitr...
-
13
Dust repayment and burn result handling
Business logic Read the lesson
Reports show zero-scaled repay clears debt and dust cleanup burns more than callers account for. Test repay and liquidation settlement at the boundary where the scaled repayment floors to zero or one, and check whether the router uses the actual burn result rather than the requested amount for borrow flags and deficit accounting.
Backed byZero-scaled repay clears debt (2026) Dust cleanup burns more debt than callers account for (2026)From the lessons: Liquidation and force repay paths.; The liquidation routine that seizes collateral, deducts a liquidator f...
-
14
Flash liquidation repayment verification and pause state
Business logic Read the lesson
Reports show flash liquidation drains the debt reserve because repayment only checks the aToken balance is restored, and prepared flash liquidation bypasses collateral pause at execution. Test the two-step flash liquidation flow for net-new funds verification and for pause checks at execution time, since both steps reload reserves but only one validates state.
Backed byEvery flash liquidation permanently drains the debt-asset reserv... (2026) Prepared flash liquidation can bypass collateral reserve pause (2026)From the lessons: Flash loan entry points and their interaction with frozen pools and ut...; Re-enter borrower operations or a flash loan path and check whether fu...
-
15
Reserve ID and asset-list lifecycle bounds
Reports show reserve IDs are retired without recycling until creation permanently fails, and the oracle asset list can grow past its cap and truncate on removal. Test reserve creation and drop cycles and oracle asset add and remove sequences to see whether counters and list invariants are preserved across the full lifecycle.
Backed byPermanent protocol brick via reserve ID exhaustion — drop reserv... (2026) Broken asset-list invariant causes DoS and orphaned whitelist st... (2026)From the lessons: Initialise and setup functions on newly deployed contracts.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 40 | 0 | – | – | $0 |
| DoS lesson | 8 | 0 | – | – | $0 |
| Access control lesson | 7 | 0 | – | – | $0 |
| Smart contracts lesson | 4 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Protocol fee is significantly overcharged upon liquidations
The fee should be calculated from the collateral bonus, as the comment and the Aave reference describe, rather than from the debt to cover.
Disclosed
-
swap_collateral bypasses MAX_USER_RESERVES and MIN_FIRST_DEPOSIT , enabling reserve fragmentation that strands bad debt
The swap_collateral function should detect a first position in the destination reserve and reject it when the user already holds the maximum number of reserves or when the amount is below the minimum first deposit.
Disclosed
-
Every flash liquidation permanently drains the debt-asset reserve, making depositors unable to withdraw their funds
The internal flash-loan mechanism should be removed from the liquidation path so that the router seizes collateral, swaps it, and transfers the recovered debt asset directly to the aToken, ensuring the reserve receives net-new funds.
Disclosed
-
Deficit treated as available liquidity
The rate update should subtract the stored reserve deficit or read the aToken's actual underlying balance when deriving available liquidity.
Disclosed
-
Swap output is trusted without settlement verification
The adapter was fixed to snapshot its output-token balance before the external call, compute the actual settled delta, enforce min_amount_out against that real delta, and only transfer the actually received amount.
Disclosed
-
Stale price cache bypasses oracle config changes
The batch path should enforce the current asset configuration before serving cached data, and every oracle-relevant admin change should clear the cached prices.
Disclosed
-
Cached oracle prices ignore per-asset freshness limits
Cached entries should be rejected once they exceed the effective per-asset freshness bound, not just the global threshold.
Disclosed
-
Zero-scaled repay clears debt
The debt token should reject zero scaled repayments or not treat them as dust cleanup, and the router should validate the burn result.
Disclosed
-
Self-liquidation with receive_a_token = true bypasses collateral seizure via from == to self-transfer in transfer_on_liquidation , socializing residual debt to reserve deficit
The router should reject self-liquidation before any state mutation, as the report recommends.
Disclosed
-
Dust cleanup burns more debt than callers account for
The router should reconcile transfers, borrow-flag updates, and deficit accounting to the actual burn result returned by the debt token, rather than relying on requested or pre-burn amounts.
Disclosed
-
Unchecked token transfers mint unbacked collateral
The router should measure the actual post-transfer balance delta and mint and validate caps against that measured amount rather than the requested amount.
Disclosed
-
Same-Asset Borrow Positions Can Become Insolvent With No Working Liquidation Path
The borrow path should reject same-asset debt positions at creation, and the prepared and execute liquidation paths should enforce the same collateral-asset-differs-from-debt-asset check used by direct liquidation.
Disclosed
-
MIN_LEFTOVER_BASE Prevents Valid Max-Close-Factor Liquidations
The leftover threshold should be reduced to a true dust value, made reserve-specific and configurable, or clamped to a full close-out, so it never rejects a repayment the close factor permits.
Disclosed
-
Collateral can be enabled despite pause/freeze or invalid pricing
Collateral enablement should go through one shared eligibility check that enforces pause/freeze state and oracle validity on every path, including transfers and manual re-enablement.
Disclosed
-
Factory reserve tokens cannot be upgraded through the intended path
The upgrade flow should be redesigned so the effective caller and nested authorisation match the stored admin model.
Disclosed