tangle-network / tangle

Modular restaking infrastructure for developers, restakers, and operators.
https://www.tangle.tools/
GNU General Public License v3.0
51 stars 24 forks source link

[TASK] Tangle Liquid Staking Pallet #725

Closed 1xstj closed 1 month ago

1xstj commented 2 months ago

Task: Develop Tangle Liquid Staking Pallet

Objective: Create a new pallet for Tangle that allows users to deposit TNT tokens, stake them with selected operators, and receive Tangle LST in return. This will enable users to earn staking rewards while maintaining liquidity through LST tokens and allow TangleLST to be used in restaking pallet.


Features

  1. Stake Tokens with Validators:

    • Enable users to select validators from a list of available operators.
    • Stake the deposited TNT tokens with the chosen operator on behalf of the user.
    • Mint LST tokens equivalent to the staked TNT tokens.
    • Transfer LST tokens to the user.
  2. Unstake Tokens:

    • Allow users to initiate an unstaking process.
    • Burn the corresponding amount of LST tokens.
    • Queue the TNT tokens for unstaking with the operator.
  3. Withdraw Unstaked Tokens:

    • Enable users to withdraw their unstaked TNT tokens once the unstaking period is over.
  4. Rewards Distribution:

    • Allow users to claim staking rewards to caller accounts
    • Update LST token balances to reflect accrued rewards.

    TBD

    • should every validator combo have a specific tangleLst token?