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

Create API to show AMM rewards & fees being paid to parent keys #11026

Closed
13 tasks
Tracked by #11019
JonRay15 opened this issue Mar 27, 2024 · 2 comments · Fixed by #11407
Closed
13 tasks
Tracked by #11019

Create API to show AMM rewards & fees being paid to parent keys #11026

JonRay15 opened this issue Mar 27, 2024 · 2 comments · Fixed by #11407
Assignees

Comments

@JonRay15
Copy link

JonRay15 commented Mar 27, 2024

API Overview

Since it has been agreed by protocol design / core that rewards for AMMs will be paid to the parent key and not direct to the subkey, we will need an API that tells us what the parent keys have been paid.

UPDATE: We believe that by default the fees and rewards will all turn up on the normal APIs anyway and be sent to the parent key anyway. Therefore the question here is how to make it clear on each of those APIs that the payment is a result of the derived party key. Need to define the full list of APIs we think this impacts.

API request details

  • Ensure that the rewards API has derived party key in it

  • Ensure that the fee stats API has derived party key in it

  • Create a new summary API that tells us per market and per parent key

    • Maker fees received by parent keys as a result of subkey AMM
    • LP fees received by parent keys as a result of subkey AMM
    • Rewards paid to parent keys as a result of dispatch metric = maker fees received
    • Rewards paid to parent keys as a result of dispatch metric = LP fees received

Filtering requirements (inputs)

  • Parent key
  • Subkey
  • Market ID
  • Fee / Reward type
  • Epoch to
  • Epoch from

Sample API output (optional)


Questions

Open questions about the feature implementation, what can be done with the APIs, or currently unresolved questions around the feature.

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 JonRay15 changed the title Create API to show AMM rewards being paid to parent keys Create API to show AMM rewards & fees being paid to parent keys Mar 27, 2024
@JonRay15 JonRay15 self-assigned this Apr 9, 2024
@JonRay15
Copy link
Author

JonRay15 commented Apr 9, 2024

Dig into fee stats to check that is working

@jeremyletang jeremyletang added this to the 🏛️ Colosseo milestone May 1, 2024
@karlem karlem self-assigned this May 7, 2024
@jeremyletang jeremyletang assigned EVODelavega and unassigned karlem Jun 14, 2024
@mattrussell36
Copy link
Contributor

@JonRay15

Since it has been agreed by protocol design / core that rewards for AMMs will be paid to the parent key and not direct to the subkey, we will need an API that tells us what the parent keys have been paid.

According to @EVODelavega the above statement is not true. Subkeys will get their fees directly. This means I don't think we need a totally new endpoint/query here. Just some way of including sub keys in your result perhaps using a includeSubKeys flag

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

Successfully merging a pull request may close this issue.

5 participants