investigate: track fee balances separately from pool liquidity balances #4786
Labels
F: concentrated-liquidity
Tracking the development of concentrated liquidity feature to improve filtering on the project board
Background
Similar to #4785 , we currently track unclaimed fees in the same module account with pool liquidity and incentives.
This poses a security risk because if there is an accounting problem with accumulators when claiming fees, the upper bound is the entire pool liquidity.
Contrary to CFMM pools, fees do not contribute to the pool liquidity / are not reinvested in CL>
However, separating fees from pool balances is no as trivial as #4785 due to low-level accounting stemming from bank transfers that operate on ints and fee accumulators that operate on decimals.
Additionally, from looking into Uniswap code, it seems to me that they also track fees together with pool balances.
My interpretation is consistent with chat gpt discussions:
Suggested Design
Investigate if we can implement fees being tracked in a separate account from pool liquidity without affecting calculations too much.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: