VE3DRewardPool.sol is incompatible with Bal/veBal
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.
Submitted by 0x52
getReward will become completely unusable if bal is added as an support asset.
Proof of Concept
veBal is not staked bal, it is staked 80-20 bal/eth LP. Rewards from gauges are paid in bal NOT 80-20 bal/eth LP. All rewards to this address will be received as bal. If the contract tries to deposit bal directly it will fail, causing getReward to always revert if bal is a supported asset (as all documentation conveys that it will be).
Recommended Mitigation Steps
Exclude veBal/Bal as a supported asset or create a special wrapper for Bal that adds the Bal as one sided liquidity then stakes the LP.
solvetony (veToken Finance) disputed and commented:
Out of the scope, Balancer. But we need to consider this, once we start working on these.
Alex the Entreprenerd (judge) decreased severity to Medium and commented:
The finding shows how the code cannot support veBAL.
In the specific case of veBAL, the deposit token is 80/20 BAL but the reward is BAL, meaning the function will eventually revert.
This is conditional on the token being the BAL token, which means the finding cannot be of High Severity (conditional on configuration).
The sponsor claims that Balancer will not be used, and that may be the case, however the README for the contest does include BAL and for that reason I think the finding is Valid and of Medium Severity.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the contract assumes the reward token and the staked token are identical, so it attempts to deposit the reward token directly instead of handling the LP token required for veBal.
Impact
If BAL is configured as a supported asset, getReward could become unusable because it would always revert, but this is conditional on that configuration and the sponsor disputes that Balancer will be used.
What the attacker needed
BAL is added as a supported asset
The fix
The contract should either exclude veBal/BAL as a supported asset or add a special wrapper that converts BAL into one-sided liquidity and then stakes the resulting LP.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This contract lets people stake tokens and earn rewards. For one particular token (veBal), the thing you stake is a special pool token, but the reward you get back is a different token (plain BAL). The contract was written assuming those two are the same, so if BAL is supported it will try to stake the reward token directly, which does not work and makes the reward function fail every time.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.