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

#1905: Implement LP Actions Skeleton #2115

Merged
merged 14 commits into from
Mar 7, 2023
Merged

#1905: Implement LP Actions Skeleton #2115

merged 14 commits into from
Mar 7, 2023

Conversation

zbuc
Copy link
Member

@zbuc zbuc commented Mar 7, 2023

This adds skeleton code and disabled partial implementations for LP actions to both pcli and pd.

zbuc and others added 14 commits March 5, 2023 19:43
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.
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.
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.
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.
We want to check that this is the case, so that we can unconditionally delete
indexes in the PositionManager.
@zbuc zbuc temporarily deployed to smoke-test March 7, 2023 02:07 — with GitHub Actions Inactive
@zbuc zbuc merged commit ec0ccf7 into main Mar 7, 2023
@zbuc zbuc deleted the 1905_lp_actions branch March 7, 2023 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants