osmosis
osmosis copied to clipboard
refactor/fix/test(sqs): pool liquidity pricing refactor & clean up
Closes: #XXX
What is the purpose of the change
The goal of this work is to refactor and clean up pool liquidity pricing logic, making the abstraction consistently denominated in the single unit (USDC, descaled with precision). A related PR exists in sqs
This is also a pre-requisite towards the dynamic min liquidity pricing in SQS and pool liquidity pricing: https://github.com/osmosis-labs/sqs/pull/224
As a side benefit, the following issue was resolved, making the pool liquidity capitalization be consistently in a single denomination https://linear.app/osmosis/issue/DATA-48/understand-why-pool-tvl-has-become-scaled-updatetest-new-behavior
Additionally, the dependency on the asset list was removed from the node for no need.
Lastly, clean-ups of the convertPool
function were achieved by encapsulating complex logic into separate functions for greater testability.
Testing and Verifying
- Unit tests
- Will test in stage after backporting to
v25.x
Documentation and Release Note
- [ ] Does this pull request introduce a new feature or user-facing behavior changes?
- [ ] Changelog entry added to
Unreleased
section ofCHANGELOG.md
?
Where is the change documented?
- [ ] Specification (
x/{module}/README.md
) - [ ] Osmosis documentation site
- [ ] Code comments?
- [ ] N/A