poanetwork / poa-dapps-voting

POA Network Governance Dapp
https://voting.poa.network
GNU General Public License v3.0
26 stars 54 forks source link

(Feature) Votings to Manage Emission Funds #173

Closed varasev closed 5 years ago

varasev commented 5 years ago

(Mandatory) Description

This PR solves the issue https://github.com/poanetwork/poa-dapps-voting/issues/130.

We have done 3rd HF in Sokol network, so now we have new smart contracts deployed there.

Thereby a new type of ballot has been added to Governance DApp with this PR. For now it is only supported for Sokol because we still have old contracts in Core.

Below are screenshots of DApp showing the new type of a ballot.

How the ballot's card looks:

image

Creator of a ballot can cancel the ballot within 15 minutes right after its creation (according to https://github.com/poanetwork/poa-network-consensus-contracts/issues/161):

image

Here is how New Ballot page looks (it is not displayed for Core in this version):

image

I.e., a validator should enter a ballot description and paste an address of funds receiver. The field Current amount of funds is not editable and just shows the current balance of EmissionFunds contract.

Above the Add Ballot button, we see the note with time interval when the next ballot of this type can be created. The bounds of the interval are calculated automatically and depend on VotingToManageEmissionFunds contract's parameters such as release time, emission release threshold, and distribution threshold described here.

For Sokol the release time is equal to 20 Sep 2018 10:37 UTC, the emission release threshold is equal to 7 days, and distribution threshold is equal to 3 days.

Therefore, the nearest ballot of this type in Sokol can be started from 20 Sep 2018 10:37 UTC (the nearest release time) and it will be finished on 23 Sep 2018 10:37 UTC as shown on the screen above. I.e. the end date of the ballot will be 20 Sep 2018 10:37 UTC plus Distribution threshold.

The next ballot will be able to be started from 27 Sep 2018 10:37 UTC (next release time) and so on.

Some explanation of release time and emission release threshold can be found here: https://github.com/poanetwork/poa-network-consensus-contracts/pull/168#issuecomment-420159057

(Mandatory) What is it: (Fix), (Feature) or (Refactor) (Feature)

varasev commented 5 years ago

Description of Emission Funds Ballot is now available on Wiki: https://github.com/poanetwork/wiki/wiki/Manage-Emission-Funds