Created By: Sean McOwen at BlockScience
Definitions of types that would be used to ensure type safety with domains, codomains, etc.
Type Name | Type |
---|---|
addressType | int |
capitalType | int |
castVoteType | Tuple[addressType, int] |
voteEnumType | Dict[int, str] |
The states of the system that could be taken as a snapshot at any time
Variable | Description | Type |
---|---|---|
users | The set of all users in the system | List[UserEntity] |
current_vote | The current vote happening now | VoteEntity |
Variable | Description | Type |
---|---|---|
user_address | The address of the user | addressType |
controlled_capital | The amount of capital the user controls | capitalType |
delegate | The address of the delegate that the user has chosen to delegate to | addressType |
Variable | Description | Type |
---|---|---|
vote_address | The address of the vote | addressType |
vote_reference | A link to the detailed description of the vote | string |
start | When the voting starts | datetime |
end | When the vote ends | datetime |
vote_enum | Mapping of what each integer number represents in terms of voting choice | voteEnumType |
registered_votes | All the votes which have been cast so far on the proposal | List[castVoteType] |
These are things that can be derived from the state at any point but would not be held as part of the state.
Variable | Description | Type | Computation Instruction |
---|---|---|---|
total_capital | The total capital in the system | capitalType | Sum the controlled_capital in all users in the system |
Variable | Description | Type | Computation Instruction |
---|---|---|---|
delegated_voting_capital | The voting capital that has been delegated to this user. This can change depending on recent voting. | capitalType | Need to traverse the tree and find what amount of delegation passes to this user |
Variable | Description | Type | Computation Instruction |
---|---|---|---|
current_votes | A snapshot at the current time of what the votes add up to based on voting and delegation | voteEnumType | Using the registered_votes and traversing the tree, the current votes can be calculated |
Parameters that could be toggled in the system to produce different outcomes.
Variable | Description | Type |
---|---|---|
minimum_vote_time | The minimum amount of time that a vote has to be live for | DeltaTime |
maximum_vote_time | The maximum amount of time that a vote can be live for | DeltaTime |
The entities that need to be represented within the system.
Entity | Description | State | Notes |
---|---|---|---|
User | The users in the system who can do voting | User State | There will be 0-N users in a system |
Vote | The votes being debated on in the system | Vote State | There can be many votes over the lifetime of the sytem, however, there should only be one active vote at a time |
The spaces denote payloads that pass through domains and codomains.
The space which denotes the interface for users joining a system
{user_address: addressType,
controlled_capital: capitalType,
delegate: addressType}
The space which denotes the interface for users leaving the system
{user_address: addressType}
The space which denotes a source and target user edge
{source: addressType,
target: addressType}
{address: addressType,
vote: integer}
{vote: voteState}
{address: addressType}
The definition of different actions that might happen outside of the system such as users joining the system which then need to flow through a chain of actions in the system.
Description
The boundary action which triggers a user joining the system
Called By
Followed By
Constraints
Description
The boundary action which triggers a user leaving the system
Called By
Followed By
Constraints
Description
The boundary action which triggers a change of a user's delegate
Called By
Followed By
Constraints
Description
The action of voting on the current proposal
Called By
Followed By
Constraints
The definition of actions that the system might call, such as an action to update the vote in a circumstance.
Description
The system control action which changes what the current active vote is.
Note: How the next active vote is decided is abstracted as outside the system
Followed By
Constraints
Description
The system control action which starts the chain of ending the vote
Followed By
Constraints
A definition of the policies that handle all logical things. This could be, for example, a policy which determines under what conditions a user is allowed to join the system.
Description
The policy which takes care of users joining the system including:
Followed By
Constraints
Description
The policy which takes care of users leaving and anything that needs to happen including:
Followed By
Constraints
Description
The policy which takes care of the logic for switching delegates including:
Followed By
Constraints
Description
The policy which accounts for how voting on a policy works including:
Followed By
Constraints
Description
Policy for updating the current active vote
Followed By
Constraints
Description
Policy for finishing the current active vote
Followed By
TBD
Constraints
Anything that updates state in the system, usually policies will call these with the outputs of logic. The reasoning to split them out is so that if at some point you want to add a recording variable every time an account is changed or do something like have a variable listener, you can just change the mechanism responsible for it in only one place.
Description
The mechanism which adds a user to the global set of users
Inputs
** Logic **
Description
The mechanism which removes a user from the global set of users
Inputs
** Logic **
Description
The mechanism which changes the delegate for a user
Inputs
** Logic **
Description
The mechanism which updates what the active vote is
Inputs
** Logic **
Description
The mechanism which adds a vote for a proposal
Inputs
** Logic **
What happens when user X has a delegate of user Y, but then Y leaves the system?
Do we need to extend to more than one active voting happening at a time
What if a user tries to leave and they have an active vote already put in?
There has to be tracking of delegation changes at every point if we want to be able to go back to a vote and recreate what happened
This only will work for getting full votes under the assumption of a completely circular and connected systems. If there are pockets of users delegating only within that group, there is of course a risk that no one votes in the pocket and no voting takes place
How likely is it that there will just be a few individuals that all get delegated too, defeating the purpose of even having a cascading vote because there is no possible cascade to take place?
Z Thoughts:
I think some of the ancillaries will include:
clarity
about the reference struct from which voting power is derived
a process by which a proposal goes from candidate to active
only one vote
active at a time
voting power for an activate determined by a snapshot
at the time the vote became active
a clear rule about whether re-
delegation is allowed during an active vote or only between active votes
…
likely more tbd
I think we need to account for how votes are initiated — can mostly abstract it away but instances of votes are bounded, a main question in any voting protocol is how do they come into existence and what triggers their resolution