Vyper Vested Claims

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

In the function _calculate_vested_amount, a vested amount is depending from elapsed time

Summary

The _calculate_vested_amount function is used to calculate the amount of tokens that have vested (been granted) at a given time during a vesting period. The function takes one parameter, total_amount, which represents the total number of tokens to be vested.

Vulnerability Details

In lines

elapsed: uint256 = current_time - start_time
vested = instant_release + (linear_vesting * elapsed) // vesting_duration

elapsedvalue is depending from current_time: uint256 = block.timestamp, block.timestampis wrong value as a time source. Modification of block.timestampcan have impact on improper amount of vested amount.

Impact

Impact on improper amount of vested amount.

Tools Used

manual review

Recommendations

Use different param for time coumputation insted of block.timestamp.

Updates

Appeal created

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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