-
Notifications
You must be signed in to change notification settings - Fork 256
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
Fill in Position
-related ActionHandler
implementations
#1905
Labels
Comments
@zbuc Is this ticket still useful? Can you expand in the OP what the goal here is? |
Let's keep this ticket open and use it for creating liquidity positions. We will also need a client-facing component. Will update. |
zbuc
added a commit
that referenced
this issue
Mar 7, 2023
* Start implementing pcli side of lp actions * dex: don't track position nonces, just position IDs Tracking the position nonces was a red herring, because what we really care about is that the position ID is used only once -- the nonce is just used as a way to ensure that it's possible to create more than one position with the same trading function. * dex: don't return an LpNft from position_open() The LpNft is only ever tracked by the client in their private state, it's never used by the public part of the state machine, except as part of the value balance checks for the transaction, so the state machine never has to work with an LpNft. * dex: move stateless checks out of PositionManager We want to do all of the stateless checks in one place, and we also want to do as little work as possible in `execute`, which runs serially. * dex: implement ActionHandler for PositionClose * dex: don't implement LP rewards, specifically * dex: implement ActionHandler for PositionWithdraw, reorg PositionManager This commit fills in the position withdrawal implementation, and also reorganizes the code in the PositionManager trait, so that it's largely moved into the body of the ActionHandlers. The PositionManager now has a single method, `put_position`, which handles invalidating existing indexes and writing new ones. * storage: add test that deleting nonexistent keys works We want to check that this is the case, so that we can unconditionally delete indexes in the PositionManager. * Clean up warnings --------- Co-authored-by: Henry de Valence <hdevalence@penumbra.zone>
hdevalence
changed the title
Fill in existing stubbed implementations
Fill in Mar 15, 2023
Position
-related ActionHandler
implementations
Folding into #1724 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to the
ActionHandler
forcomponent::dex
.This ticket tracks the consensus-side execution of the action handlers for position actions. The implementation of the DEX engine itself is tracked in #1724. Client-side logic like
Planner
support is tracked in #1991.PositionOpen
implementation #2137PositionClose
implementation #2138PositionWithdraw
implementation #2139PositionRewardClaim
implementation #2140 (Blocked on dex: design details of LP reward claim mechanism #2167)The text was updated successfully, but these errors were encountered: