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 (L1SC)]: Staking reward generation through inflation #153

Closed
26 tasks done
lzpap opened this issue Apr 26, 2024 · 9 comments · Fixed by #1052
Closed
26 tasks done

[Task (L1SC)]: Staking reward generation through inflation #153

lzpap opened this issue Apr 26, 2024 · 9 comments · Fixed by #1052
Assignees
Labels
sc-platform Issues related to the Smart Contract Platform group.

Comments

@lzpap
Copy link
Member

lzpap commented Apr 26, 2024

Description

In SUI, staking rewards are subsidised by pre-minted tokens. Once these run out, staking rewards come only from transaction fees.

In IOTA, instead of pre-minted stake subsidies we plan to introduce inflation/deflation based on the amount of tx fees collected in an epoch. The issue is about creating support for this in the epoch advancing system transaction, which currently just takes a portion of the stake subsidy tokens and distributes it to stakers.

The threshold of target staking reward amounts should come from the protocol config and be a governance parameter.

Requirements (1st iteration)

Preview Give feedback
  1. 3 of 3
    team-sc-platform
    Dkwcs valeriyr
  2. team-sc-platform
  3. team-sc-platform
    valeriyr
  4. team-sc-platform
  5. team-sc-platform
  6. team-sc-platform
    Dkwcs
  7. team-sc-platform
    Dkwcs
  8. team-sc-platform
  9. team-sc-platform
  10. team-sc-platform
    valeriyr

Additional tasks

Preview Give feedback
  1. team-sc-platform
  2. team-sc-platform
    valeriyr
  3. team-sc-platform
  4. team-sc-platform
  5. team-sc-platform
    Dkwcs
  6. team-sc-platform
    Dkwcs
  7. team-sc-platform
  8. team-sc-platform
    valeriyr
  9. team-sc-platform
    Dkwcs
  10. team-sc-platform
  11. team-sc-platform
  12. team-sc-platform
    Dkwcs
  13. team-sc-platform
    valeriyr
  14. team-sc-platform
    Dkwcs
  15. team-sc-platform
    valeriyr
  16. 3 of 3
    team-sc-platform
    valeriyr
@miker83z
Copy link
Contributor

We'll wait for the Tokenomics taskforce to provide us some requirements

@miker83z miker83z changed the title Staking reward generation through inflation [Task (L1SC)]: Staking reward generation through inflation May 14, 2024
@miker83z miker83z added the sc-platform Issues related to the Smart Contract Platform group. label May 14, 2024
@miker83z miker83z added this to the L1SC/IOTA-Framework milestone May 14, 2024
@valeriyr
Copy link
Contributor

valeriyr commented Jul 2, 2024

Do we need to implement this part of the specification?

Depending on the size of the storage_deposits, mint new tokens as storage_rewards to be distributed among validators, effectively compensating them for holding the data. Could also be set to zero if we think that target_reward already accounts for this, or we could dynamically adjust target_reward.

@lzpap
Copy link
Member Author

lzpap commented Jul 2, 2024

Do we need to implement this part of the specification?

Depending on the size of the storage_deposits, mint new tokens as storage_rewards to be distributed among validators, effectively compensating them for holding the data. Could also be set to zero if we think that target_reward already accounts for this, or we could dynamically adjust target_reward.

No need for it right now.

@Dkwcs
Copy link
Contributor

Dkwcs commented Jul 3, 2024

@lzpap
What should we with leftover_rewards?

        // Because of precision issues with integer divisions, we expect that there will be some
        // remaining balance in `storage_fund_reward` and `computation_reward`.
        // All of these go to the storage fund.
        let mut leftover_staking_rewards = storage_fund_reward;
        leftover_staking_rewards.join(computation_reward);

Just burn them?

@lzpap
Copy link
Member Author

lzpap commented Jul 3, 2024

@lzpap
What should we with leftover_rewards?

        // Because of precision issues with integer divisions, we expect that there will be some
        // remaining balance in `storage_fund_reward` and `computation_reward`.
        // All of these go to the storage fund.
        let mut leftover_staking_rewards = storage_fund_reward;
        leftover_staking_rewards.join(computation_reward);

Just burn them?

Do you mean the leftover rewards after distribution to all validators? I'm guessing it's in the range of a couple of nanos? Then we should simply burn it.

@Dkwcs
Copy link
Contributor

Dkwcs commented Jul 4, 2024

@lzpap
What should we with leftover_rewards?

        // Because of precision issues with integer divisions, we expect that there will be some
        // remaining balance in `storage_fund_reward` and `computation_reward`.
        // All of these go to the storage fund.
        let mut leftover_staking_rewards = storage_fund_reward;
        leftover_staking_rewards.join(computation_reward);

Just burn them?

Do you mean the leftover rewards after distribution to all validators? I'm guessing it's in the range of a couple of nanos? Then we should simply burn it.

There was one case in tests when computation rewards could be higher than usual
For an instance - when every validators are slashed and all their rewards will burn

@Dkwcs
Copy link
Contributor

Dkwcs commented Jul 4, 2024

Also what should we do with storage_fund_reward? Replace it or completely remove?
It passes to validators for now

@lzpap
Copy link
Member Author

lzpap commented Jul 4, 2024

Also what should we do with storage_fund_reward? Replace it or completely remove?
It passes to validators for now

Storage fund reward is earned by the storage fund from the stake subsidies . We discussed to get rid of the storage deposits ability to earn rewards. Those funds shall not be considered staked.

@lzpap
Copy link
Member Author

lzpap commented Jul 4, 2024

Also what should we do with storage_fund_reward? Replace it or completely remove?
It passes to validators for now

Storage fund reward is earned by the storage fund from the stake subsidies . We discussed to get rid of the storage deposits ability to earn rewards. Those funds shall not be considered staked.

@Dkwcs see my comment here #959 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
5 participants