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

docs: Tokenomics #1726

Merged
merged 21 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
Binary file modified docs/content/about-iota/images/iota-tokenomics-flow.png
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm somehow missing the notion of the rewards threshold from the new figure. Maybe we could have the computation fees arrow merge with the staking rewards arrow and visually represent somehow that what comes out of these two is always the constant reward which goes to delegators and validators.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we have an arrow from computation fees to the rewards it is actually misleading because it implies that the amount of computation fees has an effect on the staking rewards. The way it has been implemented, the staking rewards are independent of the computation rewards, so I think this is the clearest way to represent it. In reality, we don't burn the entire fees and mint the entire reward, we take the difference and mint/burn accordingly, but that is an implementation detail imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually thought we were going to do it differently tbh, but I changed the figure from what we had in the tokenomics report because the arrow from computation fees to the reward bucker was essentially removed in the implementation. I thought we were going to have a "tip" component of the fee which would go to the validators as a prioritisation mechanism, rather than being burned, so this would increase their overall reward, and be more like the diagram in the tokenomics report with an arrow from fees to rewards.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree with Andrew on his explanation. The implementation does not technically burn the fees, but in practice what we are doing is mimicking fee burning (which is what Andrew drew in the figure). I think merging those arrows will make it difficult for the reader to get what we do in practice, unless we make the figure super complete (which IMO is unnecessary, given that Andrew already drew something quite clean and clear)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/content/about-iota/tokenomics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ Three main types of participants characterize the IOTA economy:

## Core components

The IOTA economy is composed of four core components:
The IOTA economy is composed of five core components:

- **[IOTA](./tokenomics/iota-token.mdx):** The IOTA token is the IOTA platform native asset.
- **[Gas fees](./tokenomics/gas-in-iota.mdx):** Gas fees are charged on all network operations and used to reward participants of the proof-of-stake mechanism and prevent spam and denial-of-service attacks.
- **[Proof-of-stake](./tokenomics/proof-of-stake.mdx):** The delegated proof-of-stake mechanism is used to select, incentivize, and reward honest behavior by IOTA Validators and the IOTA owners that stake with them.
- **[Gas fees](./tokenomics/gas-in-iota.mdx):** Gas fees are charged on all network operations, consisting of a computation fee component and a fully rebated storage deposit component.
- **[Staking rewards](./tokenomics/proof-of-stake.mdx):** Staking rewards are provided to users participating in the delegated proof-of-stake mechanism, namely delegators and validators. This incentivizes honest behavior by IOTA Validators and the IOTA token holder that delegate to them.
- **Voting:** On-chain voting is used for governance and protocol upgrades.
cyberphysic4l marked this conversation as resolved.
Show resolved Hide resolved


Expand Down
16 changes: 9 additions & 7 deletions docs/content/about-iota/tokenomics/gas-in-iota.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
---
title: Gas in IOTA
description: A IOTA transaction must pay for both the computational cost of execution and the long-term cost of storing the objects a transaction creates or mutates.
description: A IOTA transaction must both pay for the computational cost of execution and pay a deposit for storing the objects a transaction creates or mutates.
cyberphysic4l marked this conversation as resolved.
Show resolved Hide resolved
---

An IOTA transaction must pay for both the computational cost of execution and the long-term cost of storing the objects a transaction creates or mutates. Specifically, [IOTA Gas Pricing](gas-pricing.mdx) is such that any transaction pays the following gas fees:
An IOTA transaction must both pay for the computational cost of execution and pay a deposit for storing the objects a transaction creates or mutates. Specifically, [IOTA Gas Pricing](gas-pricing.mdx) is such that any transaction pays the following gas fees:

`total_gas_fees = computation_units * reference_gas_price + storage_units * storage_price`

While computation and storage fees are separate, they are conceptually similar in that they each translate computation or storage into IOTA terms by multiplying computation or storage units by the relevant price.
The storage component is 100% rebated upon deletion of the corresponding object from storage, and for this reason, the terms `storage fee' and `storage deposit' are used interchangeably.
cyberphysic4l marked this conversation as resolved.
Show resolved Hide resolved

Finally, storage fee rebates are provided whenever a transaction deletes previously stored objects. Hence, the net fees that a user pays equals gas fees minus the rebates associated with data deletion:
While computation fees and storage deposits are separate, they are conceptually similar in that they each translate computation or storage into IOTA terms by multiplying computation or storage units by the relevant price.

`net_gas_fees = computation_gas_fee + storage_gas_fee - storage_rebate`
Finally, storage rebates are provided whenever a transaction deletes previously stored objects. Hence, the net fees that a user pays equals gas fees minus the rebates associated with data deletion:

`net_gas_fees = computation_fee + storage_deposit - storage_rebate`

The information on net gas fees displays in the [IOTA network explorer](https://explorer.iota.cafe/) for each transaction block.

Expand Down Expand Up @@ -53,7 +55,7 @@ Using coarse bucketing accomplishes two important goals:

Similarly, IOTA transactions vary depending on the amount of new data written into on-chain storage. The variable storage units capture these differences by mapping the amount of bytes held in storage into storage units. The current IOTA schedule is linear and maps each byte into 100 storage units. So, for example, a transaction that stores 25 bytes costs 2,500 storage units, while a transaction that stores 75 bytes costs 7,500 units.

Importantly, in the storage model users pay storage deposit fees for storing data in perpetuity but can also get a full rebate on previously stored data, if that data is deleted. Hence, the amount of storage fees that you pay are 100% rebateable.
Importantly, in the IOTA's storage model users pay storage deposit fees for storing data in perpetuity but can also get a full rebate on previously stored data, if that data is deleted. Hence, the amount of storage fees that you pay are 100% rebateable. This storage deposit mechanism incentivizes users to minimize the storage burden they place on all nodes by reducing their storage requirements and cleaning up unused objects.

### Gas budgets {#gas-budgets}

Expand All @@ -69,7 +71,7 @@ Ultimately, a successful transaction requires the end user to pay the transactio

Importantly, the minimum gas budget is 1000 NANOS (.000001 IOTA). This ensures validators are compensated with at least 1,000 NANOS even if the gas budget is incorrectly specified and the transaction aborts. Additionally, this protects the IOTA network from being spammed with a large number of transactions with minimal gas budgets. The maximum gas budget is 50 billion NANOS or 50 IOTA. This protects the network against overflow of internal multiplications and gas limits for denial of service attacks.

As mentioned previously, the storage rebate currently equals 99% of the originally paid storage fees. Because the gas budget applies to the totality of gas fees, it is often the case that a transaction only goes through if the gas budget is considerably higher than the net gas fees that a user ultimately pays.
As mentioned previously, the storage rebate is 100% of the originally paid storage fees. Because the gas budget applies to the totality of gas fees, it is often the case that a transaction only goes through if the gas budget is considerably higher than the net gas fees that a user ultimately pays.

### Gas budget examples {#gas-budget-examples}

Expand Down
Loading