The reward pool contract assumes that the staked asset and the reward token are the same, but for veBal the staked asset is an 80/20 BAL/ETH LP token while rewards are paid in BAL. If BAL is added as a supported asset, the contract will try to deposit BAL directly, which will fail and cause getReward to always revert.
The reward pool contract allows the same extra reward token address to be added multiple times without a duplicate check. If a reward manager mistakenly adds the same address twice, a user who stakes and later withdraws will receive double the linked rewards, taking funds from other depositors.
The reward manager can call clearExtraRewards to remove extra reward tokens that were already staked for users, leaving those rewards permanently locked with no way for users to claim them. An attacker with the reward manager role could cause users to lose their extra rewards.
The reward pool and locker contracts allow the owner to add reward tokens to an unbounded list. If enough tokens are added, iterating over the list in the updateReward modifier could exceed the block gas limit, causing all functions that use it to revert and locking rewards.
The contract's _maxTime was set higher than the maximum lock time allowed by Curve's VotingEscrow, causing increase_unlock_time to revert. If a user deposits without locking, the asset becomes stuck in the contract because lockVeAsset cannot succeed.
The Booster contract's setFeeInfo function lacks validation that the two fee incentive percentages sum to 100%. If misconfigured, only a fraction of collected fees is distributed, leaving the remainder stuck in the contract.
The addReward function lacks validation, so if the owner mistakenly sets a new reward token's ve3Token to an existing reward token address, then getReward will transfer the entire balance of that existing token to the caller. An attacker could then claim all staking rewards.
The system integrates with upgradeable gauge contracts whose interfaces and underlying LP tokens can change, potentially blocking or freezing the system. An attacker or a legitimate upgrade could cause the system to become stuck, requiring a painful shutdown and operator change to rescue funds.
The contract's update function for asset weights lacks bounds checks, allowing an owner to set extreme values. This could cause the booster to mint excessive or insufficient reward tokens.
The shutdownPool function marks a pool as shut down even if the attempt to withdraw all funds from the gauge fails. This can permanently freeze user funds because subsequent withdrawals assume the pool is already shut down and do not attempt to retrieve the funds.
The contracts assume that the amount of tokens received equals the amount specified in a transfer, but if a fee-on-transfer token is used, the actual received amount is less. This could break reward claiming or brick the system if such a token is added as a reward.
The first user to stake a tiny amount (1 wei) can inflate the rewardPerTokenStored value because the reward calculation divides by totalSupply, which is then only 1 wei. This allows that user to withdraw inflated rewards and drain the reward pool.
The deployment scripts for the veToken project contained outdated addresses for G-Uni tokens, which are used to configure staking pools. An attacker could not directly exploit this, but using the wrong addresses would cause a loss of yield for users.
The owner of VoterProxy can change the operator to an address they control, then use privileged functions to withdraw all token balances from gauges and the contract. This allows a malicious or compromised owner to drain protocol funds.
The stashRewards function transfers reward tokens without checking if the amount is zero. If a reward token reverts on zero-value transfers, the entire function fails, blocking all extra reward collection.
The contract's inversely traversing loops, ported from a version using Solidity 0.6.12, underflow in Solidity 0.8.7 and always revert. This makes several view functions (totalSupplyAtEpoch, balanceAtEpochOf, pendingLockAtEpochOf, totalSupply) unusable, potentially breaking governance and integrations.
If the reward token is mistakenly set to the staking token, the contract can pay out rewards using deposited funds, allowing early withdrawers to drain more than they deposited and leaving later users unable to withdraw. The report demonstrates this with a scenario where one user withdraws 105 while another is stuck.
The reward manager can add the same reward address multiple times to the extraRewards array, causing the pool to stake the same amount twice with that reward contract. This could lead to rewards being disbursed twice, breaking protocol invariants.
The VoterProxy contract assumes a one-to-one mapping between gauge tokens and underlying LP tokens when computing the amount to withdraw in withdrawAll. If a gauge rebases its token ratio, the contract would withdraw an incorrect amount and could lose funds.
The reward pool bundles all reward tokens into a single claim loop, so if any one reward token has pausable transfers and is paused, the entire claim or withdrawal reverts. An attacker cannot directly exploit this, but a paused token (e.g., Ribbon) would block users from claiming any rewards.
The governance token contract allows governance to burn tokens from any address, not just the caller's own balance. A malicious or compromised governance could destroy users' tokens.
The veTokenMinter contract lets any address added as an operator mint new tokens to any address. Because the admin can add themselves as an operator, they could mint excess tokens and dilute existing holders.
The operator role in the VoterProxy contract can call withdrawAll to remove all tokens held by the contract, and can also call execute to make arbitrary calls with any value. A malicious or compromised operator could therefore steal all tokens from the contract.
The owner of VeTokenMinter.sol can withdraw the entire contract balance to any address without delay or limit. If the owner is compromised, an attacker could drain all funds.
The VeTokenMinter contract's withdraw function lets the admin remove pre-minted VE3D tokens without updating internal accounting, so the mint function can later try to transfer more tokens than the contract holds, causing a revert. This revert cascades to reward claims, preventing users from receiving rewards.
The reward calculation in two reward pool contracts divides the reward amount by the duration, and integer rounding leaves a small remainder that is never distributed or recoverable. An attacker cannot directly exploit this, but the rounding error causes some reward tokens to be permanently locked in the contract.
The VeTokenMinter contract fails to reduce totalWeight when an operator is removed, so remaining operators receive a smaller share of rewards and some rewards are never minted. An attacker cannot directly exploit this, but the misconfiguration causes unfair reward distribution.
The addPool function does not check for duplicate lpToken addresses, allowing two pools to share the same lpToken. When depositAll is called on the first pool, it takes all lpTokens and deposits them under its own pid, leaving no balance for the second pool.
The setFeeManager function only allows the current feeManager to change itself, so once set, the owner cannot replace a malicious feeManager. A malicious feeManager could funnel funds away, and the owner would have no way to revoke that power.
The reward pool contracts fail to distribute rewards during periods when totalSupply() is zero, because rewardPerToken() returns the stored value without accumulating rewards. As a result, rewards allocated for those periods remain stuck in the contract and are never paid to stakers.
VF
veToken Finance 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.