Platform: Code4rena
Start Date: 26/05/2022
Pot Size: $75,000 USDT
Total HM: 31
Participants: 71
Period: 7 days
Judge: GalloDaSballo
Total Solo HM: 18
Id: 126
League: ETH
Rank: 25/71
Findings: 2
Award: $661.92
π Selected for report: 1
π Solo Findings: 0
π Selected for report: Kumpa
Also found by: SecureZeroX, unforgiven
562.3122 USDT - $562.31
since _maxTime needs to be manually input in the constructor with no other ways of changing it, if the owner inputs the _maxTime that is higher than the capacity of each vaults of veTokens, it will cause IVoteEscrow(escrow).increase_unlock_time(_value);
to get rejected.
In the mild case when a user initially locks the asset during depositing, the contract will simply revert the transaction.
In the severe case when a user does not lock the asset during depositing, the asset will end up locked in the contract since noone will be able to succesfully call lockVeAsset
. This will cause the asset to be locked up with no way of withdrawing it. Even though a user will still get benefits from the minted reward, a contract will not be able to receive any benefits since it can't utilize the locked asset in VeAssetDepositor
.
1.The owner initially sets _maxTime in constructor to be 126489600 (864003664) instead of 126144000 (864003654) which is the maximum time that a user can deposit in curve
2.A user deposit
veAsset but deferring the locking to save gas
3.The veAsset is transferred from a user to the contract and the contract mint a reward token to the user
4.The veAsset will not be able to move to the staking contract because when VoterProxy calls increase_unlock_time
in the targeted vault, the call will get reverted due to exceeded _value of unlockAt
The owner should set the value of _maxTime in advance for each veAsset and not relying on manual inputting during the constructoring as the risk of misconfiging ot is high. Otherwise the contract should add an emergency measure that can help change _maxTime but this function needs to be protected with the highest security (eg. with timelock and multisig).
#0 - solvetony
2022-06-15T15:52:37Z
We can set it by a function instead of a constructor. Middle risk.
#1 - GalloDaSballo
2022-07-21T02:29:28Z
The warden has shown how, due to misconfiguration a lock may not be created, causing tokens to be stuck in the contract.
We can confirm that a revert would happen by checking VotingEscrow
Because this is contingent on a wrong configuration I believe Medium Severity to be more appropriate.
π Selected for report: xiaoming90
Also found by: 0xNazgul, FSchmoede, Funen, Kumpa, VAD37, berndartmueller, cccz, kirk-baird
99.6119 USDT - $99.61
Booster.setFees
does not specify ranges for each incentives even though there is a comment stating that these values should be in certain ranges. This loop hole enable malicious feeManager to set fee for his own benefit. If feeManager is the owner, he could make platformFee == MaxFee
and reduce other incentives to zero. If feeManager is seperate from the owner and does not have an access to platform's treasury, he could set _callerFees == MaxFee
and call earmarkRewards
to collect the highest fee possible before setting it back to normal.
The owner should specify a clear range for each incentives and fees and make it a require function so that feeManager
will not be able to arbitariry adjust it to his benefit (max and min can be adjusted )
*example the owner should add this ranges before setting up incentives and fees (max and min can be adjusted )
(require _lockFees >= 1000 && _lockFees <= 1500 && _stakerFees >= 300 && _stakerFees <= 600 && _callerFees >= 10 && _callerFees <= 100 && _platform <= 200)
#0 - solvetony
2022-06-15T16:42:39Z
Lower severity. Also duplicates #93
#1 - GalloDaSballo
2022-07-25T00:54:41Z
Dup of #215