-
Notifications
You must be signed in to change notification settings - Fork 1
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
Per deposit accounting #14
Conversation
06d913a
to
aae0398
Compare
@@ -130,13 +130,23 @@ contract GovernanceStakerTest is Test, PercentAssertions { | |||
view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arbitrary comment location
Note that I've created a number of follow up issues to expand the test suite and make other modifications that flow from this PR, but which can be handled independent of it.
- Rewrite "sum of rewards" invariant #15
- Rewrite "sum of earning power" invariant for updated accounting/earning power system #16
- Consider: Rename the deposit's beneficiary to something more descriptive #17
- Add additional tests for the new purpose of a deposits beneficiary #18
- Should the owner of a deposit also be able to claim its rewards? #19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nits
aae0398
to
1b75abc
Compare
UniStaker tracks rewards earned by individual addresses which are specified as the beneficiary of deposits. The same address may earn rewards from tokens which have been staked in multiple deposits. This commit converts the system to track rewards on a per-deposit basis instead. Each deposit earns rewards according to the tokens staked in it. The test suite has been updated to reflect this change. The meaning of beneficiary changed as well. It is no longer the address that earns the rewards, but instead is the address that has permissions to withdrawal the rewards earned by a given deposit. Co-Author: Keating <[email protected]>
8ea6f48
to
f26956a
Compare
Coverage after merging per-deposit-accounting into main will be
Coverage Report
|
closes #5