StablecoinRateFeeder
Documentation for eth_defi.feed.stablecoin_rate.StablecoinRateFeeder Python class.
- class StablecoinRateFeeder
Bases:
objectCached stablecoin rate/depeg lookup helper for vault metrics.
Attributes summary
data_dirSet of
(chain_id, lowercased_address)keys for depegged tokens (built lazily, cached).Set of unambiguously depegged normalised symbols (built lazily, cached).
Methods summary
__init__([data_dir])Resolve a vault denomination token to exported rate metadata.
is_depegged_stablecoin_token(chain_id, ...)Return
Truewhen a denomination token is marked depegged.- __init__(data_dir=PosixPath('/home/runner/work/web3-ethereum-defi/web3-ethereum-defi/eth_defi/data/stablecoins'))
- Parameters
data_dir (pathlib.Path) –
- Return type
None
- property depegged_contracts: set[tuple[int, str]]
Set of
(chain_id, lowercased_address)keys for depegged tokens (built lazily, cached).
- property depegged_symbols: set[str]
Set of unambiguously depegged normalised symbols (built lazily, cached).
- get_denomination_token_rate_section(chain_id, address, symbol)
Resolve a vault denomination token to exported rate metadata.
- Parameters
- Return type