Vyper Vested Claims

First Flight #34
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing time validation in constructor

Summary

There is no validation in checking that vesting_start_time < vesting_end_time

Impact

vesting_start_time could be larger than vesting_end_time which breaks the vesting time assumption.

Recommendations

diff --git a/src/VestedAirdrop.vy b/src/VestedAirdrop.vy
index 5b00ff7..a73921e 100644
--- a/src/VestedAirdrop.vy
+++ b/src/VestedAirdrop.vy
@@ -33,6 +33,7 @@ def __init__(merkle_root: bytes32, token: address, vesting_start_time: uint256,
@param vesting_start_time: uint256, the start time of the vesting
@param vesting_end_time: uint256, the end time of the vesting
"""
+ assert vesting_start_time < vesting_end_time
self.merkle_root = merkle_root
self.token = token
self.vesting_start_time = vesting_start_time
Updates

Appeal created

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.