Skip to content

Commit

Permalink
Polish FlareStake user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
segfaultxavi committed Oct 26, 2023
1 parent 40b0405 commit 33a4f73
Show file tree
Hide file tree
Showing 13 changed files with 222 additions and 128 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,10 @@ figure img.side-by-side {
.highlight a .c1:hover {
color: var(--md-accent-fg-color);
}

/* Inline images */
img.inline-image {
height: 1em;
background: white;
padding: 2px;
}
1 change: 1 addition & 0 deletions docs/user/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ Select one of the topics below:
* [FTSO Delegation](./delegation/index.md)
* [Governance](./governance/index.md)
* [Personal Delegation Accounts](./personal-delegation-account.md)
* [Staking on Validators](./staking/index.md)
* [Wallets](./wallets/index.md)
* [Wrapping Tokens](./wrapping-tokens.md)
107 changes: 0 additions & 107 deletions docs/user/staking/flarestake/staking-assets.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/user/staking/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Staking
# Staking on Validators

This section contains information about staking Flare assets on validators and receiving rewards earned from your stake.
This section contains information about staking Flare assets on [validators](../../tech/validators.md) and receiving rewards earned from your stake.

* [Using FlareStake](flarestake/staking-assets.md)
* [Using the CLI](cli/staking-cli.md)
* [Using FlareStake to Stake](./staking-flarestake.md)
* [Using the Command Line to Stake](./staking-cli.md)
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Using the CLI to Stake
---
title: Using the Command Line
---

# Using the Command Line to Stake

Flare has a command-line interface (CLI) tool called FlareStake CLI, which allows performing stake operations on validator nodes from a terminal.

A staking app with a graphical user interface (GUI) is also being developed to simplify the staking process.
A staking app with a graphical user interface (GUI) is also available to simplify the staking process.
See the [Using FlareStake to Stake](./staking-flarestake.md) guide to learn about it.
Still, a CLI tool has other advantages, like allowing it to be part of automated processes.

!!! help "Table of Contents"
Expand All @@ -19,10 +24,10 @@ If you already know how staking on validators works on the Flare network, skip t

!!! note

Proof of stake is being implemented in phases.
Ensure that you have read the [Validators page](../../../tech/validators.md#deployment-phases) to learn about them.
Proof of stake is being implemented on Flare in phases.
Ensure that you have read the [Validators page](../../tech/validators.md#deployment-phases) to learn about them.

Staking works by locking funds for a period of time to support a specific [network validator](../../../tech/validators.md).
Staking works by locking funds for a period of time to support a specific [network validator](../../tech/validators.md).
When validator owners stake to their own nodes they _self-bond_, whereas all other participants are said to _delegate_ their stake to that validator.

Participants choose how much to stake and for how long their stake will be locked.
Expand All @@ -34,10 +39,10 @@ The minimum values are:
| Minimum amount | 1M `$FLR` | 50K `$FLR` |
| Minimum duration | 60 days | 14 days |

At the end of every [reward epoch](../../../tech/ftso.md#reward-epoch), participants are rewarded according to how well their chosen validator performed in that period.
The [deployment phases summary](../../../tech/validators.md#summary) shows other rewards that staked funds can still earn while they are locked.
At the end of every [reward epoch](../../tech/ftso.md#reward-epoch), participants are rewarded according to how well their chosen validator performed in that period.
The [deployment phases summary](../../tech/validators.md#summary) shows other rewards that staked funds can still earn while they are locked.

Given that the Flare network uses two [independent underlying chains](../../../tech/flare.md#flare-chains), there is one extra step that must be considered.
Given that the Flare network uses two [independent underlying chains](../../tech/flare.md#flare-chains), there is one extra step that must be considered.
Funds must be transferred from the C-chain, where smart contracts run, to the P-chain, where staking happens.
After the staking period expires and funds are unlocked, they can be transferred back to the C-chain.

Expand Down Expand Up @@ -275,7 +280,7 @@ To stake on a validator node, you need to:

* The **node ID** of the validator you want to stake to.

If you created the validator, its `nodeID` was shown to you during the [deployment process](../../../infra/observation/deploying.md).
If you created the validator, its `nodeID` was shown to you during the [deployment process](../../infra/observation/deploying.md).

If you want to stake to somebody else's validator, you can:

Expand Down Expand Up @@ -365,6 +370,7 @@ After you have funds on the P-chain, execute `flare-stake-tool interactive` agai
If you are going to delegate to your own node (self-bonding), select **Add a validator node**.
Otherwise, if you are going to stake to another node (delegation), select **Delegate to a validator node**.
Press the down key a few times for this last option to show.
{ #address-binding }

!!! important "First-time Address Registration"

Expand Down Expand Up @@ -406,8 +412,8 @@ Press the down key a few times for this last option to show.
secp256k1 public key: 0x●●●●●●●●●●●●●●●●
```

2. You need to interact with the `AddressBinder` smart contract, so you must retrieve its address from the `FlareContractRegistry` as explained in the [retrieving Contract Addresses page](../../../dev/getting-started/contract-addresses.md).
3. Enter the address of the `AddressBinder` contract in the [Block Explorer](../../block-explorers/index.md), and go to the **Write Contract** tab.
2. You need to interact with the `AddressBinder` smart contract, so you must retrieve its address from the `FlareContractRegistry` as explained in the [retrieving Contract Addresses page](../../dev/getting-started/contract-addresses.md).
3. Enter the address of the `AddressBinder` contract in the [Block Explorer](../block-explorers/index.md), and go to the **Write Contract** tab.
4. Click on **Connect Wallet**.
You do not need to use the same account as the one you are binding.
5. Locate the `registerPublicKey` method and paste the public key from step 1 into the `_publicKey` field.
Expand Down Expand Up @@ -535,9 +541,9 @@ You can [check your balances](#1-check-your-balances) again to verify that the t

If you encounter any problem, see the [Troubleshooting](#troubleshooting) section.

## Claiming Guide
## Reward Claiming Guide

At the end of every [reward epoch](../../../tech/ftso.md#reward-epoch), participants are rewarded according to how well their chosen validator performed in that period.
At the end of every [reward epoch](../../tech/ftso.md#reward-epoch), participants are rewarded according to how well their chosen validator performed in that period.

Rewards are accumulated in a dedicated smart contract and can be claimed from the Flare Stake CLI tool:

Expand Down Expand Up @@ -574,8 +580,8 @@ Finished execution

Rewards can also be claimed directly from the `ValidatorRewardManager` contract that accumulates them:

1. You need to interact with the `ValidatorRewardManager` smart contract, so you must retrieve its address from the `FlareContractRegistry` as explained in the [retrieving Contract Addresses page](../../../dev/getting-started/contract-addresses.md).
2. Enter the address of the `ValidatorRewardManager` contract in the [Block Explorer](../../block-explorers/index.md), and go to the **Write Contract** tab.
1. You need to interact with the `ValidatorRewardManager` smart contract, so you must retrieve its address from the `FlareContractRegistry` as explained in the [retrieving Contract Addresses page](../../dev/getting-started/contract-addresses.md).
2. Enter the address of the `ValidatorRewardManager` contract in the [Block Explorer](../block-explorers/index.md), and go to the **Write Contract** tab.
3. Click on **Connect Wallet**.
You need to connect the account for which you are claiming.
4. Locate the `claim` method and enter the following information:
Expand Down
Loading

0 comments on commit 33a4f73

Please sign in to comment.