vega icon indicating copy to clipboard operation
vega copied to clipboard

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

Open JonRay15 opened this issue 10 months ago • 1 comments

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 avatar Mar 27 '24 15:03 JonRay15