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(#137): changes priorityFeeGrowth to invariantGrowth, removes from… #198

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

Alexangelj
Copy link
Contributor

… claim

Description

  • Closes Priority fee growth based on liquidity shares and paid in WETH #137 by removing the WETH accrual of "priorityFeeGrowth" rewards from swap and claim.
  • Updates feePriorityGrowth to invariantGrowth, updating all respective names.
  • Adds an argument and return variable to HyperLib.syncPositionFees to sync the invariantGrowth exactly like the fee buckets.
  • Adds a conditional piece of logic to _swap to increase the invariantGrowth if the pool controller called the swap, and the change in the invariant was greater than zero. The actual check is not greater than, it's not equal to zero. This is because it's a cheaper check, and also because a decreasing invariant will be reverted by the previous logic.
  • Adds an invariant growth swap test to HyperTestSwap.

@Alexangelj Alexangelj merged commit 85aaa48 into main Feb 3, 2023
@Alexangelj Alexangelj deleted the fix/priority-fee-growth branch February 3, 2023 01:50
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.

Priority fee growth based on liquidity shares and paid in WETH
1 participant