Skip to content

Code4rena

BakerFi Invitational

Every publicly disclosed report for BakerFi Invitational and what kind of bugs they were.

disclosed reports
12
most reported class
Business logic
bug classes found
4
first disclosure
2024
Find BakerFi Invitational on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what BakerFi Invitational chose to make public.

Business logic

Vault is vulnerable to first depositor inflation attack

The vault's share price could be manipulated by the first depositor, who could inflate the value of their shares by directly transferring collateral tokens to the strategy. This forced later depositors to receive fewer shares for their deposits, allowing the attacker to steal a portion of their funds.

BakerFi Invitational

High
DoS

Vault can be DoS

When the vault's total supply is zero, an attacker can donate a tiny amount of tokens to make the share calculation always return zero, preventing deposits. This causes a denial of service for the vault.

BakerFi Invitational

Medium
Audit finding

Min and maxAnswer never checked for oracle price feed

The oracle contract reads the latest price from a Chainlink aggregator but does not check that the returned answer falls within the aggregator's configured minimum and maximum price band. If an asset crashes below the minimum, the oracle would keep returning the minimum price, letting users borrow against an inflated value.

BakerFi Invitational

Medium
Access control

BalancerFlashLender#receiveFlashLoan does not validate the originalCallData

The BalancerFlashLender contract's receiveFlashLoan function did not validate the originalCallData, allowing an attacker to pass arbitrary parameters and trigger any Strategy instruction such as _supplyBorrow, _repayAndWithdraw, or _payDeb. The judge noted that exploitation was unlikely because the contract typically holds no funds, but the behaviour was unintended and should be fixed.

BakerFi Invitational

Medium
Business logic

Protocol receives less harvest fees

The vault's performance fee calculation mints shares based on the pre-mint total supply, so the fee receiver receives slightly fewer shares than intended. This causes the protocol to collect a smaller fee than it should.

BakerFi Invitational

Medium
Business logic

deposit() afterDeposit calculation formula is incorrect

The deposit function used an incorrect formula to convert the user's existing share balance into ETH when checking the maximum deposit limit. This could allow a user to exceed the intended maximum deposit or cause legitimate deposits to be rejected prematurely.

BakerFi Invitational

Medium
Business logic

StrategyLeverage.harvest doesn’t account flashloan fee

The harvest function repays debt using a flashloan but does not subtract the flashloan fee from the calculated new deployed amount, making it appear larger than reality. This causes the protocol to receive less management fee when profit accrues.

BakerFi Invitational

Medium
Business logic

All supplied WETH to Aave as a deposit by a Strategy will be irrecoverable

The strategy deposits leftover WETH into Aave after a debt repayment swap, but it has no way to withdraw WETH from Aave, so those funds become permanently stuck. An attacker cannot directly exploit this, but any user triggering the strategy will lose the excess WETH.

BakerFi Invitational

Medium
Business logic

Multiple swap lack slippage protection

The protocol's swap function sets the minimum output amount to zero, so trades can be executed at any price. An attacker could front-run or sandwich these swaps to cause the protocol to receive an unfavourable amount of tokens.

BakerFi Invitational

High
Business logic

ETHOracle.getLatestPrice needs to convert to 18 decimals

The ETHOracle contract returns the Chainlink ETH/USD price with 8 decimals, but its getPrecision() function claims 18 decimals. This mismatch causes the StrategyLeverage contract to calculate totalCollateralInEth incorrectly, potentially leading to overborrowing.

BakerFi Invitational

High