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

Emit event when new participant is added #76

Open
juliangruber opened this issue Feb 2, 2024 · 2 comments
Open

Emit event when new participant is added #76

juliangruber opened this issue Feb 2, 2024 · 2 comments
Assignees

Comments

@juliangruber
Copy link
Member

juliangruber commented Feb 2, 2024

When a participant is added to the balances array (check if current balances[address] == 0), emit an event ParticipantAdded(address). This helps create auxiliary services that track participants in a useful way.

This will help us to create a list of participant addresses for accounting purposes and for live dashboards

@juliangruber juliangruber self-assigned this Feb 2, 2024
@juliangruber juliangruber changed the title add emit event when new participant is added Emit event when new participant is added Feb 2, 2024
@bajtos
Copy link
Contributor

bajtos commented Feb 5, 2024

When a participant is added to the balances array (check if current balances[address] == 0), emit an event ParticipantAdded(address).

Edge case to consider:

  1. We pay scheduled rewards
  2. Participant's balance drops to zero
  3. The next time the participant earns rewards, we see them as a new participant

@juliangruber
Copy link
Member Author

good point. I don't see a way around that, the consuming services needs to handle this case. For each payouts window, every participant will be re-emitted. That can also be seen as a feature, because now you can tell who participated in which round.

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

2 participants