Journey

  1. Creation of proposal
  2. [OPTIONAL] Take a snapshot of the state of the PDAs and store it in the backend (microflow)
  3. The user goes to the snapshot
  4. Connect wallet
  5. Passes the GitCoin passport plugin check
  6. Casts vote
  7. Wait until the end of the proposal
  8. On proposal finish
    1. Snapshot will run the strategy
    2. Strategy fetches the information through the backend (microflow) from gateway xyz
    3. Runs through the logic
    4. Returns the addresses and amounts
  9. snapshot will calculate the percentages
  10. snapshot publishes the results

Considerations

  1. Looking at the document, I picked up that we don’t necessarily need to get a snapshot of the data in the beginning but rather calculate everything at the end of the proposal. In the code example, I saw this line const blockTag = typeof snapshot === 'number' ? snapshot : 'latest'; indicating that the snapshot can consider the latest block, or the data at the time of submission. by calculating in the end we don’t need to store a snapshot of the information. However, to get the data we can’t rely on proof because someone might generate multiple proofs and proofs won't update after the consent.
  2. We can’t calculate quorum. for that, we need to have the total number of eligible citizens which we can not get because there are 2 scenarios in which in one the strategy can be gamed and in the other, it is not possible to get the information. here’s an example: If we don't check for passports, I can go create a list of accounts get the PDAs, and run up the number of eligible citizens, shrinking the number of participants. On the other hand, if we check for the passport, we need the users to consent. on top of that, some users might never come in and consent because they didn't participate but we need to consider them as the voting population.
  3. We need to keep a list of all processed gateway IDs. Users might have multiple wallets connected to the same gateway ID.
  4. Citizen Credential: If a voter doesn’t possess a Citizen credential, their voting weight will be 0%.
  5. In the strategy for to calculate the voting power of wPOKT liquidity providers we need to get the GatewayID from the eth wallet user used to vote then check all the Eth wallets connected to the GatewayID and calculate the total wPOKT staked with them
  6. When a proposal is published we take yesterdays snapshot for calculation.