penumbra
penumbra copied to clipboard
Release tracking issue: DEX
This issue tracks implementation of Penumbra's DEX engine, the component that performs the four phases of DEX execution at the end of every block:
- Adding all newly opened liquidity positions
- Executing the batched swaps from the current block against that liquidity and recording the results
- Arbing prices back to consistency
- Closing all newly closed liquidity positions
To do this, we have a number of tasks, both on the in-consensus application side, as well as on the client side, and in the protocol tooling. These tasks break down as follows:
System / Mechanism design issues
This category is largely done, except for the details of trading function approximations and the reward claim mechanism. Since we don't currently have an LP reward system, reward claim design isn't blocking at the moment, and we'll do it after getting the rest of the system working.
- [x] #1908
- [x] #2167
Crypto
- [x] #3978
ActionHandler
implementations
This category covers the consensus-side execution of the action handlers for position actions. Client-side logic like Planner
support is tracked in #1991.
- [x] #2137
- [x] #2138
- [x] #2139
- [ ] #2140 (Blocked on #2167, to be done after the rest of the system is working)
- [x] #2203
DEX Engine
- [x] Fill an order against a single position (done in #2145)
- [x] #2211
- [x] #2212
- [x] #2157
- [x] #2202
- [x] #2283
- [x] #2378
- [x] #1946
- [x] #1947
- [x] #1779
- [x] #2237 (following #1908)
- [ ] #4077 (was #2928)
- [x] https://github.com/penumbra-zone/penumbra/issues/2986
- [x] https://github.com/penumbra-zone/penumbra/issues/3303
- [x] #1943
- [ ] https://github.com/penumbra-zone/penumbra/issues/2625
- [x] #3039
- [x] #3851
- [x] #3353
- [x] #4000
- [x] #4066
- [x] https://github.com/penumbra-zone/penumbra/issues/4078
- [x] #4177
DEX engine bugs (non-exhaustive):
- [x] #3850
- https://github.com/penumbra-zone/penumbra/issues/4025
- [x] https://github.com/penumbra-zone/penumbra/issues/3790
- [x] #4113
- [x] https://github.com/penumbra-zone/penumbra/issues/4189
- [x] https://github.com/penumbra-zone/penumbra/pull/4283
Client support
We don't expect that in the long term, pcli
will be used much for position management, but we'll use it as an MVP to exercise the chain logic at first. We need:
- [x] #2231
- [x] #2232
- [x] #2233
- [x] #2234
- [x] #2410
- [x] #1909
- [x] #2319 (needs #1908)
- [x] #2386
- [x] #2267
- [ ] Brainstorm regarding which ABCI events should be emitted from the DEX component
- [x] #2576
- [x] #2580
- [x] #2579
- [x] #2531
- [x] https://github.com/penumbra-zone/penumbra/issues/2823
- [ ] https://github.com/penumbra-zone/penumbra/issues/2516
- [x] https://github.com/penumbra-zone/penumbra/issues/3645
- [x] https://github.com/penumbra-zone/penumbra/issues/4060
- [x] https://github.com/penumbra-zone/penumbra/issues/3842
- [ ] https://github.com/penumbra-zone/penumbra/issues/4083
- [x] https://github.com/penumbra-zone/penumbra/issues/4084
- [x] #4123
- [x] #4112
Node architecture integration work
- [x] #2406
- [x] #2398
- [x] #1906
Testing wishlish (more to come..):
- [ ] https://github.com/penumbra-zone/penumbra/issues/2421
Testnet Strategy
Some ideas:
- [x] #2229
- [x] #2204
Raw notes
Based on details in https://hackmd.io/rsgSwz3BQKuL0GrSF0LWXA# and https://hackmd.io/jtoiMn0pQnSTZlOi2ig5Wg