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.
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.
The harvest function in StrategySupplyBase could be called by anyone, allowing users to front-run the administrator's rebalance call or call harvest regularly to avoid paying performance fees on interest. This let users receive more interest than they should.
The undeploy function in StrategySupplyBase fails to reduce the tracked deployed amount when funds are withdrawn. As a result, after a withdrawal the harvest logic can misreport a loss even when interest was earned, preventing performance fees from being collected.
The router's pullTokensWithPermit function does not validate the caller, allowing an attacker to frontrun a user's permit signature and transfer the user's tokens to the router, then sweep them to the attacker. The user's original transaction fails because the permit is already used, resulting in token loss.
The undeploy function returns the requested amount rather than the actual withdrawn amount, so a later transfer can exceed the balance and revert. This prevents users from withdrawing their tokens when the actual withdrawn amount is less than requested.
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.
The VaultRouter contract allowed anyone to call its execute function with PULL_TOKEN_FROM or PUSH_TOKEN_FROM commands to transfer a user's ERC20 tokens if the user had approved VaultRouter to spend them. An attacker could drain all approved tokens from a victim's wallet.
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.
The MultiStrategyVault contract attempts to withdraw from all strategies proportionally, so if any single third-party strategy is paused, the entire withdrawal transaction reverts. This prevents users from withdrawing their funds and also blocks rebalancing and strategy removal, potentially locking all assets permanently.
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.
A multi-strategy vault's withdrawal function could be blocked because it calls undeploy(0) on a strategy with no assets, which reverts. An attacker could add such a strategy, causing all withdrawals to fail until assets are deposited or the strategy is removed.
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.
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.
The VaultRouter contract allowed anyone to redeem or withdraw a user's ERC4626 shares if the user had approved the router to spend those shares. An attacker could call the execute function with a redeem command specifying the victim as owner and themselves as receiver, thereby draining the victim's shares.
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.
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.
The rebalance function in the Vault and MultiStrategyVault contracts lacks a pause check, so it can still be called when the contract is paused. This allows performance fees to be collected from interest even though users cannot withdraw.
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.
The vault's deposit function rejects deposits when totalAssets is non-zero but totalSupply is zero. An attacker can send tokens directly to the strategy to make totalAssets positive before any shares exist, permanently blocking all deposits.
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.
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.
BI
BakerFi Invitational
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.