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

Add rounding up support for 1 wei claims #154

Merged
merged 1 commit into from
Aug 17, 2022
Merged

Add rounding up support for 1 wei claims #154

merged 1 commit into from
Aug 17, 2022

Conversation

Willyham
Copy link
Contributor

Fixes #126

Comment which I wanted to put into the code but it's not worth the space. There is a very unlikely but quite interesting edge case here. We think it's worth the tradeoff to keep clearer accounting for the stAVAX rounding in the more 'normal' case.

        // This technically means that we are giving people slightly more AVAX in exchange for their stAVAX if they
        // claim 1 wei's worth. In theory you could claim everything in 1 wei increments to earn more, but gas makes
        // this clearly infeasible. However, the end result of a few of these round-ups is that there will not be
        // enough stAVAX in the protocol for the very last unstaker. In practise this will not happen because we will
        // stake some AVAX at deploy which we'll never remove.

@Willyham Willyham requested a review from jnic August 17, 2022 22:28
@Willyham Willyham merged commit 7cf511a into main Aug 17, 2022
@Willyham Willyham deleted the will-rounding- branch August 17, 2022 22:35
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.

[Dedaub] L1: Partial claim of AVAX might result in rounding errors
2 participants