The reward index calculation multiplies by the staking token's decimals but divides by the reward token's decimals, so when the two tokens have different decimal places the reward amount is inflated by a large factor. An attacker could claim an enormous reward, draining the entire reward fund, or at minimum cause a denial of service where no one can withdraw.
The BeefyAdapter contract did not verify that the _beefyBooster address was legitimate before approving it to spend the adapter's _beefyVault tokens. A malicious vault owner could supply a malicious _beefyBooster that would transfer all tokens held by the adapter.
When an approved third party withdraws staked assets on behalf of the owner to a different receiver, the contract fails to accrue rewards for the owner, causing the owner's earned staking rewards to be permanently lost. An attacker with approval could trigger this loss by withdrawing to themselves, though the owner's principal is returned.
The vault deployment function accepts any staking contract address without checking it against approved templates. An attacker can deploy a vault with a malicious staking contract that has a backdoor to withdraw all deposited funds, leading users to lose funds.
The VaultController contract's _verifyCreatorOrOwner modifier uses a logical OR instead of AND, so it only allows access when the caller is both creator and owner. This blocks legitimate creators and owners from calling several functions, including deployVault with staking rewards.
The YearnAdapter contract calculates the total assets of a Yearn vault by adding the vault's token balance to its total debt, but the Yearn vault itself uses an internal tracked value (totalIdle) instead of the live balance. This can cause the adapter to overstate total assets if the vault's balance is inflated, leading to incorrect share price calculations.
The logic contracts behind upgradeable adapter contracts could be destroyed by calling their initializer directly and then triggering a delegatecall to a malicious contract that self-destructs. This would render all adapter instances inoperable.
The VaultController's setDeploymentController function swaps the stored deployment controller but never calls the old controller's nominateNewDependencyOwner, so ownership of the clone factory and registries is never handed over. As a result, switching to a new deployment controller cannot complete properly.
The Vault.redeem function lacks the syncFeeCheckpoint modifier that withdraw uses, so highWaterMark is not updated after redemption. This can cause performance fees to be calculated incorrectly, either overpaying or underpaying the fee recipient.
The vault's management fee is calculated from the last fee update time, which is set at deployment and not updated on deposits or withdrawals. An attacker could deploy a vault, wait, and then collect an inflated fee from a later depositor, or front-run a large withdrawal to increase the fee.
The vault's changeAdapter function could be called by any user even after the owner had already set the adapter, causing the vault to withdraw and redeposit all funds into the same fee-charging adapter. Repeated calls would incur withdrawal fees each time, leading to a direct loss of user assets.
The vault contract mints shares before transferring the underlying asset, and if that asset is an ERC777 token, its transfer callback allows an attacker to re-enter a different minting function. This lets the attacker obtain twice as many shares as the assets they actually deposit.
The vault's initialize function accepts any fee values without validation. If fees are set to 1e18 or higher, functions like withdraw can fail due to division by zero or arithmetic overflow.
A vault creator could attach their vault to any existing staking contract and add 255 reward tokens, causing the staking contract's reward-accrual loop to overflow a uint8 counter. Any deposit, withdrawal, transfer or claim on that staking contract would then revert, locking all staked funds.
The Vault's maxWithdraw function returns the maximum assets that can be withdrawn according to the adapter, but it does not account for the withdrawal fee that withdraw adds by increasing the required shares. An upstream contract that uses maxWithdraw's return value as input to withdraw will always revert because the fee pushes the required shares above the user's balance.
The vault's performance fee is calculated from a high-water mark that is updated on every deposit, mint, or withdraw. An attacker can front-run fee collection with a dust deposit or withdrawal to reset the high-water mark and eliminate the accrued performance fee.
The vault's quit period, meant to give users time to exit before fee or adapter changes, can be shortened by the owner after a change is proposed. An owner can propose a change, wait one day, reduce the quit period to one day, and then apply the change immediately, denying users the expected waiting time.
The vault creator can set the escrow fee recipient to the zero address, causing reward claims to revert when a fee is charged. This locks user rewards and lets the creator later claim them by setting the fee to zero when no other stakers are present.
The vault's highWaterMark is updated on every deposit, mint, or withdraw, so the protocol loses track of yield and cannot charge performance fees. An attacker can front-run the fee-taking call with a small deposit to reset the highWaterMark and prevent the protocol from collecting fees.
The YearnAdapter contract calls the Yearn vault's withdraw function without specifying the maxLoss parameter, so the default 0.01% loss tolerance is used. If the Yearn vault's strategies incur a loss greater than 0.01%, the withdraw call reverts, preventing users from withdrawing their deposited assets.
The harvest cooldown was not enforced because the lastHarvest timestamp was never updated after a harvest, so the strategy was called on every deposit or withdrawal. An attacker could repeatedly trigger harvest calls, defeating the intended rate limit.
The AdapterBase contract calls strategy verification and setup functions directly instead of using delegatecall, so the strategy contract's context is used and the calls fail because the strategy does not implement the adapter interface. This prevents creating a vault with that strategy, and if setup succeeds partially, later harvest calls may fail due to invalid settings.
The performance fee calculation assumes share decimals are always 18, so for tokens with fewer decimals the fee rounds to zero and the fee recipient loses shares, while for tokens with more decimals the fee recipient receives excessive shares, causing hyperinflation and making user shares worthless.
When the reward speed in MultiRewardStaking is changed, the new end time is computed from the contract's full reward-token balance rather than the tokens still owed to users. This lets some users keep earning rewards past the intended period and can leave the contract unable to pay what it owes others.
The vault owner can change the management fee and then collect fees for a past period using the new higher rate, because the timestamp of the last fee update is not reset when the fee changes. This lets the owner charge more than intended for time when a lower or zero fee was active.
The adapter's underlyingBalance is not increased when a strategy deposits harvested funds, so it stays equal to totalSupply and users earn no yield from the strategy. An attacker could not directly exploit this, but users lose expected returns.
The syncFeeCheckpoint modifier unconditionally overwrote the highWaterMark with the current share value, which could lower it below its previous level. This caused performance fees to be charged on gains that had already been accounted for, overcharging investors.
The vault's withdraw function converts assets to shares using rounding down, so small withdrawals can burn zero shares. An attacker could repeatedly withdraw assets without reducing their share balance, draining the vault.
The Vault contract mints fee shares using a conversion that divides by the pre-fee asset total, so the fee recipient receives fewer shares than the fee is worth. An attacker (or any user) benefits because the fee charged is less than expected, diluting the fee recipient's entitlement.
PC
Popcorn contest
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.