SwapMatrix

Documentation for eth_defi.vault.valuation.SwapMatrix Python class.

class SwapMatrix[source]

Brute-forced route swap result for a portfolio of buying multiple tokens.

See NetAssetValueCalculator.find_swap_routes()

Attributes summary

results

Outcome of different attempted routes.

best_results_by_token

tokens

Methods summary

__init__(results, best_results_by_token)

results: dict['Route', decimal.Decimal | None]

Outcome of different attempted routes.

Result is none if the path did not exist or the smart contract call failed.

__init__(results, best_results_by_token)
Parameters
Return type

None