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 masp rewards underflow #2230

Merged
merged 5 commits into from
Dec 7, 2023
Merged

fix masp rewards underflow #2230

merged 5 commits into from
Dec 7, 2023

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Nov 29, 2023

Describe your changes

Added a test for fn update_allowed_conversions and fixed a possible underflow (b41393e).

Indicate on which release or other PRs this topic is based on

v0.27.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@tzemanovic tzemanovic marked this pull request as ready for review November 29, 2023 11:35
@tzemanovic tzemanovic requested a review from murisi November 29, 2023 11:36
Copy link
Collaborator

@murisi murisi left a comment

Choose a reason for hiding this comment

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

Nice catch! The normed_inflation in the denominator could be so high that no rewards are given.

tzemanovic added a commit that referenced this pull request Nov 29, 2023
* origin/tomas/masp-rewards:
  changelog: add #2230
  masp: fix possible underflow
  masp: test update_allowed_conversions
  dec: add a proptest helper to gen arb non-negative dec
  masp: log inflation amount for each token address
@tzemanovic tzemanovic mentioned this pull request Nov 29, 2023
@tzemanovic tzemanovic merged commit 59c6ecc into main Dec 7, 2023
14 checks passed
@tzemanovic tzemanovic deleted the tomas/masp-rewards branch December 7, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants