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

fix: improve precision loss when unstaking and add testso #8

Merged
merged 1 commit into from
Oct 9, 2024

Commits on Sep 25, 2024

  1. fix: improve precision loss when unstaking and add testso

    This commit changes the calculation for when MPs are reduced globally
    and for the user that is unstaking.
    
    Instead of getting an `amountRatio` first and using that the
    multiplication, we're now applying the `SCALE_FACTOR` to both, the
    numerator and denominator to maintain the ratio while increasing
    precision.
    0x-r4bbit committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7d26854 View commit details
    Browse the repository at this point in the history