Skip to content

Commit

Permalink
Merge pull request #500 from ethersphere/reward-maximization
Browse files Browse the repository at this point in the history
added info on maximizing reward chances
  • Loading branch information
NoahMaizels authored Oct 12, 2023
2 parents c72848d + bb971e3 commit 5e41ac4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
10 changes: 7 additions & 3 deletions docs/bee/installation/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,18 @@ If you do not wish to run your own Ethereum node you may use a blockchain API se
resolver-options: ["https://mainnet.infura.io/v3/<<your-api-key>>"]
```
### Set Target Neighborhood (Optional)
When setting up a new Bee node, a randomly generated overlay address will determine the node's [neighborhood](/docs/learn/technology/disc#neighborhoods). By using the `target-neighborhood` config option, however, an overlay address will be generated which falls within a specific neighborhood. There are two good reasons for doing this. First, by choosing a lesser populated neighborhood, a node's chances of winning rewards can be increased. Second, choosing to set up a node in a less populated neighborhood will strengthen the resiliency of the Swarm network. Therefore it is recommended to use the `target-neighborhood` option.
To use this option, it's first necessary to identify potential target neighborhoods. A convenient tool for finding underpopulated neighborhoods is available at the [Swarmscan website](https://swarmscan.io/neighborhoods). This tool returns the leading bits of target neighborhoods in order of least populated to most. Simply copy the leading bits from one of the least populated neighborhoods and use it to set `target-neighborhood`. After doing so, an overlay address within that neighborhood will be generated when starting Bee for the first time.
To use this option, it's first necessary to identify potential target neighborhoods. A convenient tool for finding underpopulated neighborhoods is available at the [Swarmscan website](https://swarmscan.io/neighborhoods). This tool returns the leading binary bits of target neighborhoods in order of least populated to most. Simply copy the leading bits from one of the least populated neighborhoods (for example, `0010100001`) and use it to set `target-neighborhood`. After doing so, an overlay address within that neighborhood will be generated when starting Bee for the first time.
```yaml
## bee.yaml
target-neighborhood: 0010100001
```
See the [staking page](/docs/bee/working-with-bee/staking) for more information.
See the [staking section](/docs/bee/working-with-bee/staking) for more information.
## 3. Find Bee address
Expand Down
34 changes: 33 additions & 1 deletion docs/bee/working-with-bee/staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,36 @@ error: "level"="error" "logger"="node/storageincentives" "msg"="make sample" "er

While evictions are a normal part of Bee's standard operation, the event of an eviction will interrupt the sampler process.

If you are still experiencing problems, you can find more help in the [node-operators](https://discord.gg/kHRyMNpw7t) Discord channel (for your safety, do not accept advice from anyone sending a private message on Discord).
If you are still experiencing problems, you can find more help in the [node-operators](https://discord.gg/kHRyMNpw7t) Discord channel (for your safety, do not accept advice from anyone sending a private message on Discord).


## Maximizing Staking Rewards

There are two main factors which determine the chances for a staking node to win a reward — neighborhood selection and stake density. Both of these should be considered together before starting up a Bee node for the first time. See the [incentives page](/docs/learn/technology/incentives/) for more context.

### Neighborhood Selection

By default when running a Bee node for the first time an overlay address will be generated and used to assign the node to a random [neighborhood](/docs/learn/technology/disc#neighborhoods). However, by using the `target-neighborhood` config option, a specific neighborhood can be selected in which to generate the node's overlay address. This is an excellent tool for maximizing reward chances as generally speaking running in a less populated neighborhood will increase the chances of winning a reward. See the [config section](/docs/bee/installation/install#set-target-neighborhood-optional) on the installation page for more information on how to set a target neighborhood.


### Stake Density

Stake density is defined as:

$$
\text{stake density} = \text{staked xBZZ} \times {2}^\text{storageDepth}
$$

*To learn more about stake density and the mechanics of the incentives system, see the [incentives page](/docs/learn/technology/incentives/).*

Stake density determines the weighted chances of nodes within a neighborhood of winning rewards. The chance of winning within a neighborhood corresponds to stake density. Stake density can be increased by depositing more xBZZ as stake (note that stake withdrawals are not currently possible, so any staked xBZZ is not currently recoverable).

Generally speaking, the minimum required stake of 10 xBZZ is sufficient, and rewards can be better maximized by operating more nodes over a greater range of neighborhoods rather than increasing stake. However this may not be true for all node operators depending on how many different neighborhoods they operate nodes in, and it also may change as network dynamics continue to evolve (join the `#node-operators` [Discord channel](https://discord.com/channels/799027393297514537/811553590170353685) to stay up to date with the latest discussions about staking and network dynamics).








0 comments on commit 5e41ac4

Please sign in to comment.