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

exclude vesting contracts from staking reward #290

Open
ororopickpocket opened this issue Jun 29, 2021 · 1 comment
Open

exclude vesting contracts from staking reward #290

ororopickpocket opened this issue Jun 29, 2021 · 1 comment
Assignees

Comments

@ororopickpocket
Copy link
Contributor

currently, staking rewards are low, because fees are distributed according to the voting power of all stakers, including vesting contracts. This should be changed. The plan is to only distribute fees to voluntary stakers.

Currently, the staking contract is not differentiating between the 2 types of stakers (vesting vs voluntary), therefore we need to adjust the staking contract.

Option 1:

  • Additional checkpoints for weighted stake / voting power of vesting contracts
  • In fee sharing proxy, subtract that number from total weighted stake / voting power
  • In fee sharing check if sender is vesting contract
    -> higher costs for vesting, but does not affect regular stakers in any way
    -> fee sharing a bit more expensive

Option 2:

  • 2 seperate balances for weighted stake / voting power: stakers and vesting contracts
  • Sum them up on total weighted stake / voting power computation
  • Fee sharing proxy reads only the stakers weighted stakes
    -> same costs for vesting + staking
    -> higher costs for all operations which read from the staking contract (voting + fee sharing)

Since the contracts were designed to keep the reading inexpensive, it is probably better to go with option 1, but this is up for discussion.

@jameshowlett977
Copy link
Contributor

I also think option 1 is better:

  1. In this case we will need to add logic only for adding checkpoints for vestings rather than stakers + vestings.
    a) We need to update logic for adding checkpoints in case of new stakes for vesting contracts.
    b) We also need to migrate/initiate checkpoints for already existings stakes for vesting contracts (another advantage to use option 1, because for option 2 we will need to migrate/initiate checkpoints for stakers + vestings).

We can use new vesrion of VestingRegistry in order to get list of all vesting contracts for item 1b.

Concerns:

  1. Higher costs for vesting - we will need to check block gas limit for stakes for vesting contracts.
  2. Probably, migration/initiation of checkpoints for old vestings can't be executed in one transaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants