-
Notifications
You must be signed in to change notification settings - Fork 44
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
Updates referral fee types #10963
Updates referral fee types #10963
Conversation
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.
Agreed with all said.
Another perspective on this (since I just spent a week working on fractional vote weight support in UI): the client should always receive WEI in string representation.
The backend should either pass to client as a string, or (if calculations are required), parse as BigInt then pass to client as string. That way, no precision is lost during deserialization.
The problem with double precision in the query is that it parses the value as Number (float) on the backend, which immediately loses precision.
JS floats lose precision after ~16 decimals at first, then the bigger the number gets, the more precision is lost in the decimals. WEI numbers can get pretty big (1 million ERC20 is usually 10^24 WEI), so it's a real issue now that we render fractional vote weights in the UI.
Link to Issue
Closes: #10951
Description of Changes
Other Considerations