Skip to content

Code4rena

BakerFi Invitational

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

disclosed reports
23
most reported class
Business logic
bug classes found
5
first disclosure
2025
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.

Audit finding

There are multiple issues with the decimal conversions between the vault and the strategy

The StrategyLeverage contract mishandles decimal conversions between the vault's 18-decimal shares and tokens with other decimals, causing incorrect share minting, withdrawals, swaps, and debt adjustments. This makes the system incompatible with tokens that do not use 18 decimals, potentially leading to loss of funds or broken functionality.

BakerFi Invitational

High
Smart contracts

Users may encounter losses on assets deposited through StrategySupplyERC4626

The StrategySupplyERC4626 contract's deploy, undeploy, and balance functions returned share amounts instead of underlying asset amounts, causing incorrect asset calculations in BakerFi vaults. This could lead to a portion of user assets being permanently locked in the vault.

BakerFi Invitational

High
DoS

VaultRouter cannot be used for deposits when it reaches the maximum deposit limit

The VaultRouter contract, when depositing to a vault, is treated as the depositor and thus subject to the vault's maximum deposit limit. An attacker can deposit through the router with the router as recipient and then withdraw in the same transaction, causing the router to reach its limit and preventing all future deposits via the router.

BakerFi Invitational

Medium
DoS

The Vault Manager is unable to delete the last strategy from MultiStrategyVault

The removeStrategy function in MultiStrategyVault fails when removing the last strategy because it sets totalWeight to zero before reallocating assets, causing a division-by-zero panic. This prevents the vault manager from deleting the last strategy, leaving the vault in a state where funds may be stuck until a rebalance.

BakerFi Invitational

Medium
Business logic

The calculation of assetsMax is incorrect.

The _undeploy function calculates assetsMax using stale totalSupplyAssets and totalSupplyShares from Morpho storage, ignoring accrued interest. This underestimates assetsMax, so a user withdrawing an amount that includes interest may trigger the branch that withdraws all shares, taking other users' assets.

BakerFi Invitational

Medium
Access control

Non-whitelisted recipient can receive shares

The vault's deposit, mint, withdraw, and redeem functions are restricted to whitelisted callers, but the receiver of shares is not checked against the whitelist. A non-whitelisted user can receive shares and later withdraw or redeem them through the VaultRouter, bypassing the whitelist.

BakerFi Invitational

Medium
Business logic

VaultBase is not ERC4626 compliant

The VaultBase contract does not follow several mandatory ERC4626 requirements, such as returning incorrect maximum deposit/mint/withdraw/redeem values and preview functions that round the wrong way or ignore fees. This could break external integrations that rely on these functions.

BakerFi Invitational

Medium
Business logic

The dispatch function of the VaultRouter , does not work as intended, with PULL_TOKEN action

The VaultRouter's dispatch function compares the full action value instead of the extracted action code for the PULL_TOKEN command, so supplying an input mapping causes a revert with InvalidCommand. An attacker cannot exploit this to steal funds; it only breaks intended functionality when an input mapping is provided.

BakerFi Invitational

Medium
Business logic

Depositor can bypass the max deposit limit

The vault's maximum deposit limit is checked against the depositor's own share balance rather than the recipient's, so a depositor can bypass the limit by sending deposits to a different recipient address. An attacker could deposit unlimited assets by repeatedly using fresh recipient addresses.

BakerFi Invitational

Medium
Business logic

Permit doesn’t work with DAI

The VaultRouter contract calls a standard permit function that does not match DAI's permit signature, which includes extra nonce and allowed parameters. As a result, any attempt to use permit with DAI tokens will revert, preventing users from using the permit feature for DAI.

BakerFi Invitational

Medium
Business logic

MultiStrategy#removeStrategy() cannot remove leverage strategies that still have deployed assets

The removeStrategy function in MultiStrategyVault assumes that undeploying a strategy returns exactly the amount requested, but for leverage strategies the received amount can be less due to flash loan fees and swap slippage. This causes the subsequent allocation to fail because the vault tries to allocate more assets than it actually received.

BakerFi Invitational

Medium
DoS

New strategy can not work due to insufficient allowance

When a new strategy is added to MultiStrategyVault, it is not approved to spend the vault's asset. Any function that calls the new strategy's deploy() may revert, causing a denial of service for the vault.

BakerFi Invitational

Medium