Frankencoin-ZCHF / frankencoin-dapp

Frankencoin Web App to interact with the Eco System
https://frankencoin.com/
MIT License
0 stars 4 forks source link

Governance Page #7

Closed luziusmeisser closed 9 months ago

luziusmeisser commented 9 months ago

We should add a new page for governance.

It should contain two areas, one with a list of proposals, and one showing the votes of the users with the possiblitity to set the delegate.

image

The source for the proposals are the following events:

event MinterApplied(address indexed minter, uint256 applicationPeriod, uint256 applicationFee, string message);
event MinterDenied(address indexed minter, string message);

The source for calculating voting power are the following events:

event Delegation(address indexed from, address indexed to);

In combination with querying the current number of votes for each delegating address.

Example:

There are the following votes: Address Votes
A 10
B 0
C 5
D 0
E 3

An the following delegation events:

Time From To
1 A B
2 A C
3 C D
4 D C
5 E A

Who has how many votes?

A has 13 votes (10 + 3 from E) B has 0 votes because event 1 got overwritten by the second C has 18 (5 + 13 from A) D has also 18 votes (18 from C) E has 3 votes