Skip to content

Staking TML Tokens

Enrico Rubboli edited this page Aug 18, 2023 · 17 revisions

Staking with Mintlayer offers you two prominent paths. Whether you want to be at the helm of managing a staking pool or prefer to delegate your tokens to an expertly managed pool, we have you covered. Dive into this guide to learn both methods.

Two Ways to Stake TML Tokens

1. Creating a Staking Pool

For those who possess a robust amount of TML tokens and the technical prowess to maintain a staking pool, this is a route worth considering.

Prerequisites:

  • Balance: Before even thinking of starting a pool, your wallet should have at least 40,000 TML tokens.

  • Always-On Machine: You're not just managing your tokens. You're providing a service to others. Ensure your computer remains online 24/7 to keep the staking pool operational.

NOTE: Staking enables your wallet to attempt block production. When a valid block is found, it's propagated across the network, and rewards are distributed to stakers from blocks included in the blockchain. Generating a valid block doesn't consume energy as in a Proof Of Work consensus system like Bitcoin. However, it requires the wallet to sign the block. This means the wallet must be online and connected to your node for staking to function.

Steps to Create a Staking Pool:

  1. Execute createstakepool Command: This command initiates your staking pool. We discussed its details earlier, but here's a quick recap:

    createstakepool <AMOUNT> <COST_PER_BLOCK> <MARGIN_RATIO_PER_THOUSAND> [DECOMMISSION_KEY]

the initial amount of a pool is called pledge, and is immediately removed from your balance.

  1. Kick-off Staking with startstaking: After setting up your pool, you need to get it going. The startstaking command does just that.

  2. Monitor with stakepoolbalance: Keep an eye on your staking pool's balance. Here's how:

    stakepoolbalance <POOL_ID>

    Arguments:

    • <POOL_ID>: The unique ID of your staking pool. Make sure you have this ID handy.

Example

Wallet> createstakepool 40000 5 0.01
The transaction was submitted successfully
Wallet> listpoolids
[Pool Id: tpool12udk7skuzl3u5msdq4zx3n0wyc3ahp5ejnzh7a59ylvzl39elqcs5zpc5e, Balance: 40000, Creation Block heigh: 16170, timestamp: 1692347114]
Wallet> stakepoolbalance tpool12udk7skuzl3u5msdq4zx3n0wyc3ahp5ejnzh7a59ylvzl39elqcs5zpc5e
40000
Wallet> startstaking
[2023-08-18T08:24:04Z INFO  wallet_controller] Start staking, account_index: 0
Success

Delegating TML Tokens to a Staking Pool

If you're not up for running your own staking pool but still want to earn rewards from staking, delegating your tokens is an excellent choice. The process is trustless, giving you peace of mind knowing you can always retrieve your tokens without the pool manager's consent.

Steps to Delegate Your Tokens:

  1. Discover Available Delegations: Before you start, get a grasp of the available delegations and their balances. Use the listdelegationids command:

    listdelegationids

    This command displays available delegation IDs alongside their respective balances.

  2. Create a New Delegation: Before you can delegate for staking, you need to have a delegation. This step helps in that:

    createdelegation

    Following this command, Mintlayer Wallet will provide you with a unique delegation ID. Keep this ID safe; you'll need it in subsequent steps.

  3. Delegate for Staking: With your delegation created, you can now delegate your tokens for staking:

    delegatestaking

    Remember, while your tokens are safe and under your control, the staking reward is contingent on the pool's proper operation.

  4. Retrieve Tokens from Delegation: If you ever need to pull your tokens from a delegation and send them to a specific address, use the following command:

    sendfromdelegationtoaddress

    Make sure to provide the necessary parameters, like the destination address.

Wrapping Up

Whether you're starting a staking pool or riding the wave by delegating, Mintlayer offers a seamless staking experience. As with all investments and blockchain operations, always stay informed and updated. Happy staking!


Note: Parameters and staking details might evolve over time. Stay connected with Mintlayer's official channels and community to get the latest scoop.

Clone this wiki locally