[Enhancement] Refactor amount_usd
Calculation in dex_aggregators.trades
#6215
Labels
amount_usd
Calculation in dex_aggregators.trades
#6215
Description
The current implementation of amount_usd calculation in dex_aggregators.trades requires a refactor to improve clarity and maintainability. I propose categorizing the aggregators into three distinct classes based on their amount_usd calculation methods:
Direct USD Value from Contracts:
Aggregators that obtain the
usd_value
directly from the smart contract. These aggregators rely on the contract to provide the precise USD value of the trades.Custom
amount_usd
Calculation:Aggregators that have their own method for calculating
amount_usd
. These methods might involve custom logic or external data sources to determine the USD value of the trades.amount_raw
toamount_usd
:Aggregators that first calculate a raw amount (
amount_raw
) and then convert it toamount_usd
. This conversion typically involves using exchange rates or other conversion factors to determine the final USD value.Aggregators List:
The text was updated successfully, but these errors were encountered: