Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start Vesting right after cliff ends in VestingWalletCliff #5211

Closed
wants to merge 2 commits into from

Conversation

ernestognw
Copy link
Member

Fixes L-02

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

Copy link

changeset-bot bot commented Sep 18, 2024

⚠️ No Changeset found

Latest commit: c4d95c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ernestognw ernestognw marked this pull request as ready for review September 18, 2024 17:47
@ernestognw ernestognw added this to the 5.1-after-freeze milestone Sep 18, 2024
@@ -46,6 +46,6 @@ abstract contract VestingWalletCliff is VestingWallet {
uint256 totalAllocation,
uint64 timestamp
) internal view virtual override returns (uint256) {
return timestamp < cliff() ? 0 : super._vestingSchedule(totalAllocation, timestamp);
return timestamp <= cliff() ? 0 : super._vestingSchedule(totalAllocation, timestamp);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this change is a big deal, but I also think its somehow wrong.

IMO the cliff is the moment where things start to unlock. which means you return zero until cliff - 1.
Anyway, in both cases, its just a mater of waiting one more second, so I don't see how this is even an issue.

@Amxx
Copy link
Collaborator

Amxx commented Sep 20, 2024

For the record, other implementation I could find do use the timestamp < cliff math.

https://thirdweb.com/arbitrum/0x6f73a287611526d57112ad26ec396d86be65e104/sources
Capture d’écran du 2024-09-20 10-30-35

@Amxx Amxx closed this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants