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

Feat: Tracking unlockRates #5

Merged
merged 13 commits into from
Dec 15, 2023
Merged

Feat: Tracking unlockRates #5

merged 13 commits into from
Dec 15, 2023

Commits on Dec 14, 2023

  1. convert back to for loop

    - now it is okay to do for loops from 0.8.22
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    ffc6bfe View commit details
    Browse the repository at this point in the history
  2. locked tokens from destroyed to master

    - so calculation does not go off, just given back to master
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    3c28c6d View commit details
    Browse the repository at this point in the history
  3. use Babylonian for uint256

    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    06d1b1f View commit details
    Browse the repository at this point in the history
  4. use .sqrt()

    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    ccde55a View commit details
    Browse the repository at this point in the history
  5. add array and mapping to track of timestamps

    - these for globalLocked calculation
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    861aed0 View commit details
    Browse the repository at this point in the history
  6. add _storeUnlockRates()

    - this will store data necessary to calculate globalLocked by keeping track of unlock rates
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    45d159b View commit details
    Browse the repository at this point in the history
  7. simplify _farmDeposit

    easier calculation for crateTime and unlockTime
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    5030ea5 View commit details
    Browse the repository at this point in the history
  8. add globalLocked()

    - gives back result how many tokens are still locked globally
    - calculation is based on all rates for unlock timestamps
    - each timestamp keeps track of its own unlock rate
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    99abe96 View commit details
    Browse the repository at this point in the history
  9. ability to clean past stamps

    - so array of available stamps does not inflate too much
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    d94db9d View commit details
    Browse the repository at this point in the history
  10. use globalLocked() to calculate availableSupply

    - this way we measure compares to totally unlocked supply
    - we take total supply and subtract amount still locked
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    6226ab1 View commit details
    Browse the repository at this point in the history
  11. add extra tests

    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    6808597 View commit details
    Browse the repository at this point in the history
  12. adjust naming for lockDuration

    - renamed to remainingDuration
    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    9f53b2b View commit details
    Browse the repository at this point in the history
  13. adjust comment

    vm06007 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    c187be6 View commit details
    Browse the repository at this point in the history