Skip to content

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

@armaniferrante

Description

@armaniferrante

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions