-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
Description
Describe the bug
The update_user_stake call needs to be periodically called when there is a significant change in the percentage of users' stake. This is crucial to ensure that Staking rewards are accurate for users.
Solution
To address this issue, follow these steps:
-
Create an additional member in the workspace called stake_updater.
-
Implement a loop to iterate through staked accounts.
-
Within the loop, perform the following tasks:
- Calculate both the initial and final rewards for each account.
- Check if the difference between the initial and final rewards exceeds a certain threshold (X%).
If the difference is greater than the specified threshold, invoke theupdate_user_stakeextrinsic to update the user's stake.
Additional context
InterBtc side PR 1097
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
New 🆕