Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task(devx): edit IOTA Architecture > staking and rewards #4007

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ epoch. Similarly, when a user withdraws their stake, it stops counting from the

## Rewards Distribution

At the end of each [epoch](epochs.mdx), gas fees and stake subsidies are distributed among validators and stakers as
rewards. The amount of rewards a validator gets depends on:
At the end of each [epoch](epochs.mdx), newly minted IOTA tokens are distributed as rewards among validators and stakers. Within each validator staking pool, stakers receive rewards proportionally through the appreciation of the pool's exchange rate. Validators also earn additional rewards, represented as StakedIOTA objects, which they receive at the end of each epoch in proportion to the commissions generated by their staking pool.

Each epoch's rewards are funded by newly minted IOTA tokens, totaling 767k IOTA per epoch. This amount is distributed across staking pools based on their voting power and the specified tallying rule. The amount of rewards a validator gets depends on:

### Performance

Expand Down
2 changes: 1 addition & 1 deletion docs/content/developer/advanced/asset-tokenization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ Afterward, it's necessary to modify the `Move.toml` file. Under the `[addresses]

##### Automatically

The fields that are automatically filled are: `SUI_NETWORK`, `ASSET_TOKENIZATION_PACKAGE_ID` and `REGISTRY`.
The fields that are automatically filled are: `IOTA_NETWORK`, `ASSET_TOKENIZATION_PACKAGE_ID` and `REGISTRY`.

To publish with the bash script run:

Expand Down
17 changes: 13 additions & 4 deletions docs/content/operator/validator-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Validators on the IOTA network run special nodes and have additional tasks and r

To run an IOTA validator, you must set up and configure an IOTA Validator node. After you have a running node, you must have a minimum of 2 million IOTA in your staking pool to join the validator set on the IOTA network.

To learn how to set up and configure an IOTA Validator node, see [IOTA for Node Operators](https://github.com/iotaledger/iota/blob/main/nre/iota_for_node_operators.md) on GitHub. The guide includes all of the information you need to configure your Validator node. It also provides guidance on the tasks you must perform after you join the validator set.
To learn how to set up and configure an IOTA Validator node, see [IOTA for Node Operators](../operator/validator-operation/validator-tasks.mdx) on GitHub. The guide includes all of the information you need to configure your Validator node. It also provides guidance on the tasks you must perform after you join the validator set.

Specific steps you must take include:

Expand All @@ -28,16 +28,25 @@ Specific steps you must take include:

<StakingPoolReqs />

## Hardware requirements to run a Validator node
## Hardware requirements to run a Validator node on Mainnet

Suggested minimum hardware specifications to run an IOTA Validator node:
Suggested minimum hardware specifications to run an IOTA Validator node on Mainnet:

- CPU: 24 physical cores (or 48 virtual cores)
- Memory: 128 GB
- Storage: 4 TB NVME
- Network: 1 Gbps

## Validator consensus and voting power
## Hardware requirements to run a Validator node on Testnet

Suggested minimum hardware specifications to run an IOTA Validator node on Testnet:

- CPU: 8 cores
- Memory: 64 GB
- Storage: 2 TB NVME
- Network: 1 Gbps

## Validator consensus and voting power

The total voting power on IOTA is always 10,000, regardless of the amount staked. Therefore, the quorum threshold is 6,667. There is no limit to the amount of IOTA users can stake with a validator. Each validator has consensus voting power proportional to IOTA in its staking pool, with one exception: the voting power of an individual validator is capped at 1,000 (10% of the total). If a validator accumulates more than 10% of total stake, the validator's voting power remains fixed at 10%, and the remaining voting power is spread across the rest of the validator set.

Expand Down
106 changes: 106 additions & 0 deletions docs/content/references/iota-evm/iscutils/prng.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
title: prng
description: 'Not recommended for generating cryptographic secure randomness'
---

## PRNG

This library is used to generate pseudorandom numbers

_Not recommended for generating cryptographic secure randomness_

### PRNGState

_Represents the state of the PRNG_

```solidity
struct PRNGState {
bytes32 state;
}
```

### generateRandomHash

```solidity
function generateRandomHash(struct PRNG.PRNGState self) internal returns (bytes32)
```

Generate a new pseudorandom hash

_Takes the current state, hashes it and returns the new state._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| self | struct PRNG.PRNGState | The PRNGState struct to use and alter the state |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bytes32 | The generated pseudorandom hash |

### generateRandomNumber

```solidity
function generateRandomNumber(struct PRNG.PRNGState self) internal returns (uint256)
```

Generate a new pseudorandom number

_Takes the current state, hashes it and returns the new state._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| self | struct PRNG.PRNGState | The PRNGState struct to use and alter the state |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | uint256 | The generated pseudorandom number |

### generateRandomNumberInRange

```solidity
function generateRandomNumberInRange(struct PRNG.PRNGState self, uint256 min, uint256 max) internal returns (uint256)
```

Generate a new pseudorandom number in a given range [min, max)

_Takes the current state, hashes it and returns the new state. It constrains the returned number to the bounds of min (inclusive) and max (exclusive)._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| self | struct PRNG.PRNGState | The PRNGState struct to use and alter the state |
| min | uint256 | |
| max | uint256 | |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | uint256 | The generated pseudorandom number constrained to the bounds of [min, max) |

### seed

```solidity
function seed(struct PRNG.PRNGState self, bytes32 entropy) internal
```

Seed the PRNG

_The seed should not be zero_

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| self | struct PRNG.PRNGState | The PRNGState struct to update the state |
| entropy | bytes32 | The seed value (entropy) |

212 changes: 212 additions & 0 deletions docs/content/references/iota-evm/magic-contract/ERC20BaseTokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
---
title: ERC20BaseTokens
description: 'The ERC20 contract directly mapped to the L1 base token.'
---

## ERC20BaseTokens

_The ERC20 contract directly mapped to the L1 base token._

### Approval

```solidity
event Approval(address tokenOwner, address spender, uint256 tokens)
```

_Emitted when the approval of tokens is granted by a token owner to a spender.

This event indicates that the token owner has approved the spender to transfer a certain amount of tokens on their behalf._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| tokenOwner | address | The address of the token owner who granted the approval. |
| spender | address | The address of the spender who is granted the approval. |
| tokens | uint256 | The amount of tokens approved for transfer. |

### Transfer

```solidity
event Transfer(address from, address to, uint256 tokens)
```

_Emitted when tokens are transferred from one address to another.

This event indicates that a certain amount of tokens has been transferred from one address to another._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| from | address | The address from which the tokens are transferred. |
| to | address | The address to which the tokens are transferred. |
| tokens | uint256 | The amount of tokens transferred. |

### name

```solidity
function name() public view returns (string)
```

_Returns the name of the base token._

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | string | The name of the base token. |

### symbol

```solidity
function symbol() public view returns (string)
```

_Returns the symbol of the base token._

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | string | The symbol of the base token. |

### decimals

```solidity
function decimals() public view returns (uint8)
```

_Returns the number of decimals used by the base token._

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | uint8 | The number of decimals used by the base token. |

### totalSupply

```solidity
function totalSupply() public view returns (uint256)
```

_Returns the total supply of the base token._

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | uint256 | The total supply of the base token. |

### balanceOf

```solidity
function balanceOf(address tokenOwner) public view returns (uint256)
```

_Returns the balance of the specified token owner._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| tokenOwner | address | The address of the token owner. |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | uint256 | The balance of the token owner. |

### transfer

```solidity
function transfer(address receiver, uint256 numTokens) public returns (bool)
```

_Transfers tokens from the caller's account to the specified receiver._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| receiver | address | The address of the receiver. |
| numTokens | uint256 | The number of tokens to transfer. |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bool | true. |

### approve

```solidity
function approve(address delegate, uint256 numTokens) public returns (bool)
```

_Sets the allowance of `delegate` over the caller's tokens._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| delegate | address | The address of the delegate. |
| numTokens | uint256 | The number of tokens to allow. |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bool | true. |

### allowance

```solidity
function allowance(address owner, address delegate) public view returns (uint256)
```

_Returns the allowance of the specified owner for the specified delegate._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| owner | address | The address of the owner. |
| delegate | address | The address of the delegate. |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | uint256 | The allowance of the owner for the delegate. |

### transferFrom

```solidity
function transferFrom(address owner, address buyer, uint256 numTokens) public returns (bool)
```

_Transfers tokens from the specified owner's account to the specified buyer._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| owner | address | The address of the owner. |
| buyer | address | The address of the buyer. |
| numTokens | uint256 | The number of tokens to transfer. |

#### Return Values

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | bool | true. |

## __erc20BaseTokens

```solidity
contract ERC20BaseTokens __erc20BaseTokens
```

Loading
Loading