bittensor.core.chain_data.dynamic_info#

This module defines the DynamicInfo data class and associated methods for handling and decoding dynamic information in the Bittensor network.

Classes#

Module Contents#

class bittensor.core.chain_data.dynamic_info.DynamicInfo#

Bases: bittensor.core.chain_data.info_base.InfoBase

alpha_in: bittensor.utils.balance.Balance#
alpha_in_emission: bittensor.utils.balance.Balance#
alpha_out: bittensor.utils.balance.Balance#
alpha_out_emission: bittensor.utils.balance.Balance#
alpha_slippage#
alpha_to_tao(alpha)#
Parameters:

alpha (Union[bittensor.utils.balance.Balance, float, int])

Return type:

bittensor.utils.balance.Balance

alpha_to_tao_with_slippage(alpha, percentage=False)#

Returns an estimate of how much TAO would a staker receive if they unstake their alpha using the current pool state.

Parameters:
Returns:

If percentage is False, a tuple of balances where the first part is the amount of TAO received, and the second part (slippage) is the difference between the estimated amount and ideal amount as if there was no slippage. If percentage is True, a float representing the slippage percentage.

Return type:

Union[tuple[bittensor.utils.balance.Balance, bittensor.utils.balance.Balance], float]

blocks_since_last_step: int#
emission: bittensor.utils.balance.Balance#
is_dynamic: bool#
k: float#
last_step: int#
netuid: int#
network_registered_at: int#
owner_coldkey: str#
owner_hotkey: str#
pending_alpha_emission: bittensor.utils.balance.Balance#
pending_root_emission: bittensor.utils.balance.Balance#
price: bittensor.utils.balance.Balance#
slippage#
subnet_identity: bittensor.core.chain_data.subnet_identity.SubnetIdentity | None#
subnet_name: str#
subnet_volume: bittensor.utils.balance.Balance#
symbol: str#
tao_in: bittensor.utils.balance.Balance#
tao_in_emission: bittensor.utils.balance.Balance#
tao_slippage#
tao_to_alpha(tao)#
Parameters:

tao (Union[bittensor.utils.balance.Balance, float, int])

Return type:

bittensor.utils.balance.Balance

tao_to_alpha_with_slippage(tao, percentage=False)#

Returns an estimate of how much Alpha would a staker receive if they stake their tao using the current pool state.

Parameters:
Returns:

If percentage is False, a tuple of balances where the first part is the amount of Alpha received, and the second part (slippage) is the difference between the estimated amount and ideal amount as if there was no slippage. If percentage is True, a float representing the slippage percentage.

Return type:

Union[tuple[bittensor.utils.balance.Balance, bittensor.utils.balance.Balance], float]

tempo: int#