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

updates _updateReward logic to account withdraw requests #97

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Potolski
Copy link
Contributor

@Potolski Potolski commented Sep 9, 2024

Fix: Partial Collateral Removal Issue & Add New Test Scenarios

Issue

The existing implementation had a flaw where if a user removed only a portion of their collateral, they would stop earning rewards on the entirety of their remaining staked capital. This was causing an unintended halt in reward accrual for users who didn't fully withdraw their staked collateral.

Solution

  • Fixed the logic to ensure users continue earning rewards on their remaining collateral after partially withdrawing their staked funds.

Additional Changes

  • Added 2 new test scenarios to validate the correct behavior:
    1. Partial collateral removal: Ensure users still earn rewards on the remaining staked collateral after removing a portion of it.
    2. Full collateral removal: Verify the correct behavior when a user removes all of their staked collateral.

@Potolski Potolski changed the title WIP updates _updateReward logic to account withdraw requests updates _updateReward logic to account withdraw requests Oct 3, 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