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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add the current globalCapacityFactor to store #621

Merged
merged 6 commits into from
Jan 16, 2023

Conversation

MilGard91
Copy link
Contributor

@MilGard91 MilGard91 commented Jan 11, 2023

Context

closing #566

Changes proposed in this pull request

Adding globalCapacityFactor to segments of the Cover to be used when burning stake.

Test plan

Test expanded with test with change of globalCapacityFactor before burn stake

Checklist

  • Rebased the base branch
  • Attached corresponding Github issue
  • Prefixed the name with the type of change (i.e. feat, chore, test)
  • Performed a self-review of my own code
  • Followed the style guidelines of this project
  • Made corresponding changes to the documentation
  • Didn't generate new warnings
  • Didn't generate failures on existing tests
  • Added tests that prove my fix is effective or that my feature works

Review

When reviewing a PR, please indicate intention in comments using the following emojis:

  • 馃嵃 = Nice to have but not essential.
  • 馃挕 = Suggestion or a comment based on personal opinion
  • 馃敤 = I believe this should be changed.
  • 馃 = I don鈥檛 understand something, do you mind giving me more context?
  • 馃殌 = Feedback

@MilGard91 MilGard91 force-pushed the fix/cover-global-capacity-factor branch from a07b290 to 1157b27 Compare January 11, 2023 10:58
@@ -390,7 +391,8 @@ contract Cover is ICover, MasterAwareV2, IStakingPoolBeacon, ReentrancyGuard {
start.toUint32(),
period.toUint32(),
productType.gracePeriod,
0 // global rewards ratio
0, // global rewards ratio
globalCapacityRatio
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically we won't burn any staking pool so the amount here is irelevant, but since we're (hypothetically) divide by it, can you set this to 1, please?

@shark0der shark0der changed the title Add the current globalCapacityFactor to store Fix: Add the current globalCapacityFactor to store Jan 11, 2023
@shark0der shark0der changed the base branch from feature/staking-nft to nexus-v2 January 11, 2023 15:37
@shark0der shark0der force-pushed the fix/cover-global-capacity-factor branch from f43ea8c to a351657 Compare January 11, 2023 15:37
@MilGard91 MilGard91 force-pushed the fix/cover-global-capacity-factor branch 2 times, most recently from 9cc7c42 to 0246b62 Compare January 12, 2023 13:15
@MilGard91 MilGard91 marked this pull request as ready for review January 12, 2023 15:15
@shark0der shark0der force-pushed the fix/cover-global-capacity-factor branch 2 times, most recently from dbacaf9 to 7b22c17 Compare January 16, 2023 09:59
@shark0der shark0der force-pushed the fix/cover-global-capacity-factor branch from 7b22c17 to 6ddf477 Compare January 16, 2023 10:13
@roxdanila roxdanila merged commit 6436b99 into nexus-v2 Jan 16, 2023
@roxdanila roxdanila deleted the fix/cover-global-capacity-factor branch January 16, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CoverSegment struct: add the current globalCapacityFactor to it and store it when buying / editing a cover
4 participants