Closed kenkunz closed 2 weeks ago
After some discussion on discord, we agreed to:
frontend
)The acceptance criteria have been updated.
@hieuh25 I reviewed the current metadata
of all live strategies. There are currently two strategies that should have fees defined. One of them has fees as string values (see comment above). The other has null
values. The table provides further detail on what needs to be updated.
Strategy | Current `fees` value | Correct `fees` value |
---|---|---|
enzyme-ethereum-btc-eth-stoch-rsi
|
|
|
enzyme-polygon-eth-rolling-ratio
|
|
|
Let me know if you have any questions.
Reviewed updates made by @hieuh25 – looks good 👍
Goal
As a
frontend
developer (or another consumer of Trade Executor APIs), I want a given strategy's fees to be available in themetadata
endpoint payload, so that I can display the strategy's fees without having to storefrontend
-specific configuration.Background
See tradingstrategy-ai/frontend#774
Also see fees page of any strategy:
Strategies can have different fees, so the fee info should be configured and made available at the strategy level. As a short-term solution,
frontend
has added afees
section to thefrontend
-specific strategy configuration. This is not where this data belongs – all other important strategy-specific configuration is defined at the strategy level and made available via themetadata
endpoint.While discussing this need, @miohtama indicated that some of the fee information is configured on the Enzyme vault and should be available from Enzyme smart contracts. Not all strategies use an Enzyme vault for asset management. Regardless of the way assets are managed for a given strategy,
frontend
(and other API consumers) should have a single, consistent way to retrieve fee info. The logical place for normalizedfee
info to be normalised and consolidated is themetadata
endpoint.Proposed structure
A new top-level
fees
property should be added tometadata
payload with the following properties (corresponding to the data shown on the fees page):Each of the fees is optional. If a fee is included, the value should be a non-negative decimal (float) representation of a percent – e.g.
0.02
for a value that will be displayed as2.0%
. If a fee is not included, it will default to0
onfrontend
.Acceptance criteria
For all strategies that have been deployed with this update:
metadata
payload includes a top levelfees
property, with a value of an object with the above properties.fees
object includes one or more of the following properties:management_fee
,trading_strategy_protocol_fee
,strategy_developer_fee
.fees
property is a non-negative decimal representation of the fee percent (e.g., for a fee of2.0%
, the value would be0.02
).