JoinSEEDS / seeds-smart-contracts

Smart contracts for SEEDS - A Regenerative Civilization Building Game.
https://docs.google.com/document/d/1C4w9Ol8VGabCIcQDVPDrwcTRoJXBqhrb7VjslwQbUGU/edit#heading=h.6f4sxygso816
MIT License
20 stars 6 forks source link

use double for higher precision quorum #398

Closed n13 closed 2 years ago

n13 commented 2 years ago

We need to use double for quorum to prevent rounding errors...

Bug report

Sorin:

Is it too much trouble to use 3 decimals for the code that calculates the percent for quorum? For example: Last cycle: 1/8 proposals = 0.125 rounded at 0.12. Instead of 0.125 x 13 166 = 1646 trust tokens we had 0.12 x 13166 = 1580 trust tokens needed

While this cycle we have 1/4 proposals = 0.25 ...no issue here :slight_smile:

So my question is, how hard is to code that change (from 2 to 3 decimals) and if you want to adjust that to have a more accurate value?

Thanks!