LagoonTokenCompatibilityData

Documentation for eth_defi.erc_4626.vault_protocol.lagoon.lagoon_compatibility.LagoonTokenCompatibilityData Python class.

class LagoonTokenCompatibilityData

Bases: object

Was an ERC-20 compatible with Lagoon Vault?

  • Vault can buy and sell the token

  • Only applicable to Uniswap v2 kind AMMs

Attributes summary

cached

estimate_sell_received

revert_reason

sell_block_number

sell_result

Methods summary

__init__(created_at, token_address, ...[, ...])

get_base_token_address()

get_base_token_symbol()

get_quote_token_symbol()

get_round_trip_cost()

Get round trip cost in percents.

has_liquidity()

is_buy_success()

Was the buy operation successful?

is_compatible()

Is the token compatible with Lagoon Vault?

is_sell_success()

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
Return type

None

get_round_trip_cost()

Get round trip cost in percents.

E.g. 0.005 means we paid 50 bps

Returns

Round trip cost in percents or None if not avail

Return type

Optional[float]

is_buy_success()

Was the buy operation successful?

Return type

bool

is_compatible()

Is the token compatible with Lagoon Vault?

Return type

bool

is_sell_success()

Was the sell operation successful?

Return type

bool

pformat()

Diagnostics dump for debug

Return type

str