dotreasury off-chain credit model discussion 1: grade proposal expense

3yrs ago
10 Comments

We developed doTreasury with the fund of 2 proposals from Kusama and 1 proposal from polkadot. doTreasury is more than just a treasury explorer, while we hope it provide a way to retrospect how the treasury money spent. Please check kusama post 352 for the original discussions.

Roles credit building is the main work of milestone 3. But it's a relatively big topic, hard to reach agreement. We'd like to start the discussion from a small topic: treasury the proposal grade.

Generally we proposal a way that councilors and token holders sign their grade to the proposal final delivery. Some statements:

  • There will be 5 grades total, from 1 to 5. Councilors and token holders can give 1, 2, 3, 4 or 5. The signing time will be also included in the signed data.
  • Councilors and token holders have sign their grade, and they can also give a short comment about the reason.
  • Final grade will be a weighted average from councilors and token holders' grade.
  • All grades are off-chain, while data is signed.
  • The final result is decided mostly by subjective judgements, while yes you can see it kinds of alignment. But we think it's an experiment worth doing though without better objective indicators.
  • Future beneficiary credit may depends on this proposal credit, but let's first focus on proposal credit.

Councilor grade

We define the grade from councilor as Council Score.

  • A councilor can grade only when he/she is a councilor at the grade time.
  • A councilor can grade a history proposal he/she didn't vote.
  • The weight for all councilors' vote are same. It's different from our original ideas.
  • The Council Score takes effect only when the graded councilors number is greater or equal to 5(configurable).
  • Final score is calculated by the arithmetic mean of councilors' grades.

Examples:

  1. 5 councilors give their grades as 1, 2, 3, 4, 5, then council_score = (1 + 2 + 3 + 4 + 5) / 5 = 3 .
  2. 3 councilors give their grades as 1, 2, 3, then council_score = undefined, since 3 doesn't reach the taking effect threshold.

Token holders grade

We define the grade from token holders as Holder Score.

  • A token holder may first register an identity before grade.
  • A token holder can grade a proposal at any time.
  • When a token holder want to grade for a second time, there are 2 options.
    1. Cover the 1st grade.
    2. Accumulate the 2nd to the 1st one.
  • Weight of a token holder's grade is decided by the address' coin age at the signing time.
  • The Holder Score takes effect only when the accumulated graded coin age greater than the threshold(100 billion for example).
  • Final score is calculated by the weighted average of all token holders' grades.

Coin age calculation

Generally we define coin age = balance * block_length. For the coin age of a address, we define:

  • settled_age = old_settled_age + old_balance * (balance_change_block_height - last_settled_block_height + 1)
  • dynamic_age = new_balance * (target_block_height - last_balance_change_height + 1)
  • coin_age_at_target_block = settled_age + dynamic_age

We know normally there will be times of balance change for an address. So maybe times of new settled age will be calculated with the block grows.

Examples:

  1. Alice hold 1KSM from genesis to block 100 without balance change, then the age at 100 is 1 * 100 = 100.
  2. Bob hold 2KSM from genesis to block 100, then receive 1KSM at block 101, then the age at 200 is 2 * 100 + 3 * 100 = 500.

Holder Score Examples

At block 100, Alice's coin age is 100 and Bob's coin age is 200. We assume holder score taking effect threshold is 0.

  1. If Alice grades 1 and Bob grades 2 both at block 100, then:
    1. Score from Alice is 100 * 1 = 100
    2. Score from Bob is 200 * 2 = 400
    3. So Holder Score = (100 * 1 + 200 * 2) / 300 = 1.67.

At block 200, Alice has no balance change, but Bob receive 1KSM at block 101. So at block 200, Alice's coin age is 200, while Bob's is 500. Either Alice or Bob will grade at this block. Remember they have 2 options: 1, Cover the 1st grade; 2, Accumulate the 2nd to the 1st one. Then at block 200:

  1. Alice choose option 1, grade 2, then the score is 200 * 2 = 400.
  2. Bob choose option2, grade 1, then the total grades number increase one, the score is 300 * 1 = 300 . The another one is that Bob grade 1st 200 * 2 = 400.
  3. So at block 200, Holder Score = (200 * 2 + 200 * 2 + 300 * 1) / 700 = 1.57.

Proposal score

Proposal score is decided by Council Score and Holder Score. Weight between Council Score and Holder Score is 2 : 1. So if Council Score is 3, while Holder Score is 2, then
proposal_score = (2 * council_score + 1 * holder_score) / 3 = (2 * 3 + 1 * 2) / 3 = 8 / 3 = 2.67

If either the council_score or holder_score is undefined, then the proposal_score is undefined.(I need rethink about this)

Possible discussion points

  • We may miss some items which can be taken account into this model.
  • Please give suggestions about the weights, like the one between council and token holders.
  • Should token holders need a identity first to grade a proposal?
  • Should all councilor keep same weight?

We are OpenSquare team, dedicated to facilitate the collaboration between projects and developers.

Up
Comments
No comments here