Skip to content

Sherlock

Blueberry Update #3

Every publicly disclosed report for Blueberry Update #3 and what kind of bugs they were.

disclosed reports
78
most reported class
Business logic
bug classes found
5
first disclosure
2023
Find Blueberry Update #3 on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Blueberry Update #3 chose to make public.

DoS

AuraSpell `openPositionFarm` will revert when the tokens contains `lpToken`

The AuraSpell contract's openPositionFarm function can revert when the tokens array includes the lpToken, because the amountsIn array is shortened via assembly while maxAmountsIn remains full length, causing a length mismatch that Balancer's vault rejects. This prevents users from opening positions in such cases.

Blueberry Update #3

Medium
DoS

ConvexSpell/CurveSpell.openPositionFarm will revert in some cases

The CurveSpell and ConvexSpell contracts approve only the borrowed amount to the Curve pool, but then supply the contract's full token balance as the liquidity amount. If anyone sends a tiny amount of the borrow token to the contract beforehand, the supplied amount exceeds the approval and the liquidity call reverts, so no one can open a position.

Blueberry Update #3

Medium
Business logic

wrong bToken's exchangeRateStored used for calculate ColleteralValue

The collateral value calculation used the exchange rate of the debt token's bToken instead of the underlying token's bToken, producing an incorrect collateral value. This could lead to incorrect risk assessment and potentially allow positions to be liquidated when they should not be, or vice versa.

Blueberry Update #3

High
DoS

ConvexSpell is completely broken for any curve LP that utilizes native ETH

The ConvexSpell contract calls balanceOf on each token in a Curve LP, but native ETH is represented by a special address that does not implement balanceOf, causing a revert. This makes the contract incompatible with any Curve pool that uses native ETH.

Blueberry Update #3

Medium
Business logic

AuraSpell#openPositionFarm fails to return all rewards to user

When a user adds to an existing position on AuraSpell, the contract burns the old position and mints a new one, but only refunds Aura tokens to the user while other reward tokens sent to the contract are lost. An attacker could not directly exploit this, but the user loses all extra reward tokens from their original position.

Blueberry Update #3

High
DoS

BalancerPairOracle#getPrice will revert due to division by zero in some cases

The BalancerPairOracle's getPrice function calls computeFairReserves, which performs integer division resA / resB. When resA is smaller than resB, this division yields zero, and a subsequent division by zero causes a revert. An attacker could trigger this condition by ensuring the pool's token balances or decimals cause resA < resB, making the oracle and any dependent functions unusable.

Blueberry Update #3

Medium
Business logic

Updating the feeManger on config will cause desync between bank and vaults

The bank contract caches the fee manager address at initialisation, while vaults always read the current fee manager from config. If the fee manager is updated in config, the bank and vaults use different fee managers, causing inconsistent fees for users.

Blueberry Update #3

Medium
Business logic

ShortLongSpell#openPosition attempts to burn wrong token

The ShortLongSpell#openPosition function attempts to burn the wrong token (vault.uToken instead of vault) when adding to an existing position, causing the function to always revert. This makes the function completely nonfunctional for users adding to their position.

Blueberry Update #3

Medium
Race condition

`BalancerPairOracle` can be manipulated using read-only reentrancy

The BalancerPairOracle contract calculates prices using Balancer pool token balances and total supply without checking the Balancer Vault's reentrancy guard. An attacker can exploit a read-only reentrancy during a pool join to make the oracle return a manipulated, lower price, causing premature liquidation of user positions.

Blueberry Update #3

High
Business logic

`getPositionRisk()` will return a wrong value of risk

The getPositionRisk function uses Compound's exchangeRateStored, which does not accrue interest, so the calculated risk can be outdated. This could cause a healthy position to be liquidated.

Blueberry Update #3

Medium
Business logic

AuraSpell openPositionFarm does not join pool

The openPositionFarm function in AuraSpell only borrows one token type, so one of the maxAmountsIn values is zero, making the computed poolAmountOut zero. The conditional check if (poolAmountOut > 0) then always fails, so the pool is never joined and users earn no rewards.

Blueberry Update #3

Medium
Business logic

AuraSpell#openPositionFarm uses incorrect join type for balancer

The AuraSpell contract uses an empty userData field for Balancer join requests, which decodes to join type 0 (INIT). This causes transactions to revert for already-initialized pools, preventing users from opening farm positions.

Blueberry Update #3

High
Business logic

Issue 290 from previous contest has not been fully addressed by fixes

The report points out that a previous fix to prevent liquidations during a repay pause is incomplete: users who become liquidatable while repay is paused can still be liquidated immediately after repay is re-enabled, because MEV bots can frontrun any repayment attempt. This leaves users unable to save their positions.

Blueberry Update #3

Medium