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/scaling issues for tokens with less than 18 decimals #561

Merged

Conversation

baroooo
Copy link
Contributor

@baroooo baroooo commented Dec 3, 2024

Description

Fixes the scaling issues we have in the GoodDollarExpansionController.sol by scaling up reserveInterest in mintUBIFromReserveBalance and mintUBIFromInterest and removing the scaling in mintFromInterest

Other changes

  • Updates _createExchange to scale tokens with less than 18 decimals instead of leaving that to the callers initiative
  • Returns amountMinted from mintUBIFromInterest for consistency

Tested

Fixed old unit tests, introduced new integration tests

Related issues

Copy link
Contributor

@philbow61 philbow61 left a comment

Choose a reason for hiding this comment

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

LGTM

@philbow61 philbow61 merged commit 06b02cc into develop Dec 4, 2024
5 checks passed
@philbow61 philbow61 deleted the fix/scaling-issues-for-tokens-with-less-than-18-decimals branch December 4, 2024 14:55
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.

3 participants