import StakingTarget from 'components/outputs/api-scraping-outputs/nyx-outputs/staking-target.md';
import StakingScaleFactor from 'components/outputs/api-scraping-outputs/nyx-outputs/staking-scale-factor.md';
import StakeSaturation from 'components/outputs/api-scraping-outputs/nyx-outputs/stake-saturation.md';
import CirculatingSupply from 'components/outputs/api-scraping-outputs/nyx-outputs/circulating-supply.md';
import { Callout } from 'nextra/components';
import StakingSupply from 'components/outputs/api-scraping-outputs/nyx-outputs/staking_supply.md';

Stake saturation is a node reputation done in a form of self bond or stakers delegation. Optimal stake saturation level is calculated as:

<Callout type="info" borderColor="#008080" backgroundColor="#20b2aa" emoji="📌">
> **stake_saturation_level = staking_target / rewarded_set_size**
>
> **rewarded_set_size = active_set_size + standby_set_size**
</Callout>

With current circulating supply of <span style={{display: 'inline-block'}}><CirculatingSupply /></span> NYM, staking target of <span style={{display: 'inline-block'}}><StakingSupply /></span> NYM, divided by the sum of nodes in the [rewarded set](https://validator.nymtech.net/api/v1/epoch/reward_params), <b>the stake saturation level is <span style={{display: 'inline-block'}}><StakeSaturation /></span> NYM per node.</b>

Node stake saturation is a value between `0` and `1` following this logic.

**Node stake saturation formula:**

<Callout type="info" borderColor="#008080" backgroundColor="#20b2aa" emoji="📌">
> **node_stake_saturation = node_total_stake / stake_saturation_level**
</Callout>

There is a caveat that the maximum value can be `1`. In practice it means that:

1. If `node_total_stake < stake_saturation_level` then `node_stake_saturation` will be a float between `0` and `1`

2. If `node_total_stake = stake_saturation_level` then `node_stake_saturation` will be `1`

3. If `node_total_stake > stake_saturation_level` then `node_stake_saturation` will be `1` due the capping function working as anti-whale prevention.
- This results in a smaller <abbr title="Return on Investment (ROI) is a financial metric used to evaluate the profitability of an investment by comparing the net income with the cost of the investment.">ROI</abbr> per every staked (self bond or delegation) NYM token on that node, as the maximum rewards is capped and in this case distributed in between more staked tokens.
- For example if `node_total_stake = 2 * stake_saturation_level` then the reward per staked token will be 50% in comparison to a case where `node_total_stake = stake_saturation_level`, in other words with 100% *over-saturation*, <abbr title="Return on Investment (ROI) is a financial metric used to evaluate the profitability of an investment by comparing the net income with the cost of the investment.">ROI</abbr> is half the maximum.
