Restake
Core Concepts

Tangle Liquid Stake Concepts

Liquid Staking on Tangle Network

Introduction

Liquid staking on Tangle Network allows users to participate in staking while still maintaining liquidity of their staked assets. This mechanism is implemented via delegation pools, enabling participants to stake their tokens in a pool, earn rewards, and retain the ability to unbond or transfer staked assets without waiting for the traditional staking lock-up periods.

This document outlines the functionality and key processes involved in liquid staking on Tangle, based on the relevant code provided.

Key Components of Liquid Staking

1. Pools and Roles

  • Pools are the fundamental unit of staking on Tangle. Pools are managed by specific roles:
  • Root: The administrator who has full control over the pool and can update roles.
  • Nominator: An account responsible for nominating validators on behalf of the pool.
  • Bouncer: An account that can change the state of the pool.
  • Depositor: The user who creates the pool and deposits the initial bond.

2. Bonding and Staking

  • Users can bond their assets to a pool using the join function, effectively staking their tokens in exchange for pool rewards. The bond amount is transferred to the pool's account and increases the pool's total bond.
  • Additional funds can be bonded using the bond_extra function. This allows users to add more tokens to their existing stake, either from free balance or pending rewards.

3. Unbonding

  • Users can unbond their staked tokens with the unbond function, which allows them to withdraw up to a specified amount of their staked assets. The system ensures that rewards are automatically collected during the unbonding process to prevent forfeiture.
  • Permissionless unbonding: Under specific conditions, such as when a pool is blocked or destroying, users can unbond their tokens permissionlessly.

4. Withdrawals

  • Withdraw Unbonded: Once tokens are unbonded, users can withdraw their funds using the withdraw_unbonded function. This function can also be used permissionlessly if certain conditions are met (e.g., the pool is destroying, or the caller is the depositor and the only member left).

5. Pool Management

  • Create Pools: Users can create new delegation pools with the create function. A pool requires an initial deposit, and the creator can set the roles for root, nominator, and bouncer. Pools can also be created with a previously used pool ID using the create_with_pool_id function.
  • Pool State Management: The state of a pool can be modified using the set_state function. Pools can have various states, such as open, blocked, or destroying. Once a pool enters the destroying state, it cannot change its state again.

6. Rewards and Commission

  • Commission: Pools can set a commission percentage using the set_commission function. This determines the amount of rewards that are paid to the pool's commission account.
  • Claiming Commission: Pending commission can be claimed using the claim_commission function, which adds the claimed amount to the total claimed commission and resets pending commission to zero.
  • Maximum Commission: The maximum allowable commission can be set with the set_commission_max function, ensuring that future commissions are bound by this limit.
  • Commission Change Rate: The rate at which commission changes can be controlled using the set_commission_change_rate function.

7. Adjusting Pool Deposits

  • Pools must maintain an existential deposit (ED) in the reward account to ensure proper functionality. The adjust_pool_deposit function allows users to either top up the deficit or withdraw any excess deposit from the pool.

8. Claim Permissions

  • The ability to claim pending commission is controlled by the set_commission_claim_permission function, which determines who can claim the pool's pending commission. This allows the pool owner to delegate the commission claim to a different account.

What is commission change rate?

The maximum rate increase allowed for a single commission update. Note that once set, the pool admin can only lower it. When setting the Change Rate, it will also be possible to set a minDelay quantified as the number of blocks (since last commission update) after which it is possible to change the commission (i.e. the minimum delay between commission updates). Note that once set, the pool admin can only increase it.


Max Commission and Change Rate must not be necessarily set. It is the choice of the pool admin to set those parameters and provide transparency to the pool members about the pool's commission policy.