Hunt prep
Before you test Blueberry Update #3
What 78 disclosed reports say about Blueberry Update #3: 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 14
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
Check other spell contracts for the same wrong-token burn bug
Business logic Read the lesson
The ShortLongSpell reports show the wrong token being burned when adding to or withdrawing a position. Test the equivalent burn and deposit paths in the other spell contracts (Aura, Convex, Curve, Ichi) to see whether any of them pass the underlying token where the vault share token is expected, since the same copy-paste pattern may recur across spells.
Backed byShortLongSpell#openPosition attempts to burn wrong token (2023) ShortLongSpell#openPosition uses the wrong balanceOf when determ... (2023) M-03 wrong token address on `ShortLongSpell.sol` (2023)From the lessons: Vault deposit, withdraw and redeem functions across yield and staking...; Token transfer and approval helpers in vaults and strategies.
-
2
Probe reward-token accounting when adding to existing farm positions
Business logic Read the lesson
Several reports show rewards left in the spell contract when a user adds to an existing position, with later users able to claim them. Test the add-to-position path on each farm spell and check whether all accrued reward tokens are returned to the original user rather than stranded for the next caller.
Backed byAuraSpell#openPositionFarm fails to return all rewards to user (2023) Users who deposit extra funds into their Ichi farming positions... (2023) attackers will keep stealing the `rewards` from Convex SPELL (2023)From the lessons: Reward accumulation updates in staking and vault contracts.; Yield distribution and reward treasury contracts.
-
3
Test slippage parameters that are checked but never applied
Business logic Read the lesson
Reports show slippage limits being passed as zero, set to the maximum, or checked without being used. Walk every swap, join and exit path in the spell contracts and confirm the user-supplied minimum output is actually enforced in the call, not just validated in a branch.
Backed byShortLongSpell#_withdraw checks slippage limit but never applies... (2023) Deadline check is not effective, allowing outdated slippage and... (2023) UniswapV3 sqrtRatioLimit doesn't provide slippage protection and... (2023)From the lessons: Check whether every swap, deposit or mint path enforces a user-supplie...; Swap with an incorrect slippage value and check whether the swap can b...; Set the slippage parameter to a value that passes the check but still...
-
4
Look for more oracle maths errors in LP pricing
Business logic Read the lesson
The oracle reports show unit mistakes, wrong token ordering and spot-price reliance in LP valuation. Test the remaining oracle adapters (weighted and stable BPT, Ichi, Curve) for similar scaling, ordering and spot-versus-TWAP assumptions, since each adapter appears to have been written separately.
Backed byCurveTricryptoOracle#getPrice contains math error that causes LP... (2023) CurveTricryptoOracle incorrectly assumes that WETH is always the... (2023) Stable BPT valuation is incorrect and can be exploited to cause... (2023)From the lessons: Price feeds, pool share weights and Curve or Balancer pool oracles use...; Check whether the oracle can return a stale price or a deprecated pool...
-
5
Check oracle adapters for stale, bounded and missing feeds
Business logic Read the lesson
Reports cover missing staleness checks, minAnswer bounds, sequencer status and tokens without feeds. Test each Chainlink-backed adapter for these conditions and for how the bank behaves when a feed reverts, since a single unhandled feed can freeze liquidations across the protocol.
Backed byChainlink's latestRoundData return stale or incorrect result (2023) ChainlinkAdapterOracle will return the wrong price for asset if... (2023) Missing checks for whether Arbitrum Sequencer is active (2023)From the lessons: Check whether the oracle can return a stale price or a deprecated pool...
-
6
Test ERC20 variants against vault and spell approve paths
Business logic Read the lesson
The USDT approve report and the Ichi allowance report show assumptions about token return values and allowance behaviour. Test deposits and withdrawals with tokens that return no value, charge a transfer fee, or reduce allowances, and check whether accounting uses the amount actually received.
Backed byapprove() call with incorrect function signature will make any S... (2023) WIchiFarm will break after second deposit of LP (2023) Complete debt size is not paid off for fee on transfer tokens, b... (2023)From the lessons: Deposit a USDT-like token that rejects non-zero-to-non-zero approvals...; Test the protocol with several ERC20 variants (different decimals, no...; Use a fee-on-transfer token as the asset or collateral and check wheth...; Call every transfer and transferFrom path with a token that returns fa...; Use a token whose approve and transfer do not return a boolean and che...
-
7
Probe rounding in share and debt calculations
Business logic Read the lesson
The borrow rounding report shows small amounts converting to zero shares. Test the same share maths in lend, withdrawLend, repay and liquidation paths, and check whether any of them accept a zero-share or zero-amount result that lets value move without a matching debt or collateral change.
Backed byA borrower might drain the vault by calling borrow() repeatedly... (2023) Interest component of underlying amount is not withdrawable usin... (2023) Users can be liquidated prematurely because calculation understa... (2023)From the lessons: Vault deposit, withdraw and redeem functions across yield and staking...; Trigger an internal outflow and check whether deposited share counters...
-
8
Test position size and LTV checks with user-supplied identifiers
Access control Read the lesson
Reports show the max position size and max LTV checks can be bypassed using balances or strategy identifiers the caller controls. Test openPosition and reducePosition with mismatched strategy identifiers and repeated deposits to see whether the checks use the real position rather than a caller-supplied value.
Backed byThe maximum size of an `ICHI` vault spell position can be arbitr... (2023) Users can get around MaxLTV because of lack of strategyId valida... (2023)From the lessons: Strategy allocation and deallocation functions in vaults.; Liquidation and force repay paths.
-
9
Check liquidation payout maths for multi-debt positions
Business logic Read the lesson
The liquidation report shows payout calculated from a single debt token's share rather than total debt value. Test liquidations on positions with more than one debt token and confirm the collateral and underlying released match the value repaid, including after interest accrual.
Backed byLiquidator can take all collateral and underlying tokens for a f... (2023) Fail to accrue interests on multiple token positions (2023) totalLend isn't updated on liquidation, leading to permanently i... (2023)From the lessons: Liquidation and force repay paths.; Liquidation, repayment and debt takeover flows where front-running can...; Front-run a liquidation with a minimal repayment of the outstanding de...
-
10
Look for read-only reentrancy in other pool oracles
Business logic Read the lesson
The BalancerPairOracle report shows pricing from pool balances without checking the vault's reentrancy guard. Test the other pool oracles and any valuation that reads pool state during a join or exit callback, since the same pattern may exist wherever pool reserves are read.
Backed by`BalancerPairOracle` can be manipulated using read-only reentran... (2023) Potential flash loan attack vulnerability in `getPrice` function... (2023)From the lessons: Re-enter through a token callback or a read-only call rather than the...; Re-enter a redemption or swap function through a callback and check wh...
-
11
Test pause and repay interactions around liquidation
Business logic Read the lesson
Reports show liquidations staying enabled while repay is paused and a missing pause check on withdrawLend. Test each pause flag against the actions it should block, and check whether users can still repay or reduce positions during an emergency pause.
Backed byLiquidations are enabled when repayments are disabled, causing b... (2023) Issue 290 from previous contest has not been fully addressed by... (2023) `BlueBerryBank.withdrawLend` function cannot be paused (2023)From the lessons: Liquidation and force repay paths.; Liquidation, repayment and debt takeover flows where front-running can...
-
12
Check reward token list changes against stored arrays
Reports show fixed-size reward arrays breaking when tokens are added or removed. Test the Aura and Convex wrappers by simulating a reward token being added or removed after deposit, and check whether pendingRewards and liquidation still work.
Backed byWAuraPools will irreversibly break if reward tokens are added to... (2023) rewardTokens removed from WAuraPool/WConvexPools will be lost fo... (2023) CVX/AURA distribution calculation is incorrect and will lead to... (2023)From the lessons: Reward accumulation updates in staking and vault contracts.; Yield distribution and reward treasury contracts.
-
13
Probe fee-manager and fee-rate consistency across bank and vaults
Business logic Read the lesson
Reports show cached addresses and wrong fee rates causing inconsistent fees. Test fee changes on config and check whether the bank and each vault read the same source, and whether deposit and withdraw fee rates are applied to the correct operation.
Backed byUpdating the feeManger on config will cause desync between bank... (2023) BasicSpell.doCutRewardsFee uses depositFee instead of withdraw f... (2023)From the lessons: Vault deposit, withdraw and redeem functions across yield and staking...; Yield distribution and reward treasury contracts.
-
14
Test array length handling in Balancer join and exit requests
Business logic Read the lesson
Reports show mismatched array lengths and malformed user data breaking joins and exits. Test the join and exit builders in the Aura and Convex spells with the lpToken included and with empty user data, and check the request encodes the correct join kind and matching array lengths.
Backed byAuraSpell `openPositionFarm` will revert when the tokens contain... (2023) AuraSpell#openPositionFarm uses incorrect join type for balancer (2023) UserData for balancer pool exits is malformed and will permanent... (2023)From the lessons: Stableswap and AMM provide-liquidity, withdraw-liquidity and single-si...; Swap, deposit, mint, withdrawal and settlement functions in AMMs, vaul...
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 | 48 | 0 | – | – | $0 |
| DoS lesson | 10 | 0 | – | – | $0 |
| Smart contracts lesson | 5 | 0 | – | – | $0 |
| Access control lesson | 2 | 0 | – | – | $0 |
| Race condition lesson | 1 | 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.
-
CVX/AURA distribution calculation is incorrect and will lead to loss of rewards at the end of each cliff
The reward calculation should cache the reward per token when rewards are claimed upon withdrawal, so that only unminted AURA is handled with the current rate.
Disclosed
-
AuraSpell `openPositionFarm` will revert when the tokens contains `lpToken`
Remove the assembly code that decreases the length of amountsIn when isLPIncluded is true, so that both arrays have the same length.
Disclosed
-
AuraSpell#closePositionFarm will take reward fees on underlying tokens when borrow token is also a reward
The reward fee should be taken before burning the BLP tokens, following the same order as ConvexSpell.
Disclosed
-
wrong bToken's exchangeRateStored used for calculate ColleteralValue
The fix is to use the underlying token's bToken exchange rate instead of the debt token's in getIsolatedCollateralValue.
Disclosed
-
Mainnet oracles are incompatible with wstETH causing many popular yields strategies to be broken
A special bypass should be created for wstETH that uses the stETH oracle and its current exchange rate.
Disclosed
-
WAuraPools doesn't correctly account for AuraStash causing all deposits to be permanently lost
The contract should check if a reward token is stash AURA and send regular AURA instead, similar to the logic in AuraSpell.
Disclosed
-
CurveTricryptoOracle#getPrice contains math error that causes LP to be priced completely wrong
The division by the ETH price should be removed so the oracle returns the LP price in USD.
Disclosed
-
ConvexSpell is completely broken for any curve LP that utilizes native ETH
The issue should be fixed by converting between native ETH and wETH to avoid calling balanceOf on the native ETH placeholder address.
Disclosed
-
approve() call with incorrect function signature will make any SoftVault deployed with USDT as the underlying token unusable
Add support for USDT by using an interface with ERC20 functions that do not return values.
Disclosed
-
AuraSpell#closePositionFarm exits pool with single token and without any slippage protection
Allow the user to specify a minimum amount received from the exit.
Disclosed
-
CurveTricryptoOracle incorrectly assumes that WETH is always the last token in the pool which leads to bad LP pricing
The oracle should fetch the price for each asset in the pool and use those prices directly in the lpPrice calculation, without assuming a fixed token order.
Disclosed
-
Users will fail to close their Convex position if the Curve pool is killed
The ConvexSpell should include an isKilled check similar to the CurveSpell, allowing liquidity removal via remove_liquidity when the pool is killed.
Disclosed
-
ConvexSpell/CurveSpell.openPositionFarm will revert in some cases
The supplied amount should be set to the borrowed balance rather than the contract's full balance, or the approval should cover the full balance after checking it is at least the borrowed amount; the text notes the same fix is needed in ConvexSpell.
Disclosed
-
Adversary can abuse hanging approvals left by PSwapLib.swap to bypass reward fees
The contract should reset allowances to zero after each swap.
Disclosed
-
Stable BPT valuation is incorrect and can be exploited to cause protocol insolvency
Stable BPT oracles should use a new pricing methodology.
Disclosed