-
Notifications
You must be signed in to change notification settings - Fork 11
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
function to increase delegator stake? #6
Comments
No, unfortunately this method cannot be added without increasing complexity. Simply said, contract won't know which delegation amount should be used (while calculation rewards for an epoch) if it's changeable. It's possible to add it, but contract will become more complex. On another hand, user may simply create a new delegation, because minimum delegation is only 1 FTM |
@devintegral3 but isn't it the same with the |
It would be great to see following functions getting added:
|
Because validator's stakes are being copied into each epoch snapshot. During rewards calculation, contract doesn't use current validator's stake, but the one which is written into epoch snapshot for a specified epoch. It's needed to allow delegators to claim their rewards even if validator has withdrawn (also it allows to implement increaseStake).
Thank you for your feedback. Those features can be added, with the following limitations:
It'll require a hardfork because we'll have to add support of new log types into go-lachesis node (support of UpdatedDelegation and UpdatedStake was added in Fantom-foundation/go-lachesis#414 ). All the stakes must be tracked by go-lachesis node using the special-purpose contract logs. Instead of adding support for a specific log like Using the same new types of logs, support of partial withdrawal can be added as well. |
ok, makes sense.
Can you make that work in combination with the reward lock? I think this implementation would be fine, but people should not lose their rewards in case they update their delegation. If they withdraw, then they should, but not if they increase their delegation or also re-delegate to another validator.
sounds good 👌 |
Certainly delegators shouldn't lose their rewards during increasing delegation. But it has to be discussed how exactly we change rewards burning logic - #17 |
Is there a function to increase delegator stake?
The text was updated successfully, but these errors were encountered: