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

Simplify modifyLiquidity #879

Closed

Conversation

jeffishjeff
Copy link
Contributor

Description of changes

  • It's not necessary to initialize feeGrowthOutside (and by extension feeGrowthInside) for newly initialized ticks, as feeGrowthInside is always taken in relativity when used for calculating feeOwned
  • If that's removed, we can move fee accrue logic to the front in modifyLiquidity(), then combine previously fragmented tick related logic (i.e. clear tick) all inside updateTick()
  • Net result is a bit of gas saving and making the code easier to read

@hensha256
Copy link
Contributor

Hi! Thanks so much for your contribution. Given the code has already completed 5 audits, we are not going to be making any new changes other than in the event that a bug is found.

@hensha256 hensha256 closed this Sep 13, 2024
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.

2 participants