In the _calculateReleasableAmount function, the calculation of the vestedAmount uses integer division, which may lead to scenarios where vestedAmount is calculated as zero. This particularly occurs when the totalAmount is small and the duration is long. As a result, users may be unable to withdraw any assets until the duration is reached, effectively locking their tokens without the ability to release them over time.
Key issues in the _calculateReleasableAmount function. When totalAmount is small relative to duration, the value of vestedAmount can end up being zero due to rounding down, which is the nature of integer division in Solidity.
Since the function returns vestedAmount - schedule.releasedAmount, if vestedAmount is calculated as zero, then the user cannot release any tokens until the duration is complete, even though some assets may be vested.
The impact of this vulnerability can lead to user dissatisfaction as they are unable to access their vested tokens.
Manual Code Review
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.