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
Loans: Quantity as fixed point with 18 decimals #1471
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lemunozm
added
Q1-easy
Can be done by primarily duplicating and adapting code.
I3-annoyance
The code behaves as expected, but "expected" is an issue.
P7-asap
Issue should be addressed in the next days.
D2-notify
Pull request can be merged and notification about changes should be documented.
crcl-protocol
Circle protocol related.
labels
Jul 28, 2023
lemunozm
added
the
D8-migration
Pull request touches storage and needs migration code.
label
Aug 2, 2023
thea-leake
previously approved these changes
Aug 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks @thea-leake! Could you give the approval again? I've rebased it to |
thea-leake
approved these changes
Aug 2, 2023
thea-leake
approved these changes
Aug 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
crcl-protocol
Circle protocol related.
D2-notify
Pull request can be merged and notification about changes should be documented.
D8-migration
Pull request touches storage and needs migration code.
I3-annoyance
The code behaves as expected, but "expected" is an issue.
P7-asap
Issue should be addressed in the next days.
Q1-easy
Can be done by primarily duplicating and adapting code.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The current
Rate
type used fromcfg_types
uses 27 decimals. Using an underlying 128bits number means that we only ca reach values up to10^9
, which can not be enough for quantity purposes.Rate
should only be used for interest rate computations. Other rates should use 18 decimals.This PR fixes this, using a rate with 18 decimals.