oceanprotocol-archive / DAOBot

Web3 Glue for OceanDAO
6 stars 4 forks source link

R17 - Implement QF distribution logic #143

Closed idiom-bytes closed 2 years ago

idiom-bytes commented 2 years ago

Original proposal was to:

  1. Take a earmark (do general last)
  2. Take all proposals within that earmark, and select proposal, votes, total_sum(votes), votes/total_sum as pct_votes
  3. ApplyQF(list, earmark) ----- Apply QF
  4. funding_received = earmark * pct_votes
  5. adjusted_receive = funding_received > min_funding ? funding_received : 0;
  6. adjusted_receive = funding_received - max_funding > 0 ? funding_received - max_funding : 0;
  7. final_funding = adjusted_receive
  8. funding_overflow = funding_received - adjusted_receive ------ Exit loop
  9. sum_overflow = sum(list x, x.funding_overflow)
  10. list = list.map(x, x.funding_overflow > 0 ? list.remove(x) : continue; // remove all items that overflowed
  11. sum_overflow > 0 and list.length > 0 ? ApplyQF(list, sum_overflow) : recycle(sum_overflow);

Here are the slides https://docs.google.com/spreadsheets/d/1e4xb6m-aKcBhwob_p7ereSFneXFPpDjUbSjz13smmHI/edit#gid=786387205

idiom-bytes commented 2 years ago

GSheets & Pearl: Display the QF funding distribution in aggregate (and or, granularly).

idiom-bytes commented 2 years ago

Pull Request => https://github.com/oceanprotocol/DAOBot/pull/160

Branch & History https://github.com/oceanprotocol/DAOBot/tree/feature/qf-distribution

idiom-bytes commented 2 years ago

The calculations for QF and R15 have been shared for discussion here: https://discord.com/channels/612953348487905282/908016760190537798/957382138624360468

idiom-bytes commented 2 years ago

PR in staging - https://github.com/oceanprotocol/DAOBot/pull/170 Reverted from release in R16, to be launched in R17.

idiom-bytes commented 2 years ago

Distribution of QF https://airtable.com/appt8Iv7fs3nFbUy7/tbl0ZFukYJXU9mHKn/viwbBklsQyHUaEtWF?blocks=hide