vegaprotocol / vega

A Go implementation of the Vega Protocol, a protocol for creating and trading derivatives on a fully decentralised network.
https://vega.xyz
GNU Affero General Public License v3.0
38 stars 22 forks source link

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

Closed JonRay15 closed 4 months ago

JonRay15 commented 7 months ago

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

Filtering requirements (inputs)

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 commented 7 months ago

Dig into fee stats to check that is working

mattrussell36 commented 4 months ago

@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