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

Allow negative range accumulators #5854

Closed
Tracked by #5191
p0mvn opened this issue Jul 17, 2023 · 1 comment
Closed
Tracked by #5191

Allow negative range accumulators #5854

p0mvn opened this issue Jul 17, 2023 · 1 comment
Assignees
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board T:bug 🐛 Something isn't working

Comments

@p0mvn
Copy link
Member

p0mvn commented Jul 17, 2023

Background

We should allow negative range accumulators.

Currently, this is disallowed by the validation in DecCoins, leaving to a panic.

Specific way to reproduce this is by initializing the lower tick when the upper tick is already initialized and current tick > upper tick.

In that case, the lower tick's accumulator value is smaller than upper tick's accumulator value.

Suggested Design

  • Reproduce the problem in a test case
  • Find a way to resolve this without migration
    • Idea to validate: new NegDecCoins struct that serializes similarly to DecCoins into bytes but does not implement the negative coin validation.

Acceptance Criteria

  • reproduced with a test
  • solution found
  • no migration requires
@p0mvn
Copy link
Member Author

p0mvn commented Aug 3, 2023

It looks like all relevant work is merged now

@p0mvn p0mvn closed this as completed Aug 3, 2023
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done ✅ in Osmosis Chain Development Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board T:bug 🐛 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants