Skip to content

Vesting#429

Merged
MOZGIII merged 36 commits intomasterfrom
vesting
Aug 15, 2022
Merged

Vesting#429
MOZGIII merged 36 commits intomasterfrom
vesting

Conversation

@MOZGIII
Copy link
Contributor

@MOZGIII MOZGIII commented Aug 3, 2022

This PR implements vesting logic.

See #430.


To do

  • implementation
    • pallet-vesting (core pallet)
    • vesting-scheduling-timestamp (timestamp driver)
    • vesting-schedule-linear (linear schedule with cliff)
    • pallet-chain-start-moment (chain start moment provider)
  • pallet-vesting tests
    • lock_under_vesting fn
    • unlock call
    • events work in tests
  • vesting-schedule-linear tests
    • filly locked during the cliff period
    • filly unlocked after the cliff + vesting period
    • linearly unlocks across the vesting period
    • rounds towards locking less than more (to floor)
    • math edge cases (overflows, etc)
    • fully unlocked when the vesting period is zero
  • vesting-scheduling-timestamp tests
    • test that we get an error when the now timestamp is before starting point
    • test that the schedules work with starting points other than 20
    • test that we can vary the starting point and the now together and the results will be the same (with edge cases)
    • test the computation of duration since starting point (regular + edge cases and errors)
    • fix races in tests
  • pallet-chain-start-moment tests
  • pallet-vesting benches
  • docs

@MOZGIII MOZGIII force-pushed the vesting branch 4 times, most recently from 0f2a7ec to 903a2e6 Compare August 3, 2022 23:05
@MOZGIII MOZGIII mentioned this pull request Aug 3, 2022
@MOZGIII MOZGIII force-pushed the vesting branch 6 times, most recently from eff9225 to 8aac870 Compare August 5, 2022 18:52
Copy link
Contributor

@dmitrylavrenov dmitrylavrenov left a comment

Choose a reason for hiding this comment

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

Current implementation looks great to me. Thanks for clear code and documentation.
Amazing!

Everything is clear.

@MOZGIII MOZGIII force-pushed the vesting branch 7 times, most recently from a54fc01 to d0c838e Compare August 9, 2022 10:40
@MOZGIII MOZGIII marked this pull request as ready for review August 9, 2022 12:58
@MOZGIII MOZGIII force-pushed the vesting branch 2 times, most recently from 07af659 to 2e32bcb Compare August 9, 2022 14:33
@dmitrylavrenov dmitrylavrenov mentioned this pull request Aug 11, 2022
MOZGIII and others added 26 commits August 15, 2022 16:34
Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>
Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>
Co-authored-by: Noah Corona <noah@coronasoftware.net>
Co-authored-by: Dmitry Lavrenov <39522748+dmitrylavrenov@users.noreply.github.com>
@MOZGIII MOZGIII enabled auto-merge (squash) August 15, 2022 12:48
@MOZGIII MOZGIII merged commit 550df1b into master Aug 15, 2022
@MOZGIII MOZGIII deleted the vesting branch August 15, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants