eth_portfolio.protocols package

Subpackages

Submodules

eth_portfolio.protocols.convex module

class eth_portfolio.protocols.convex.Convex[source]

Bases: ProtocolWithStakingABC

__init__()[source]
Return type:

None

async _balances(address, block=None)
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

networks = [Network.<function Network.name at 0x7efd1bf37be0>]
pools: List['StakingPoolABC']
class eth_portfolio.protocols.convex._CvxLockerV2[source]

Bases: SingleTokenStakingPoolABC

async _balances(address, block=None)
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

should_check(block)
Parameters:

block (int | BlockNumber | None)

Return type:

bool

__call__ = <_ASyncFutureInstanceMethod for <function StakingPoolABC.__call__> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

balance_method_name: str = 'lockedBalanceOf'

The name of the method that is used to query a staker’s balance in the staking pool.

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

property contract: Contract
contract_address: Address = '0x72a19342e8F1838460eBFCCEf09F6585e32db86E'

The address of the staking pool.

property contract_call: ContractCall
property deploy_block: int | BlockNumber
property price: ASyncFunctionSyncDefault[int | BlockNumber, Decimal]
property scale: HiddenMethod[ERC20, int]
token: ERC20 = <ERC20 CVX '0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B'>

The token that is used for staking in this pool.

eth_portfolio.protocols.dsr module

class eth_portfolio.protocols.dsr.MakerDSR[source]

Bases: ProtocolABC

__init__()[source]
Return type:

None

async _balances(address, block=None)[source]
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

async _exchange_rate(block=None)[source]
Parameters:

block (int | BlockNumber | None)

Return type:

Decimal

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

networks = [Network.<function Network.name at 0x7efd1bf37be0>]

eth_portfolio.protocols.liquity module

class eth_portfolio.protocols.liquity.LiquityStabilityPool[source]

Bases: SingleTokenStakingPoolABC

async _balances(address, block=None)
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

should_check(block)
Parameters:

block (int | BlockNumber | None)

Return type:

bool

__call__ = <_ASyncFutureInstanceMethod for <function StakingPoolABC.__call__> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

balance_method_name: str = 'getCompoundedLUSDDeposit'

The name of the method that is used to query a staker’s balance in the staking pool.

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

property contract: Contract
contract_address: Address = '0x66017D22b0f8556afDd19FC67041899Eb65a21bb'

The address of the staking pool.

property contract_call: ContractCall
property deploy_block: int | BlockNumber
networks = [Network.<function Network.name at 0x7efd1bf37be0>]
property price: ASyncFunctionSyncDefault[int | BlockNumber, Decimal]
property scale: HiddenMethod[ERC20, int]
token: ERC20 = <ERC20 LUSD '0x5f98805A4E8be255a32880FDeC7F6728C6568bA0'>

The token that is used for staking in this pool.

class eth_portfolio.protocols.liquity.LqtyStakingPool[source]

Bases: SingleTokenStakingPoolABC

async _balances(address, block=None)
Parameters:
  • address (str | HexBytes | AnyAddress | EthAddress)

  • block (int | BlockNumber | None)

Return type:

TokenBalances

should_check(block)
Parameters:

block (int | BlockNumber | None)

Return type:

bool

__call__ = <_ASyncFutureInstanceMethod for <function StakingPoolABC.__call__> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

balance_method_name: str = 'stakes'

The name of the method that is used to query a staker’s balance in the staking pool.

balances = <_ASyncFutureInstanceMethod for <function ProtocolABC.balances> bound to None>
Parameters:
  • fn_args (~P)

  • fn_kwargs (~P)

Return type:

T

property contract: Contract
contract_address: Address = '0x4f9Fbb3f1E99B56e0Fe2892e623Ed36A76Fc605d'

The address of the staking pool.

property contract_call: ContractCall
property deploy_block: int | BlockNumber
networks = [Network.<function Network.name at 0x7efd1bf37be0>]
property price: ASyncFunctionSyncDefault[int | BlockNumber, Decimal]
property scale: HiddenMethod[ERC20, int]
token: ERC20 = <ERC20 LQTY '0x6DEA81C8171D0bA574754EF6F8b412F2Ed88c54D'>

The token that is used for staking in this pool.

Module contents