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

Remove meta-staking in favor of having consumers stake directly? #47

Open
Art3miX opened this issue Nov 7, 2022 · 0 comments
Open

Remove meta-staking in favor of having consumers stake directly? #47

Art3miX opened this issue Nov 7, 2022 · 0 comments
Labels
question Further information is requested

Comments

@Art3miX
Copy link
Collaborator

Art3miX commented Nov 7, 2022

To calculate rewards correctly, we need to withdraw rewards from validator (meta-staking) every time we do stake / unstake / withdraw rewards action on provider, this lead to a very complex msg tree talking with 3 contracts:

  1. Provider do IBC call to consumer
  2. Consumer do withdraw rewards call to meta-staking
  3. Meta staking withdraw rewards from validator
  4. Meta staking calculate rewards of the calling consumer
  5. Meta staking sends the funds to consumer
  6. Consumer calculate the rewards of the calling delegator
  7. Consumer sends IBC-funds to delegator.

Removing meta-staking will allow us to simplify this flow by a lot and go with a more straight forwards flow:

  1. Provider do IBC call to consumer
  2. Consumer withdraw rewards from validator
  3. Consumer calculate rewards of calling delegator
  4. Consumer sends IBC-funds to delegator.
@JakeHartnell JakeHartnell added the question Further information is requested label Nov 15, 2022
@JakeHartnell JakeHartnell changed the title Remove meta-staking in favor of having consumers stake directly Remove meta-staking in favor of having consumers stake directly? Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants