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

Remaining reward adjustment when unstaking before any rewards #129

Merged
merged 1 commit into from
May 9, 2024

Conversation

amarinkovic
Copy link
Member

When unstaking available rewards are automatically collected. Also, the remaining unclaimed reward amount has to be adjusted proportionally to the stake being taken out.

This adjustment is causing division by zero, if a user is unstaking at a non zero interval before any reward has been payed out.

To address this problem, there will be no adjustment unless there is a reason for it.

@amarinkovic amarinkovic requested a review from kevin-fruitful May 9, 2024 09:16
Copy link
Contributor

@kevin-fruitful kevin-fruitful left a comment

Choose a reason for hiding this comment

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

in Aleks I trust ~

@amarinkovic amarinkovic merged commit 3c8cb8e into dev May 9, 2024
4 checks passed
@amarinkovic amarinkovic deleted the fix/unstake_reward_adjustment branch May 9, 2024 09:23
@amarinkovic amarinkovic mentioned this pull request May 9, 2024
@amarinkovic amarinkovic changed the title Remaining reward adjustment when unstaking Remaining reward adjustment when unstaking before any rewards May 24, 2024
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.

2 participants