Meridian-IE / impact-evaluator

Impact Evaluator smart contract
Other
4 stars 0 forks source link

Emit event when new participant is added #76

Open juliangruber opened 9 months ago

juliangruber commented 9 months ago

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

bajtos commented 9 months ago

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 commented 9 months ago

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.