In VTVLVesting contract, the claims are created without comparing the numTokensReservedForVesting variable to the contract balance.
If the sum of all user vesting tokens is below this param then the contract will be insolvent to be withdrawn.
Proof of Concept
Suppose the admin has created a large number of claims and the numTokensReservedForVesting increased dramatically and the project got hyped in one point. If the contract.balance is less than numTokensReservedForVesting and if the vesting owners start withdrawing their claimed tokens, then it will not be solvent to supply the requested amount of tokens. The same scenario can be applied in turbulent market conditions where the users want to keep their tokens' economic value.
Lines of code
https://github.com/code-423n4/2022-09-vtvl/blob/f68b7f3e61dad0d873b5b5a1e8126b839afeab5f/contracts/VTVLVesting.sol#L245-L304
Vulnerability details
Impact
In VTVLVesting contract, the claims are created without comparing the
numTokensReservedForVesting
variable to the contract balance. If the sum of all user vesting tokens is below this param then the contract will be insolvent to be withdrawn.Proof of Concept
Suppose the admin has created a large number of claims and the
numTokensReservedForVesting
increased dramatically and the project got hyped in one point. If the contract.balance is less thannumTokensReservedForVesting
and if the vesting owners start withdrawing their claimed tokens, then it will not be solvent to supply the requested amount of tokens. The same scenario can be applied in turbulent market conditions where the users want to keep their tokens' economic value.Permalink
Tools Used
Manual Review
Recommended Mitigation Steps
Consider comparing contract.balance with
numTokensReservedForVesting
when creating claims.