Hunt prep
Before you test Velodrome Finance contest
What 23 disclosed reports say about Velodrome 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 | 14 | 0 | – | – | $0 |
| DoS lesson | 4 | 0 | – | – | $0 |
| Access control lesson | 2 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 0 | – | – | $0 |
| Race condition lesson | 1 | 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.
-
Gauge set can be front run if bribe and gauge constructors aren’t run atomically
The project removed the setGauge pattern in its mainnet deployment, and the report also suggested running the constructors atomically or adding owner-only access control.
Disclosed
-
Bribe Rewards Struck In Contract If Deposited During First Epoch
The code should handle the edge case where bribe rewards are added during the first epoch, for example by aligning the start of the bribe period with the VELO emission period.
Disclosed
-
VotingEscrow ’s merge and withdraw aren’t available for approved users
The _burn function should pass the owner address to _removeTokenFrom instead of msg.sender.
Disclosed
-
Owner’s delegates should be decreased in _burn()
The _burn() function should call _moveTokenDelegates to remove the token from the owner's delegate list.
Disclosed
-
RedemptionSender should estimate fees to prevent failed transactions
The contract should use the estimateFees() function to calculate the required fee and ensure the user provides enough.
Disclosed
-
Bribe.sol is not meant to handle fee-on-transfer tokens
The contract should record the actual amount received (balance difference) instead of the stated amount, or disallow fee-on-transfer tokens as reward tokens; the project later whitelisted reward tokens on mainnet.
Disclosed
-
Alter velo receptions computation
Ensure that the provided addresses are not address(0).
Disclosed
-
Wrong reward distribution in Bribe because deliverReward() won’t set tokenRewardsPerEpoch[token][epochStart] to 0
Set tokenRewardsPerEpoch[token][epochStart] to 0 in deliverReward after transferring.
Disclosed
-
Rewards can be locked in Bribe contract because distributing them depends on base token reward amount and Gauge.deliverBribes() is not always called by Voter.distribute()
The line IGauge(_gauge).deliverBribes(); should be moved outside the if block in Voter.distribute().
Disclosed
-
Griefing Attack By Extending The Reward Duration
The function should only be callable by anyone if the previous reward period has expired; otherwise, only a designated reward distributor should be able to call it.
Disclosed
-
Wrong DOMAIN_TYPEHASH definition
The DOMAIN_TYPEHASH should include the version field, and the domain separator should be built in the constructor as an immutable value.
Disclosed
-
VeloGovernor : proposalNumerator and team are updated by team, not governance
The setters should be changed so the governance contract can call them, for example by checking for address(this).
Disclosed
-
WeVE (FTM) may be lost forever if redemption process is failed
The redemption receiver should wrap lzReceive in a try-catch and refund the user on revert, or provide a refund mechanism back to the source chain.
Disclosed
-
Wrong calculation for the new rewardRate[token] can cause some of the late users can not get their rewards
The reward rate should be calculated based on the time until the next period finish, not a fixed duration, and the period finish should be updated accordingly.
Disclosed
-
Bribe Rewards Not Collected In Current Period Will Be Lost Forever
The bribe contract should be modified to accrue uncollected rewards to future epochs, similar to Solidly's implementation.
Disclosed