Hunt prep
Before you test veToken Finance contest
What 31 disclosed reports say about veToken Finance contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 19 | 0 | – | – | $0 |
| Access control lesson | 6 | 0 | – | – | $0 |
| DoS lesson | 4 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
VE3DRewardPool.sol is incompatible with Bal/veBal
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.
Disclosed
-
No check for existing extraRewards during push
A duplicate check should be added before adding an extra reward, or an enumerable map should be used to prevent duplicate entries.
Disclosed
-
User can lose extra rewards
The clearExtraRewards function should be removed or modified so that all existing stakes on extra rewards are withdrawn and claimed before clearing.
Disclosed
-
VE3DRewardPool and VE3DLocker adds to an unbounded array which may potentially lock all rewards in the contract
The team said they would add a bound to the number of reward tokens, and the report also suggests allowing removal of old tokens or distributing rewards per token.
Disclosed
-
Incorrectly set _maxTime to be in line with the locking maxTime of each veToken could render the deposit of this contract to be unfunctional or even freeze assets inside the contract
The owner should set _maxTime in advance for each veAsset rather than relying on manual input during construction, or add a securely protected emergency function to change it.
Disclosed
-
Misconfiguration of Fees Incentive Might Cause Tokens To Be Stuck In Booster Contract
The contract should be fixed by adding a validation check that the two fee incentives sum to 10000.
Disclosed
-
Deposited staking tokens can be lost if rewards token info added by mistake in addReward() in VE3DRewardPool and there is no checking to ensure this would not happen (ve3Token for one reward was equal to stacking token)
The addReward function should be fixed to validate that the ve3Token address is not already used by another reward token.
Disclosed
-
Contracts should be robust to upgrades of underlying gauges and eventually changes of the underlying tokens
The VoterProxy should be made upgradeable, or upgradeable intermediate contracts should be added between the staker and the gauge to preserve logic.
Disclosed
-
Missing sane bounds on asset weights
The contract should enforce sane upper and lower limits on the weight values.
Disclosed
-
Booster’s shutdownPool can freeze user funds
The shutdownPool function should only mark the pool as shut down if the withdrawAll call succeeds, or provide a forced shutdown option with additional safeguards.
Disclosed
-
Consistently check account balance before and after transfers for Fee-On-Transfer discrepancies
The donate function should check the actual transferred amount or disallow fee-on-transfer tokens; the report does not state that a fix was applied.
Disclosed
-
BaseRewardPool’s rewardPerTokenStored can be inflated and rewards can be stolen
The team should add boundaries to reward stakers to keep rewards within consistent limits.
Disclosed
-
Incorrect deployment parameters
The deployment script should be updated to use the correct current addresses, or the LP token should be fetched directly from the staking contract.
Disclosed
-
ExtraRewardStashV2’s stashRewards can become unavailable
The transfer should only be executed when the amount is positive.
Disclosed
-
VE3DLocker.sol Wrong implementation of inversely traverse for loops always reverts
The loops should be rewritten to count down from length to 1 and index with i-1, avoiding underflow.
Disclosed