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

Fractional amounts of tokens when applying rewards products and slashes at withdrawals #805

Closed
Tracked by #340 ...
brentstone opened this issue Nov 17, 2022 · 2 comments
Assignees
Labels

Comments

@brentstone
Copy link
Collaborator

When an an account withdraws tokens from the PoS module after the maturation of an unbond, the rewards products (stored as Decimal type) and slashes are used to determine the number of tokens to actually credit the account. Currently, the number of tokens to credit is obtained by truncating the product of rewards, slashes, and the unbond amount to the integer from below.

Over time, the fractional remainder of tokens not credited in withdrawals can add up to leave whole numbers of tokens left in the PoS address unaccounted for. We should think whether or not this is a concern, and if so, what should be done with these remainder tokens. It should be possible to keep track of the remainder tokens send them to an account like a slash pool on occasion, if desired.

@brentstone brentstone added the PoS label Nov 17, 2022
@cwgoes
Copy link
Contributor

cwgoes commented Nov 21, 2022

As long as we use full integer precision (sub-whole-number "token") I think we can probably not worry too much about this - but tracking the remainder explicitly would be prudent.

@cwgoes cwgoes added this to the 0.15 milestone Jan 16, 2023
@cwgoes cwgoes removed this from the 0.15 milestone Aug 29, 2024
@cwgoes
Copy link
Contributor

cwgoes commented Aug 29, 2024

No action needed here for now.

@cwgoes cwgoes closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants