chore: Add comment explaining why ammLPHolds is called twice - #6546
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6546 +/- ##
=========================================
- Coverage 79.8% 79.8% -0.0%
=========================================
Files 878 878
Lines 67893 67892 -1
Branches 7551 7551
=========================================
- Hits 54209 54208 -1
Misses 13684 13684
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
verifyAndAdjustLPTokenBalance modifies the ledger state. It rounds the LPToken balance.
When fixAMMClawbackRounding is enabled, lpTokenBalance was retrieved twice on purpose before the refactor:
The rounding function verifyAndAdjustLPTokenBalance happens bewteen the two ammLPHolds functions.
So if there's rounding happening, the second ammLPHolds will return a different number from the first ammLPHolds
a55afcb to
b48fb7c
Compare
AMMClawbackammLPHolds is called twice
High Level Overview of Change
This PR notes that in
AMMClawback,ammLPHoldswas called twice on purposeContext of Change
AI review triage