Staking L1 Tokens
Staking is one of the easiest ways to support the LAMINA1 platform while earning extra L1 tokens. If you’re unfamiliar with the term, staking refers to the act of locking L1 tokens up for a period of time in return for voting power in consensus. When staking L1 tokens you can decide to stake them on your own node, a process known as validating, or you can decide to stake them on a public node, a process known as delegating.
In return for supporting the platform in this way, stakers may receive extra L1 tokens proportional to their stake in the form at the end of their lockup. When you stake your L1 tokens you decide how long you want them locked up, with longer lock ups earning a higher interest rate.
The actual amount of interest you can earn for your staked coins is based on a number of parameters including:
- Length of lockup
- Performance or “uptime” of the node they’re staked on
- Delegation fee of the node they’re staked on
- Proportion of your L1 tokens in the total pool of tokens staked on the node
It is outside the scope of this document to provide a detailed breakdown of how staking rewards are calculated. Stay tuned for a dedicated whitepaper explaining this concept in more detail.
Note to reader: Much of the documentation below has been pulled and modified from the Avalanche documentation, which can be found here. L1 documentation is still a work in progress. To build upon it or provide feedback, please join us on Discord and share in the designated #testnet-feedback channel.
Staking Parameters
- The minimum amount that a validator must stake is 2,000 L1
- The minimum amount that a delegator must delegate is 1 L1
- The minimum amount of time one can stake funds for validation is 1 day
- The maximum amount of time one can stake funds for validation is 2 weeks
- The minimum amount of time one can stake funds for delegation is 1 day
- The maximum amount of time one can stake funds for delegation is 2 weeks
- The minimum delegation fee rate is 2%
- The maximum weight of a validator (their own stake + stake delegated to them) is the minimum of 3 million L1 and 5 times the amount the validator staked. For example, if you staked 2,000 L1 to become a validator, only 8000 L1 can be delegated to your node total (not per delegator)
Delegators
If you’re not interested in operating a node but still want to participate in staking, you can delegate other peoples’ validating nodes.
When you delegate stake to a validator, you specify:
- The ID of the node you’re delegating to
- When you want to start/stop delegating stake (must be while the validator is validating)
- How many L1 tokens you are staking
- The address to send any rewards to
While the actual process of delegating a node is very simple, there are a number of factors you’ll want to consider when determining which nodes you want to delegate and for how long.
The minimum amount that a delegator must delegate is 1 L1.
Note that once you issue the transaction to add your stake to a delegator, there is no way to change the parameters. You can’t remove your stake early or change the stake amount, node ID, or reward address. If you’re not sure, ask for help on Discord.
Delegator Rewards
If the validator that you delegate tokens to is sufficiently correct and responsive, you will receive a reward when you are done delegating. Delegators are rewarded according to the same function as validators. However, the validator that you delegate keeps a portion of your reward specified by the validator’s delegation fee rate.
When you issue the transaction to delegate tokens, the staked tokens and transaction fees are deducted from the addresses you control. When you are done delegating, the staked tokens are returned to your address. If you earned a reward, it is sent to the address you specified when you delegated tokens.
Become a Validator on the Platform Chain
In this tutorial, we’ll add a node to the Primary Network on LAMINA1.
The Primary Network is inherent to the LAMINA1 platform and validates LAMINA1’s built-in blockchains. Running a validating node on the P-Chain is one of the most important ways you can contribute to LAMINA1. While we do our best to walk you through each step, we recommend this role to those who are fairly technical and are comfortable using the command line and managing network settings.
The P-Chain manages metadata on LAMINA1. This includes tracking which nodes are in which Subnets, which blockchains exist, and which Subnets are validating which blockchains. To add a validator, we’ll issue transactions to the P-Chain.
Important Background Information
Please take time to understand all of these concepts before you decide to run a validator on the LAMINA1 Platform.
Uptime
If you’re running a validator, it’s important that your node is well connected to ensure that you receive a reward. A validator will receive a staking reward if they are online and responsive for more than 80% of their validation period, as measured by a majority of validators, weighted by stake. You should aim for your validator to be online and responsive 100% of the time.
You can call API method info.uptime on your node to learn its weighted uptime and what percentage of the network currently thinks your node has an uptime high enough to receive a staking reward. See here. You can get another opinion on your node's uptime from Avalanche's Validator Health dashboard. If your reported uptime is not close to 100%, there may be something wrong with your node setup, which may jeopardize your staking reward. If this is the case, please see here or contact us on Discord, so we can help you find the issue. Note that only checking the uptime of your validator as measured by non-staking nodes, validators with small stake, or validators that have not been online for the full duration of your validation period can provide an inaccurate view of your node's true uptime.
Why Is My Uptime Low?
Every validator on Avalanche keeps track of the uptime of other validators. Every validator has a weight (that is the amount staked on it.) The more weight a validator has, the more influence they have when validators vote on whether your node should receive a staking reward. You can call API method info.uptime on your node to learn its weighted uptime and what percentage of the network stake currently thinks your node has an uptime high enough to receive a staking reward.
You can also see the connections a node has by calling info.peers, as well as the uptime of each connection. This is only one node’s point of view. Other nodes may perceive the uptime of your node differently. Just because one node perceives your uptime as being low does not mean that you will not receive staking rewards.
If your node's uptime is low, make sure you're setting config option --public-ip=[NODE'S PUBLIC IP]
and that your node can receive incoming TCP traffic on port 9671.
Staking
When you issue the transaction to add a validator, the staked tokens and transaction fee (which is 0) are deducted from the addresses you control. When you are done validating, the staked funds are returned to the addresses they came from. If you earned a reward, it is sent to the address you specified when you added yourself as a validator.
Note that once you issue the transaction to add a node as a validator, there is no way to change the parameters. You can’t remove your stake early or change the stake amount, node ID, or reward address. Please make sure you’re using the correct values in the API calls below. If you’re not sure, ask for help on Discord. If you want to add more tokens to your own validator, you can delegate the tokens to this node - but you cannot increase the base validation amount (so delegating to yourself goes against your delegation cap).
Allow API Calls
When setting up RPC access to a node, make sure you don't leave the http-port accessible to everyone! There are malicious actors that scan for nodes that have unrestricted access to their RPC port and then use those nodes for spamming them with resource-intensive queries which can knock the node offline. Only allow access to your node's RPC port from known IP addresses!
Also, you should disable all APIs you will not use via command-line arguments. Again, you should configure your network to only allow access to the API port from trusted machines (for example, your personal computer.)
To make API calls to your node from remote machines, allow traffic on the API port (9650 by default), and run your node with argument --http-host=
Secret Management
The only secret that you need on your validating node is its Staking Key, the TLS key that determines your node’s ID. The first time you start a node, the Staking Key is created and put in $HOME/.lamina1/staking/staker.key.
You should back up this file (and staker.crt) somewhere secure. Losing your Staking Key could jeopardize your validation reward, as your node will have a new ID.
You do not need to have L1 funds on your validating node. In fact, it's best practice to not have a lot of funds on your node. Almost all of your funds should be in "cold" addresses whose private key is not on any computer.
Requirements
You've read the Important background information, completed Running a LAMINA1 Node, and are familiar with LAMINA1’s Avalanche-based architecture.
In order to ensure your node is well-connected, make sure that your node can receive and send TCP traffic on the staking port (9671 by default). Failing to do either of these may jeopardize your staking reward.
Add a Validator with Avalanche Wallet
First, we show you how to add your node as a validator by using the LAMINA1 Web Wallet.
Retrieve the Node ID
Get your node’s ID by calling info.getNodeID:
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"info.getNodeID"
}' -H 'content-type:application/json' 127.0.0.1:9650/ext/info
The response has your node’s ID:
{
"jsonrpc": "2.0",
"result": {
"nodeID": "NodeID-5mb46qkSBj81k9g9e4VFjGGSbaaSLFRzD"
},
"id": 1
}
You can also run lamina1.get_my_nodeid.sh
at the command line to get your node's ID.
Add as a Validator
Open the wallet, and go to the Earn tab. Choose Add Validator under the Validate section.
Fill out the staking parameters. They are explained in more detail in this doc. When you’ve filled in all the staking parameters and double-checked them, click Confirm. Make sure the staking period is at least 1 day, the delegation fee rate is at least 2%, and you’re staking at least 2,000 L1 on Testnet.
You should see a success message, and your balance should be updated.
Calling platform.getPendingValidators verifies that your transaction was accepted. Note that this API call should be made before your node's validation start time, otherwise, the return will not include your node's id as it is no longer pending.
Go back to the Earn tab, and click Estimated Rewards.
Once your validator’s start time has passed, you will see the rewards it may earn, as well as its start time, end time, and the percentage of its validation period that has passed.
You can also call platform.getCurrentValidators to check that your node's id is included in the response.
That’s it!