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

Fix reward distribution algorithm #236

Merged
merged 12 commits into from
Dec 14, 2020
Merged

Fix reward distribution algorithm #236

merged 12 commits into from
Dec 14, 2020

Conversation

ujenjt
Copy link
Member

@ujenjt ujenjt commented Dec 12, 2020

This PR refactors node operators’ reward distribution mechanics. Previously, NodeOperatorsRegistry distributed token rewards between operators on its own. Now, Lido gets a list of reward amounts and the corresponding operator addresses from NodeOperatorRegistry and performs transfers by itself. In the case of registering a profit without any active node operators, the new algorithm transfers all operators' fee tokens to the treasury. This approach is more gas efficient and prevents accumulating StETH dust on any contract involved.

Fix #237
Fix #241
Fix #240

@kadmil
Copy link
Contributor

kadmil commented Dec 13, 2020

Fixes #237 #240 #241

@skozin skozin force-pushed the distribute-rewards-fix branch from 6d718fe to dd31946 Compare December 14, 2020 21:54
@ujenjt ujenjt linked an issue Dec 14, 2020 that may be closed by this pull request
3 tasks
@skozin skozin merged commit 0570e32 into develop Dec 14, 2020
@skozin skozin deleted the distribute-rewards-fix branch December 14, 2020 23:37
dechjo pushed a commit to dechjo/lido-dao that referenced this pull request Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants