No-cliff vesting is not supported
Description
Currently, the Validate()
method imposes m.GetStartTime() >= m.GetCliffTime()
as an error condition:
if m.GetStartTime() >= m.GetCliffTime() {
return errors.New("vesting start-time cannot be after cliff-time")
}
The current validation logic prevents a legitimate vesting use case — no-cliff vesting. In other words, the protocol cannot have an immediate vesting account if the cliff time is strictly required to be greater than the start time.
Impact
The protocol requiring immediate (no-cliff) vesting cannot declare it in a straightforward manner. However, since time units are in seconds, setting CliffTime = StartTime + 1
would archive nearly the same effect in practice.
Recommendations
Change the condition to m.GetStartTime() > m.GetCliffTime()
, which would support zero-cliff vesting.
Remediation
This issue has been acknowledged by Sigma Assets GmbH, and a fix was implemented in commit 956b84b0↗.