Open hats-bug-reporter[bot] opened 1 year ago
Hello, Thanks a lot for your attention.
This issue has already been reported in a previous issue and is a misconfiguration problem that would happen on our side, please check it: https://github.com/hats-finance/Convergence-Finance---IBO-0x0e410e7af8e70fc5bffcdbfbdf1673ee7b3d0777/issues/28
We have so to consider this issue as Invalid.
Github username: @0xmuxyz Submission hash (on-chain): 0xde1ce1a5294a9c9ece3d09a04ccabbb90f6e23987939bf96c1d57eb3a25a010e Severity: medium
Description: Title:\ The
startingTimestamp
of each vesting (Seed, Presale, IBO, Team, DAO) may not be aligned due to lack of the validationSeverity:\ Medium
Description:\ Within the VestingCvg contract, the
vestingSchedules
storage would be defined to associatevestingScheduleId
with the vesting schedule info (theVestingSchedule
struct) like this: VestingCvg.sol#L73Within the VestingCvg contract, the
VestingSchedule
struct would be defined. thestartTimestamp
and thevestingType
would be defined as a property of theVestingSchedule
struct like this: VestingCvg.sol#L28 VestingCvg.sol#L31Within the VestingCvg#
createVestingSchedule()
, the_startTimestamp
would be stored into thestartTimestamp
property of thevestingSchedules
storage of thevestingScheduleId
(vestingSchedules[nextVestingScheduleId]
). By being done so, each vesting data like below would be associated in thevestingSchedules
storage:vestingScheduleId
vestingType
startTimestamp
VestingCvg.sol#L173 VestingCvg.sol#L176 VestingCvg.sol#L205 VestingCvg.sol#L208
According to the NatSpec of the VestingCvg#
createVestingSchedule()
above, the_startTimestamp
to be assigned as a parameter of eachvestingType
(Seed, Presale, IBO, Team, DAO) is supposed to have the same starting timestamp like this: VestingCvg.sol#L165For example,
createVestingSchedule()
._startTimestamp
to be assigned into the VestingCvg#createVestingSchedule()
is supposed to be same with the four vesting schedule (Seed, Presale, Team, DAO), which has already been created.However, within the VestingCvg#
createVestingSchedule()
above, there is no validation to check whether or not the_startTimestamp
to be assigned would be same with thestartTimestamp
of othervestingType
(Seed, Presale, IBO, Team, DAO), which are already created.This lead to a bad situation that each vesting (Seed, Presale, IBO, Team, DAO) has the different starting timestamp, meaning that the starting timestamp (
startTimestamp
) of eachvestingType
(Seed, Presale, IBO, Team, DAO) would not be aligned.Recommendation:\ Within the VestingCvg#
createVestingSchedule()
, consider adding a validation to check whether or not the_startTimestamp
to be assigned would be same with thestartTimestamp
of othervestingType
(Seed, Presale, IBO, Team, DAO), which are already created.