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

registry: Replace reward queue with a deterministic address scheme #2

Open
armaniferrante opened this issue Mar 14, 2021 · 0 comments

Comments

@armaniferrante
Copy link
Contributor

Instead of using an event queue for clients to keep track of available rewards, we can use deterministic addresses. Specifically, we can

  • Add a global reward vendor counter to the Registrar account
  • Use program derived addresses (owned by the program) for each reward vendor, using seeds as `[registrar.key.as_ref(), &"reward".as_le_bytes(), &[bump]].
  • Pass in the next reward available on stake and unstake to perform reward eligibility checks (instead of passing in the reward queue account as is done now)
@armaniferrante armaniferrante changed the title Replace reward queue with a deterministic address scheme registry Replace reward queue with a deterministic address scheme Mar 14, 2021
@armaniferrante armaniferrante changed the title registry Replace reward queue with a deterministic address scheme registry: Replace reward queue with a deterministic address scheme Mar 14, 2021
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

1 participant