Meridian-IE / impact-evaluator

Impact Evaluator smart contract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emit event when new participant is added

juliangruber opened this issue · comments

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

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

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.