# Delegation Types

# Delegation

jigu.core.Delegation

Stores information about the status of a delegation between a delegator and validator, fetched from the blockchain.

Attribute Type Description
delegator_address AccAddress delegator's account address
validator_address ValAddress validator's operator address
shares Coin (decimal) delegator's shares
balance Coin (integer) balance of the delegation

# Unbonding Delegation

jigu.core.UnbondingDelegation

When a delegator decides to take out their funds from the staking pool, they must unbond their tokens which takes an amount of time specified by unbonding_time parameter in the staking module.

An unbonding delegation is implemented through creating UnbondingEntry objects, limited by the max_entry parameter in the staking module params. You cannot initiate unbonds more times than the amount of entries permitted. Entries are cleared when their unbonding periods are completed and the funds are returned to the delegator's account balance to be spent freely.

Attribute Type Description
delegator_address AccAddress delegator's account address
validator_address ValAddress validator's operator address
entries UnbondingDelegationEntry[] entries (see below)

# Unbonding Delegation Entry

jigu.core.UnbondingDelegationEntry
Attribute Type Description
initial_balance Coin (integer) balance of delegation prior to initiating unbond
balance Coin (integer) balance of delegation after initiating unbond
creation_height int height of blockchain when entry was created
completion_time Timestamp time when unbonding will be completed

Note that the size of the undelegation is initial_balance - balance.

# Redelegation

jigu.core.Redelegation

A redelegation is when a delegator decides to stop staking with one validator and transfer their delegation to another validator. Rather than unbonding (which takes some time) and re-staking, the funds can be redelegated immediately if a RedelegationEntry can be created.

A redelegation, like an unbonding delegation, is implemented through RedelegationEntry objects, limited by the max_entry parameter in the staking module params. For each pair of source and target validators, you cannot redelegate more times than the amount of entries. Entries are cleared when the redelegation is completed, the same amount of time as unbonding.

Attribute Type Description
delegator_address AccAddress delegator's account address
validator_src_address ValAddress source validator's operator address (from)
validator_dst_address ValAddress target validator's operator address (to)
entries RedelegationEntry[] entries (see below)

# Redelegation Entry

jigu.core.RedelegationEntry
Attribute Type Description
initial_balance Coin (integer) balance of delegation prior to initiating redelegation
balance Coin (integer) balance of delegation after initiating redelegation
creation_height int height of blockchain when entry was created
completion_time Timestamp time when redelegation entry will be removed

Note that the size of the redelegation is initial_balance - balance.

Updated on: 2/27/2020, 9:12:11 PM