-
Notifications
You must be signed in to change notification settings - Fork 45
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
Lbp one weight change #1260
base: main
Are you sure you want to change the base?
Lbp one weight change #1260
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mkflow27, thanks for putting this together!
Looks good overall; here's a first pass with some comments, mostly small things where there's room for improvement and some questions.
Besides that, the main question I have is whether we want all pools to be like this (i.e. a single weight update at construction time vs configurable weight updates). If we want this to be more flexible and have some pools with a single update and some pools with configurable updates, then we might need to add a flag and rethink a few things.
Same for disabling swaps. Do we just want them enabled after the update starts and that's it?
@@ -37,7 +44,6 @@ contract LBPool is WeightedPool, Ownable2Step, BaseHooks { | |||
uint32 endTime; | |||
uint64 startWeight0; | |||
uint64 endWeight0; | |||
bool swapEnabled; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielmkm @mkflow27 do we want all pools to be like this, or was this meant to be an optional feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm proposing some structural changes. Let me know what you think.
55fd9da
to
481490b
Compare
Should we use the Balancer Contract Registry to identify a trusted router in the LBP? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these tests deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially did not have enough time to refactor the typescript tests. So I removed them with the intention of adding them during my work on this pr ( I think )
See below for the original text.
This version is in the same spirit, keeping things simple for aggregators by limiting the scope to token sales, and essentially fixing all parameters on deployment: the sale has a fixed start and end time, with a single weight change schedule. Liquidity can only be added before the start, and only removed after the end. Swaps can only occur during the sale.
There is a flag indicating whether the project token can be sold "back" into the pool. If not, it is a "one way" distribution. Everything is immutable. The only things that can change unpredictably are the actual balances (due to swaps), and the swap fee (which can be changed by the owner).
I temporarily removed the LBPLib (used for better error messages). I'll put that back when we have a fixed design and I'm writing the tests.
Goal of the draft:
Description
This pr adds changes to the LBP. Namely:
bootstrapToken
which allows for the pool creator to determine if the bootstrap token can be sold&bought or only bought.allowRemovalOnlyAfterWeightChange
which allows for the pool creator to determine if removing liquidity is allowed during pool lifecycle or only after weight change has endedOverall the goal of this pr is to deliver the following feature requests:
Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution