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

Enhance liquidity provisions APIs with AMM details #11025

Open
3 tasks
Tracked by #11019
JonRay15 opened this issue Mar 27, 2024 · 2 comments
Open
3 tasks
Tracked by #11019

Enhance liquidity provisions APIs with AMM details #11025

JonRay15 opened this issue Mar 27, 2024 · 2 comments

Comments

@JonRay15
Copy link

JonRay15 commented Mar 27, 2024

API Overview

We need to show liquidity provision data for AMMs so that we can show that alongside the existing liquidity provisions data in console.

Its not completely clear at this point how much of the liquidity data is valid for a AMM. We already are proviiding details of the shape of AMM on #11023, so the question then is whether it is best to:

  1. Add the AMMs to the same set of APIs that we already have for regular LPs with any defaults applied where the data is not relevant
  2. Create a new AMM liquidity provision API which contains only the relevant parts for AMMs
  3. Append the liquidity provision data to the shape API already defined

Suggest we discuss that and agree a way forward.

Current APIs

liquidity/all-provisions

Provides basic details like commitment, fee, party ID etc for all active and pending commitments

liquidity/providers

Provides all details of the fee share each LP got, ELS, score, etc

liquidity/paidfees

Provides detils of the fees paid to LPs for a given market in a given epoch

Liquidity view in Console

Console joins all of these together to produce the current view of LPs here.

API request details

  • Exact details TBC

Filtering requirements (inputs)

  • Party ID
  • Market ID

Questions

Work out how to actually provide this data, whether as part of existing APIs, or something new.

API test scenarios

Detailed scenarios that can be executed as feature tests to verify that the API has been implemented as expected.

GIVEN (setup/context)
WHEN (action)
THEN (assertion) For example...
See here for more format information and examples.

Additional Details (optional)

Any additional information that provides context or gives information that will help us develop the feature.

@JonRay15
Copy link
Author

JonRay15 commented May 2, 2024

@jeremyletang is going to talk to Core about options here and then we will follow up

@EVODelavega
Copy link
Contributor

EVODelavega commented Aug 22, 2024

Current state of the APIs:

  • liquidity/all-provisions: Merging the AMM stuff here is problematic (pagination will be messed up, the data doesn't map cleanly, etc...). There is an existing endpoint called ListAMMs that can be used to supplement the data obtained from ListLiquidityProvisions.
  • liquidity/providers fees: The endpoints ListPaidLiquidityFees already support AMM derived keys, as do the endpoints ListRewardSummaries, ListRewards, ObservePositions, ObserveAccounts, and ListAccounts.

@JonRay15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants