LagoonTokenCompatibilityData
Documentation for eth_defi.erc_4626.vault_protocol.lagoon.lagoon_compatibility.LagoonTokenCompatibilityData Python class.
- class LagoonTokenCompatibilityData
Bases:
objectWas an ERC-20 compatible with Lagoon Vault?
Vault can buy and sell the token
Only applicable to Uniswap v2 kind AMMs
Attributes summary
cachedestimate_sell_receivedrevert_reasonsell_block_numbersell_resultMethods summary
__init__(created_at, token_address, ...[, ...])get_base_token_address()get_base_token_symbol()get_quote_token_symbol()Get round trip cost in percents.
has_liquidity()Was the buy operation successful?
Is the token compatible with Lagoon Vault?
Was the sell operation successful?
is_stablecoin_quoted()pformat()Diagnostics dump for debug
- __init__(created_at, token_address, pair_address, path, tokens, available_liquidity, minimum_liquidity_threshold, buy_block_number, estimate_buy_received, buy_amount_raw, buy_result, buy_real_received, sell_block_number=None, estimate_sell_received=None, sell_result=None, revert_reason=None, cached=False)
- Parameters
created_at (datetime.datetime) –
token_address (str) –
pair_address (str) –
available_liquidity (decimal.Decimal) –
minimum_liquidity_threshold (decimal.Decimal) –
buy_block_number (int) –
estimate_buy_received (int) –
buy_amount_raw (int) –
buy_result (Optional[eth_defi.trade.TradeSuccess]) –
buy_real_received (int) –
sell_result (Optional[eth_defi.trade.TradeSuccess]) –
cached (bool) –
- Return type
None
- get_round_trip_cost()
Get round trip cost in percents.
E.g. 0.005 means we paid 50 bps
- is_buy_success()
Was the buy operation successful?
- Return type
- is_compatible()
Is the token compatible with Lagoon Vault?
- Return type
- is_sell_success()
Was the sell operation successful?
- Return type
- pformat()
Diagnostics dump for debug
- Return type