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)
Instead of using an event queue for clients to keep track of available rewards, we can use deterministic addresses. Specifically, we can
Registraraccount