Github username: @iamjakethehuman
Submission hash (on-chain): 0x929b217c23a1a61809b6aef87d3d303f0948b11c55414746a1f91b6b027c6ae8
Severity: medium
Description:Description\
Team and DAO vesting is flawed
Attack Scenario\
In VestingCvg different types of vesting schedules can be created, including Team and DAO vesting. However, the Team and DAO vestings are flawed.
Upon releasing Team or Dao, there is a state variable amountReleasedTeam/ amountReleasedDao which keeps track of how much amount is released. This value is later used in _computeReleaseAmountTeamDao in order to calculate the amountToRelease
Upon revoking a Team/Dao vesting, these values are not cleared. Overall the logic creates the following problems:
After 1 vesting schedule is created and finishes, no more can be created as in calculateReleasetotalAmount will always equal totalAmountReleased
If a DAO/ Team vesting has began and is revoked after X time and then a new vesting schedule is created with the same parameters, no amount will be able to be released for the first X time after the creation due to revert in calculateRelease due to underflow.
amountToRelease =
amountDroppedAtCliff +
(((ONE_GWEI - ratio) * totalAmountAfterCliff) / ONE_GWEI) -
totalAmountReleased; //@audit totalAmountReleased will be larger than amountDroppedAtCliff +
// (((ONE_GWEI - ratio) * totalAmountAfterCliff) / ONE_GWEI)
// for the first X time
// hence the transactions will revert due to underflow
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
After revoking a TEAM/Dao vesting, clear the value of the respective amountReleasedTeam/ amountReleasedDao
Hello,
Thanks a lot for your attention.
The revoke function is not intended to be used (only in case of extreme emergency).
In conclusion we have so to consider this issue as invalid.
Github username: @iamjakethehuman Submission hash (on-chain): 0x929b217c23a1a61809b6aef87d3d303f0948b11c55414746a1f91b6b027c6ae8 Severity: medium
Description: Description\ Team and DAO vesting is flawed
Attack Scenario\ In
VestingCvg
different types of vesting schedules can be created, including Team and DAO vesting. However, the Team and DAO vestings are flawed.Upon releasing Team or Dao, there is a state variable
amountReleasedTeam
/amountReleasedDao
which keeps track of how much amount is released. This value is later used in_computeReleaseAmountTeamDao
in order to calculate theamountToRelease
Upon revoking a Team/Dao vesting, these values are not cleared. Overall the logic creates the following problems:
calculateRelease
totalAmount
will always equaltotalAmountReleased
calculateRelease
due to underflow.Attachments
Proof of Concept (PoC) File
Revised Code File (Optional) After revoking a TEAM/Dao vesting, clear the value of the respective
amountReleasedTeam
/amountReleasedDao