-
Notifications
You must be signed in to change notification settings - Fork 16
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
Mechanics refactor #51
Conversation
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.
Looks good, naming nits and I have to think about the rounding a little more
e162830
to
0438d29
Compare
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.
a couple mid-review comments, gonna keep reviewing in a bit
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.
Looks good, interested to hear Ed's thoughts on some of the naming issues, but they shouldn't hold up approval. Also, I don't think the rounding precision should ever not favor the contract.
0438d29
to
646cf2f
Compare
We had to update the way percentages were calculated in our tests, and also fix a test, to avoid introducing too much precision error in our expectations.
We move away from some of the variable and method names we inherited from the synthetix staking contract in favor of more explicit and clear names where possible. In particular, we introduce language around checkpointing and accumulators to make it more obvious how the mechanism works. We also add clarity around reward related methods to make it clear the rewards in question are only unclaimed rewards.
646cf2f
to
4a740e6
Compare
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.
lgtm, a couple small things i caught
91124c3
to
3355b40
Compare
Coverage after merging mechanics-refactor into main will be
Coverage Report
|
closes #41