niklasp / govrewards

govrewards.vercel.app
1 stars 0 forks source link

Calculate referendum pass threshold #10

Open tumispro opened 2 years ago

tumispro commented 2 years ago

Can be calculated like this: https://wiki.polkadot.network/docs/learn-governance

Not sure circ. supply is readily available, needs a deeper dive

tumispro commented 2 years ago

This needs a little more work and I need to freshen up my math skills :) calculating passing status can be done using the example formulas, but we already get from the API whether it's passing or not. What we need is to determine at which amount of KSM voted the threshold currently is, which can be calculated by determining the number of aye votes (in KSM) needed to make both sides of the formula equal.

So my question is: do we want to show the threshold point like PA does? And do we have a UI for that already? (@niklasp) If so, I will look into this further.

niklasp commented 2 years ago

no ui yet, we can imo postpone to v2 sou can add the tag