-
Notifications
You must be signed in to change notification settings - Fork 15
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
feature/pro-615/lp-time-based-ranges #3841
Conversation
PRO-609 More control over LP positions lifetime
When creating an order, an LP should have the possibility to specify these parameters:
|
…ok in an error case
Codecov Report
@@ Coverage Diff @@
## main #3841 +/- ##
======================================
Coverage 71% 71%
======================================
Files 364 364
Lines 56218 56476 +258
Branches 56218 56476 +258
======================================
+ Hits 39998 40234 +236
- Misses 14257 14276 +19
- Partials 1963 1966 +3
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
PRO-615 LP Time-Based Order Validity Range
We want LP's to be able to specify an inclusive range of blocks (possibly timestamps) within which the order is to remain valid. (Why timestamps? I think this will be useful since blocks are not always a very reliable measure of time). Imagine an order with a validity range defined by its creation window and valid_until:
There are 3 possibilities: A: Order added before the creation window → Ok. Funds are reserved, and we defer order submission until the first block of the creation window. B: Order added inside the creation window → Same as A, except the order is immediately live. C: Order added after the creation window → Extrinsic Error Some pseudo-code as a starting point:
Other Considerations:
|
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've made the below fixes/changes and also some renames/refactors and added some tests + merge main.
@AlastairHolmes I'll leave final approval to you. A couple of things that might need further consideration:
|
Just realised #3886 is already open - this will probably have to wait for that... |
@AlastairHolmes just wanted to ask what the status is or if this is still on the menu. The last info I had was that you wanted to merge this with LP changes. |
I was looking into it but I guess the amount of conflicts is too high that it's probably easier just to re-implement the logic of PRO-609 on top of the new changes which are on main. Are you done with all your changes regarding the pools-pallet @AlastairHolmes? If yes, I would start doing that. |
There is one more change to make which I'll do in the next few days. Basically auto collecting which should be easy now. |
Should this be closed in favour of the new PR? @Janislav |
I think so. We can reopen if not. |
Pull Request
Closes: PRO-615
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Please include a succinct description of the purpose and content of the PR. What problem does it solve, and how? Link issues, discussions, other PRs, and anything else that will help the reviewer.