Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establish how much more was allocated to each worker for term 32 #5145

Open
3 tasks done
ignazio-bovo opened this issue May 1, 2024 · 10 comments
Open
3 tasks done

Establish how much more was allocated to each worker for term 32 #5145

ignazio-bovo opened this issue May 1, 2024 · 10 comments
Assignees
Labels
argus Argus distributor node

Comments

@ignazio-bovo
Copy link
Contributor

ignazio-bovo commented May 1, 2024

I have erroneously set the reward per block to a too high number.
The previous DWG board item solves the unnecessary DWG debt that should be zero.
Now I need to figure out how much each worker has been paid since the erroneous start of the term. This can be achieved, for instance, by inspecting the subscan tool with the reward account for each worker (which can be view on the DWG entity on the chain). From there I will figure out:

  • Salary surplus from each worker in term 32
  • A way to rebalance salaries for term 32
  • Some way of paying worker in such a way that this mistake will never happen again

DWG workers and councilors will be clearly notify of all of this.

@ignazio-bovo ignazio-bovo changed the title Establish how much more was allocated to each worker, since the reward has been erroneously set Establish how much more was allocated to each worker for term 32 May 1, 2024
@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 1, 2024

Reward paid can be extracted from the QN with the following (7012830 is the term 32 starting block)

query dwgWorkerRewards {
    rewardPaidEvents(
        where: {
            inBlock_gte: 7012830
            group: { id_eq: "distributionWorkingGroup" }
            inBlock_lte: 7314596
        }
    ) {
        inBlock
        createdAt
        amount
        worker {
            membership {
                handle
            }
        }
    }
}
  • block 7314596 is the current block at the time of this writing

@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 2, 2024

Amount column (see appendix) can then be aggregated by member handle and compared with the actual plan.
The amount is in HAPI format

Member Amount paid Amount established surplus/deficit
spoonbender 1,726,819,253,861,310.00 155,714,200,000,000.00 1,571,105,053,861,310.00
p0k 31,425,732,513,341.00 155,714,200,000,000.00 -124,288,467,486,659.00
mr_bovo 72,450.00 986,666,700,000,000.00 -986,666,699,927,550.00
klaudiusz 48,176,437,230,180.00 244,761,800,000,000.00 -196,585,362,769,820.00
0x2bc 484,180,330,533,350.00 155,714,200,000,000.00 328,466,130,533,350.00
sieemma 32,017,023,435,600.00 155,714,200,000,000.00 -123,697,176,564,400.00
Deathix 32,017,023,435,600.00 155,714,200,000,000.00 -123,697,176,564,400.00

The procedure to rebalance DWG salaries is the following:

  • Obtain surplus back form spoonbender & 0x2bc with a transfer to DWG budget temporary account

  • Pay missing salaries to other operators (including mmx which doesn't appear in the list) via transfer from the previous account

  • I feel obliged to reward all the workers with a bonus, equivalent of $50, out of my salary for their kind cooperation and the trouble caused during this term

  • Temporary budget account address: j4TsUmv66NqRmSLXNAp2iHvcKjT3e65T3BrA26wf6aqZts8a9

@ignazio-bovo
Copy link
Contributor Author

Future direction

A few observations, we have now joyutils which allows you to set block reward given the usd amount at each term.
I would however prefer to pay directly the amounts say 5 days or so before term ends, so that the amount paid to each worker are exact
For amount computation and plan + report I will set up a notion worksheet so that I can simply paste the amounts with no errors

@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 2, 2024

Appendix

  1. For transparency the data from the query node looks like. (Amount column is in HAPI)
inBlock createdAt amount worker__membership__handle
7013160 2024-04-11T08:52:30.000Z 5336170572600 spoonbender
7013160 2024-04-11T08:52:30.000Z 5336170572600 p0k
7013160 2024-04-11T08:52:30.000Z 14490 mr_bovo
7013160 2024-04-11T08:52:30.000Z 5336170572600 klaudiusz
7013160 2024-04-11T08:52:30.000Z 3049239375000 klaudiusz
7013160 2024-04-11T08:52:30.000Z 5336170572600 0x2bc
7013160 2024-04-11T08:52:30.000Z 5336170572600 Deathix
7013160 2024-04-11T08:52:30.000Z 5336170572600 sieemma
7027650 2024-04-12T09:01:30.000Z 5336170572600 spoonbender
7027650 2024-04-12T09:01:30.000Z 5336170572600 p0k
7027650 2024-04-12T09:01:30.000Z 14490 mr_bovo
7027650 2024-04-12T09:01:30.000Z 5336170572600 klaudiusz
7027650 2024-04-12T09:01:30.000Z 3049239375000 klaudiusz
7027650 2024-04-12T09:01:30.000Z 5336170572600 0x2bc
7027650 2024-04-12T09:01:30.000Z 5336170572600 Deathix
7027650 2024-04-12T09:01:30.000Z 5336170572600 sieemma
7042140 2024-04-13T09:10:42.000Z 5336170572600 spoonbender
7042140 2024-04-13T09:10:42.000Z 5336170572600 p0k
7042140 2024-04-13T09:10:42.000Z 14490 mr_bovo
7042140 2024-04-13T09:10:42.000Z 5336170572600 klaudiusz
7042140 2024-04-13T09:10:42.000Z 3049239375000 klaudiusz
7042140 2024-04-13T09:10:42.000Z 5336170572600 0x2bc
7042140 2024-04-13T09:10:42.000Z 5336170572600 Deathix
7042140 2024-04-13T09:10:42.000Z 5336170572600 sieemma
7056630 2024-04-14T09:23:00.000Z 5336170572600 spoonbender
7056630 2024-04-14T09:23:00.000Z 5336170572600 p0k
7056630 2024-04-14T09:23:00.000Z 14490 mr_bovo
7056630 2024-04-14T09:23:00.000Z 5336170572600 klaudiusz
7056630 2024-04-14T09:23:00.000Z 3049239375000 klaudiusz
7056630 2024-04-14T09:23:00.000Z 5336170572600 0x2bc
7056630 2024-04-14T09:23:00.000Z 5336170572600 Deathix
7056630 2024-04-14T09:23:00.000Z 5336170572600 sieemma
7071120 2024-04-15T09:51:12.000Z 5336170572600 spoonbender
7071120 2024-04-15T09:51:12.000Z 5336170572600 p0k
7071120 2024-04-15T09:51:12.000Z 14490 mr_bovo
7071120 2024-04-15T09:51:12.000Z 5336170572600 klaudiusz
7071120 2024-04-15T09:51:12.000Z 3049239375000 klaudiusz
7071120 2024-04-15T09:51:12.000Z 5336170572600 0x2bc
7071120 2024-04-15T09:51:12.000Z 5336170572600 Deathix
7071120 2024-04-15T09:51:12.000Z 5336170572600 sieemma
7085610 2024-04-16T10:09:24.000Z 5336170572600 spoonbender
7085610 2024-04-16T10:09:24.000Z 4744879650341 p0k
7085610 2024-04-16T10:09:24.000Z 3049239375000 klaudiusz
7085610 2024-04-16T10:09:24.000Z 5336170572600 0x2bc
7085610 2024-04-16T10:09:24.000Z 5336170572600 Deathix
7085610 2024-04-16T10:09:24.000Z 5336170572600 sieemma
7172550 2024-04-22T11:31:54.000Z 559597906235970 spoonbender
7172550 2024-04-22T11:31:54.000Z 452163307097750 0x2bc
7172550 2024-04-22T11:31:54.000Z 1.1352E+15 spoonbender
7172550 2024-04-22T11:31:54.000Z 3200148117180 klaudiusz

@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 2, 2024

DWG first refund: coming from 0x2bc amount

@jen4ph
Copy link

jen4ph commented May 2, 2024

I like that all the necessary info was written above clearly and the issue is being resolved accordingly.

@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 2, 2024

From there worker 23 has been rewarded with missing reward equal to JOY: 5570.5908877146 via the scheduled reward logic. I also awarded (accidentally) the same amount of JOY via spendFromBudget extrinsic (which unfortunately doesn't alter the missing reward field in the worker chain status).
The DWG debt has been finally set to 0. The pioneer doesn't display properly that because of a QN bug, but it can be seen by querying the DWG worker status on chain via polkadot-js.
Hence the table now becomes:

Member Amount paid Amount established surplus/deficit
spoonbender 1,726,819,253,861,310.00 155,714,200,000,000.00 1,421,105,053,861,310.00
p0k 31,425,732,513,341.00 155,714,200,000,000.00 -124,288,467,486,659.00
mr_bovo 72,450.00 986,666,700,000,000.00 -986,666,699,927,550.00
klaudiusz 48,176,437,230,180.00 244,761,800,000,000.00 -196,585,362,769,820.00
0x2bc ✅ 155,714,200,000,000.00 155,714,200,000,000.00 0.00
sieemma 32,017,023,435,600.00 155,714,200,000,000.00 -123,697,176,564,400.00
Deathix 32,017,023,435,600.00 155,714,200,000,000.00 -123,697,176,564,400.00
MMX 111,411,817,754,292.00 155,714,200,000,000.00 -44,302,382,245,708.00

I will close the issue once all workers have been correctly compensated

@ignazio-bovo ignazio-bovo self-assigned this May 2, 2024
@ignazio-bovo ignazio-bovo added the argus Argus distributor node label May 2, 2024
@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 3, 2024

spoonbender has already spent almost all the money, now the only possible solution is the following:

  1. spoondbender can give back only 15,000 JOY.
  2. I will forego my salary this term and I will personally fund the budget with the remaining amount such that workers get paid regularly this term. Notice that doing this the debt becomes basically between me and spoonbender and not between him and the DAO. If either party decides to leave the DWG earlier I'll take the loss basically
  3. For the future I will reward 55$ per term to worker spoonbender his remaining 324$ - 55$ = 269$ salary will be added to my salary until the amount of 3300$ has been recouped in tranches of 269$. This will take 13 terms to fully complete

@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 6, 2024

Conclusion

I have transferred to the DWG budget: 61257.0565630987 JOY and repaid the remaining workers. So everyone got paid at least the amount planned during the term
From the remaining time here's the dept position of worker spoonbender:

  • Spoonbender ows mrbovo (me): 986,666,699,927,550HAPI = 98666.669992755 JOY (my salary for term 32) according to the plan
  • Spoonbender ows the DWG budget a surplus that has been transferred to him which doesn't belong to any worker salary: 61257.0565630987 JOY

Hence worker spoonbender ows in total 1421105053861310 HAPI = 142110.5053861 JOY to me + DWG budget

Next Steps

  1. For the next 4 terms or so his salary will be reduced to the JOY equivalent of 55$ dollar until his debt position against the DWG will be reduced
  2. From there on he will still get paid the same amount (55$) but that's a private arrangement between me and him to estinguish his debt position against me

Final debt table setup (HAPI with 2 decimals to ignore)

Member Amount paid Amount established surplus/deficit Remaining paid
spoonbender 1,726,819,253,861,310.00 155,714,200,000,000.00 1,571,105,053,861,310.00 1,421,105,053,861,310.00 0
p0k 31,425,732,513,341.00 155,714,200,000,000.00 -124,288,467,486,659.00 0 124,288,467,486,659.00
mr_bovo 72,450.00 986,666,700,000,000.00 -986,666,699,927,550.00 -986,666,699,927,550.00 0.00
klaudiusz 48,176,437,230,180.00 244,761,800,000,000.00 -196,585,362,769,820.00 0 196,585,362,769,820.00
0x2bc 484,180,330,533,350.00 155,714,200,000,000.00 328,466,130,533,350.00 0 0
sieemma 32,017,023,435,600.00 155,714,200,000,000.00 -123,697,176,564,400.00 0 123,697,176,564,400.00
Deathix 32,017,023,435,600.00 155,714,200,000,000.00 -123,697,176,564,400.00 0 123,697,176,564,400.00
MMX 111,411,817,754,292.00 155,714,200,000,000.00 -44,302,382,245,708.00 0 44,302,382,245,708.00

@ignazio-bovo
Copy link
Contributor Author

ignazio-bovo commented May 10, 2024

From the above, converting the JOY amounts into USD with ema30(term 32) = .021
Spoonbender ows to me: 2072.0 USD (term salary)
Spoonbender ows to the DWG budget: 1286.4 USD

An operator salary is 327USD per term, If we set his salary to 55USD per term it means that the remaining 272USD are going to

  • Estinguish his debt against DWG first (4.7 terms)
  • Will be added to my salary after those 4.7 terms, because he ows me a full salary (the one that I haven't got this term 32)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argus Argus distributor node
Projects
Status: Done
Development

No branches or pull requests

2 participants