Skip to content

Commit

Permalink
Merge pull request #728 from ethersphere/staking-page-improvement
Browse files Browse the repository at this point in the history
Staking page improvement
  • Loading branch information
NoahMaizels authored Mar 6, 2025
2 parents e9ba294 + 1318237 commit 5bc554e
Showing 1 changed file with 49 additions and 50 deletions.
99 changes: 49 additions & 50 deletions docs/bee/working-with-bee/staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ id: staking

## Quickstart Guide

This guide will walk you through **staking xBZZ** and participating in the **redistribution game** to earn storage incentives.
This guide will walk you through **staking xBZZ** and participating in the **redistribution game** to earn storage incentives.

:::warning
Staking requires a fully synced full node and a minimum of 10 xBZZ. See detailed [staking requirements](/docs/bee/working-with-bee/staking#requirements) below.
:::

### Step 1: Fund Your Node with xDAI

Expand All @@ -16,7 +20,7 @@ Run this command to check how much is required:
```bash
curl localhost:1633/redistributionstate | jq
```
Look at the `"minimumGasFunds"` field in the response.
Check the `"minimumGasFunds"` field in the response.

:::tip
**Recommended:** Deposit at least **0.5 xDAI** to cover fees for the next few weeks/months of active staking.
Expand All @@ -43,42 +47,9 @@ curl localhost:1633/stake
**Optional:** Stake **20 xBZZ** if using the [reserve doubling](#reserve-doubling) feature.
:::

### Step 3: Sync Your Node & Check Status

In addition to meeting the 10 xBZZ minimum stake requirements, your node must be ***fully synced*** and ***funded with xDAI*** to participate in staking. Check your node's status with `GET /redistributionstate`:

```bash
curl -X GET http://localhost:1633/redistributionstate | jq
```

Example output:

```bash
{
"minimumGasFunds": "11080889201250000",
"hasSufficientFunds": true,
"isFrozen": false,
"isFullySynced": true,
"phase": "claim",
"round": 212859,
"lastWonRound": 207391,
"lastPlayedRound": 210941,
"lastFrozenRound": 210942,
"lastSelectedRound": 212553,
"lastSampleDuration": 491687776653,
"block": 32354719,
"reward": "1804537795127017472",
"fees": "592679945236926714",
"isHealthy": true
}
```

**Expected values for a healthy staking node:**

- `"isFullySynced": true`
- `"hasSufficientFunds": true`
- `"isFrozen": false`
### Step 3: Check Status

After staking you should [check your node's status](/docs/bee/working-with-bee/staking#check-status) to make sure it is fully synced, fully funded, and operating properly.

### Step 4: Monitor & Maximize Rewards

Expand All @@ -104,14 +75,13 @@ To earn storage incentives by participating in the [redistribution game](/docs/c
Only stake your xBZZ if you intend to participate as a full node, as withdrawals are not possible.
:::

In order to participate in the redistribution game for a chance to earn xBZZ, full nodes need to do the following:
### Requirements

- Fully sync all chunks they are responsible for and maintain a healthy connection with their peers in order to get all the newest uploaded chunks
- Maintain a [high-performance RPC endpoint](/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint) connection to Gnosis Chain to sync blockchain data and issue all redistribution game-related transactions on-chain.
- Deposit stake with the staking contract. The current minimum staking requirement is 10 xBZZ (the requirement is increased if [reserve doubling](/docs/bee/working-with-bee/staking#reserve-doubling) is used).
- Have the disk space to store all the chunks they are responsible for storing and sufficient CPU / RAM (you can benchmark your node with the [`/rchash` endpoint](/docs/bee/working-with-bee/bee-api#rchash)) to generate a hash of a sampling of those chunks fast enough to participate in the redistribution game.
- A [full node](/docs/bee/working-with-bee/node-types) - see full node [recommend specs](/docs/bee/working-with-bee/node-types#recommended-specifications).
- A [high-performance RPC endpoint](/docs/bee/working-with-bee/configuration#setting-blockchain-rpc-endpoint) connection to Gnosis Chain.
- A minimum of 10 xBZZ to be used as ***non-refundable*** stake (the requirement is increased if [reserve doubling](/docs/bee/working-with-bee/staking#reserve-doubling) is used).

## Add xDAI
### Add xDAI

Before staking, a node must first be funded with a small amount of xDAI to pay for Gnosis Chain transaction fees.

Expand Down Expand Up @@ -144,11 +114,13 @@ root@user-bee:~# curl localhost:1633/redistributionstate | jq
}
```

The `"3750000030000000"` value listed for `"minimumGasFunds"` is the minimum required amount of xDAI denominated in Wei ($1 \text{xDAI} = 10^{18} \text{ Wei}$) required for staking. That is equivalent to 0.00375000003 xDAI. However, it's recommended to add more than just the minimum amount, since it will quickly be used up by storage incentives related transaction fees. As little as 0.5 xDAI should last for weeks or even months, as the average incentive-related transaction fee can be as low as 0.001 xDAI or less.
The `"3750000030000000"` value listed for `"minimumGasFunds"` is the minimum required amount of xDAI denominated in Wei ($1 \text{xDAI} = 10^{18} \text{ Wei}$) required for staking. That is equivalent to 0.00375 xDAI. However, it's recommended to add more than just the minimum amount, since it will quickly be used up by storage incentives related transaction fees. As little as 0.5 xDAI should last for weeks or even months, as the average incentive-related transaction fee can be as low as 0.001 xDAI or less.

### Add xBZZ

Your node must be funded with a minimum of 10 xBZZ before performing the staking transaction. An additional 10 xBZZ is required if the [reserve doubling](/docs/bee/working-with-bee/staking#reserve-doubling) feature is used. If you don't already have xBZZ, you will need [get some](/docs/bee/installation/fund-your-node#how-to-get-xbzz) and transfer it to your [node's wallet](/docs/bee/installation/fund-your-node#funding-your-wallet).

## Add stake
### Deposit stake

Once your node has xDAI to pay for transaction fees, you can use the `POST /stake` endpoint to add the initial required minimum 10 xBZZ stake. The amount is denominated in [PLUR](/docs/references/glossary#plur), the smallest denomination of xBZZ:

Expand All @@ -170,7 +142,7 @@ curl localhost:1633/stake
{"stakedAmount":"100000000000000000"}
```

## Check redistribution status
### Check Status

Use the <a href="/api/#tag/RedistributionState" target="_blank" rel="noopener noreferrer">`/redistributionstate`</a> endpoint of the API to get more information about the redistribution status of the node.

Expand Down Expand Up @@ -212,6 +184,32 @@ curl -X GET http://localhost:1633/redistributionstate | jq
Do not shut down or update your node during an active redistribution round as it may cause them to lose out on winnings or become frozen. To see if your node is playing the current round, check if `lastPlayedRound` equals `round` in the output from the [`/redistributionstate` endpoint](/api/#tag/RedistributionState/paths/~1redistributionstate/get).
:::

You should also check the [`/status`](/api/#tag/Node-Status/paths/~1status/get) endpoint:

```bash
curl -s http://localhost:1633/status | jq
```

```bash
{
"peer": "da7e5cc3ed9a46b6e7491d3bf738535d98112641380cbed2e9ddfe4cf4fc01c4",
"proximity": 0,
"beeMode": "full",
"reserveSize": 3747532,
"pullsyncRate": 0,
"storageRadius": 10,
"connectedPeers": 183,
"neighborhoodSize": 12,
"batchCommitment": 133828050944,
"isReachable": true
}
```
**Expected values for a healthy staking node:**

* `"beeMode": full`
* `"pullsyncRate": 0`
* `"isReachable": true`

:::info
If your node is not operating properly such as getting frozen or not participating in any rounds, see the [troubleshooting section](#troubleshooting).
:::
Expand Down Expand Up @@ -252,7 +250,11 @@ Although reserve doubling demands twice the disk storage and increases bandwidth

In order to double a node's reserve which has previously been operating without doubling, the `reserve-capacity-doubling` option must be updated from the default of `0` to `1` and restarted. There is also an increase in the xBZZ stake requirement from the minimum of 10 xBZZ to 20 xBZZ.

#### **Step 1**: Stake at least 20 xBZZ
#### **Step 1**: Set `reserve-capacity-doubling` to `1`.

The reserve doubling feature can be enabled by setting the new `reserve-capacity-doubling` config option to `1` using the [configuration method](/docs/bee/working-with-bee/configuration#configuration-methods-and-priority) of your choice.

#### **Step 2**: Stake at least 20 xBZZ

For doubling the reserve of a node which was previously operating which already has 10 xBZZ staked, simply stake an additional 10 xBZZ for a total of 20 xBZZ stake:

Expand Down Expand Up @@ -281,9 +283,6 @@ curl -s http://localhost:1633/stake | jq
"stakedAmount": "200000000000000000"
}
```
#### **Step 2**: Set `reserve-capacity-doubling` to `1`.

The reserve doubling feature can be enabled by setting the new `reserve-capacity-doubling` config option to `1` using the [configuration method](/docs/bee/working-with-bee/configuration#configuration-methods-and-priority) of your choice.

#### **Step 3**: Restart node

Expand Down

0 comments on commit 5bc554e

Please sign in to comment.