Strategy ROI
HydroTrade is engineered to enable traders to establish an on-chain recurring trading strategy of buying high and selling low. With this functionality, it becomes feasible to compute the returns (ROI) for each strategy by leveraging data derived from strategy actions, including creation, balance adjustments, and trades interacting with the accessible liquidity.
Disclaimer: Our objective is to calculate an ROI metric that resonates most effectively with users, reflecting their performance utilizing HydroTrade. We employ a methodology that relies solely on the present prices of paired tokens, retrospectively applied to each block, and assesses the returns as a percentage of the liquidity contributed.
Calculating ROI
To determine the strategy ROI, we adhere to the following guidelines:
Only trade events influence the calculation. Additions or removals of liquidity do not alter the ROI value.
We employ "sub-strategies" to compute the strategy ROI, representing the intervals between each balance-changing action.
The strategy ROI is the aggregate of all sub-strategy returns (in USD), divided by the total liquidity amount deposited (evaluated in USD), provided that the liquidity has been traded.
Sub-strategy returns are calculated using the current USD price of the tokens, utilizing historical token amounts against the current USD price.
To compute the ROI, we follow this procedure:
Determine the token gains for each sub-strategy.
Convert the token amounts to USD by multiplying them with the current market price.
Total the USD value of gains and divide it by the strategy value.
Last updated