BlockScience Team
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ###### tags: cascading-vote-capital # Cascading Vote Capital Mathematical Specification **Created By: Sean McOwen at BlockScience** ## Types 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]| ## States The states of the system that could be taken as a snapshot at any time ### Global State | Variable | Description | Type | | --------|------- | ----- | | users | The set of all users in the system | List[UserEntity]| | current_vote | The current vote happening now| VoteEntity| ### User State | 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| ### Vote State | 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]| ## Stateful Metrics These are things that can be derived from the state at any point but would not be held as part of the state. ### Global 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| ### User State | 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| ### Vote State | 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 Parameters that could be toggled in the system to produce different outcomes. ### Vote Parameters | 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| ## Entities 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| ## Spaces The spaces denote payloads that pass through domains and codomains. ### UserJoinSpace The space which denotes the interface for users joining a system ``` {user_address: addressType, controlled_capital: capitalType, delegate: addressType} ``` ### UserLeaveSpace The space which denotes the interface for users leaving the system ``` {user_address: addressType} ``` ### UserEdgeSpace The space which denotes a source and target user edge ``` {source: addressType, target: addressType} ``` ### Proposal Vote Space ``` {address: addressType, vote: integer} ``` ### New Vote Space ``` {vote: voteState} ``` ### Finish Vote Space ``` {address: addressType} ``` ## Boundary Actions 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. ### User Join System **Description** The boundary action which triggers a user joining the system **Called By** 1. User Entities **Followed By** 1. User Join Policy with spaces transmitted of: - UserJoinSpace **Constraints** 1. The user must not already be a part of the system 2. The controlled capital must be consistent 3. The delegate can't be the same as the user_address 4. The user calling this must be the same as the address ### User Leave System **Description** The boundary action which triggers a user leaving the system **Called By** 1. User Entities **Followed By** 1. User Leave Policy with spaces transmitted of: - UserLeaveSpace **Constraints** 1. The user must be part of the system 2. The user calling this must be the same as the address ### Change Delegate **Description** The boundary action which triggers a change of a user's delegate **Called By** 1. User Entities **Followed By** 1. Change Delegate Policy with spaces transmitted of: - UserEdgeSpace **Constraints** 1. The source user must be part of the system 2. The target user must be part of the system 3. The user calling this must be the same as the source address 4. The source and target user can't be the same ### Vote on Proposal **Description** The action of voting on the current proposal **Called By** 1. User Entities **Followed By** 1. Proposal Vote Policy with spaces transmitted of: - ProposalVoteSpace **Constraints** 1. The address is in the system 2. The vote attribute of the passed space is part of the votingEnum of the current active vote (valid voting choice) ## Control Actions The definition of actions that the system might call, such as an action to update the vote in a circumstance. ### Update Active Vote **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** 1. Update Active Vote Policy with spaces transmitted of: - NewVoteSpace **Constraints** 1. There is no current active vote in the system ### Finish Vote **Description** The system control action which starts the chain of ending the vote **Followed By** 1. Finish Vote Policy with spaces transmitted of: - FinishVoteSpace **Constraints** 1. The address matches the address of the current active vote ## Policies 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. ### User Join Policy **Description** The policy which takes care of users joining the system including: 1. Validating that the user is not already in the set of users 2. Validating the controlled capital is correct and/or computing what it should be 3. Optionally calling the Add User Mechanism if validation is correct **Followed By** 1. [Optional] Add User Mechanism with spaces transmitted of: - UserJoinSpace **Constraints** ### User Leave Policy **Description** The policy which takes care of users leaving and anything that needs to happen including: 1. Validation that the user can leave 2. Anything that might need to happen with checking issues from this user being a delegate of other users 3. Anything involved with taking out a vote that the user had submitted on an active vote **Followed By** 1. [Optional] Remove User Mechanism with spaces transmitted of: - UserLeaveSpace **Constraints** ### Change Delegate Policy **Description** The policy which takes care of the logic for switching delegates including: 1. Whether the action is able to occur **Followed By** 1. [Optional] Change Delegate Mechanism with spaces transmitted of: - UserEdgeSpace **Constraints** ### Proposal Vote Policy **Description** The policy which accounts for how voting on a policy works including: 1. Checking if a vote has already been cast (and possibly allowing for replacement of a vote) 2. Checking if the vote is valid **Followed By** 1. [Optional] Add Vote Mechanism with spaces transmitted of: - ProposalVoteSpace **Constraints** ### Update Active Vote Policy **Description** Policy for updating the current active vote **Followed By** 1. [Optional] Update Active Vote Mechanism with spaces transmitted of: - NewVoteSpace **Constraints** ### Finish Vote Policy **Description** Policy for finishing the current active vote 1. Takes care of validating if the vote can be finished 2. Takes care of tallying of the votes through the cascading vote capital algorithm 3. Triggers any outside actions that happen with the conclusion of the vote 4. Removes the current active vote upon completion **Followed By** TBD **Constraints** ## State Update Mechanisms 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. ### Add User Mechanism **Description** The mechanism which adds a user to the global set of users **Inputs** 1. UserJoinSpace ** Logic ** 1. Add the user_address from _INPUTS[0] to the global state of users ### Remove User Mechanism **Description** The mechanism which removes a user from the global set of users **Inputs** 1. UserLeaveSpace ** Logic ** 1. Remove the user_address from _INPUTS[0] to the global state of users ### Change Delegate Mechanism **Description** The mechanism which changes the delegate for a user **Inputs** 1. UserEdgeSpace ** Logic ** 1. Set the delegate attribute of _INPUTS[0].source to _INPUTS[0].target ### Update Active Vote Mechanism **Description** The mechanism which updates what the active vote is **Inputs** 1. NewVoteSpace ** Logic ** 1. Set the global state's active vote attribute to _INPUTS[0].vote ### Add Vote Mechanism **Description** The mechanism which adds a vote for a proposal **Inputs** 1. ProposalVoteSpace ** Logic ** 1. Append the vote from _INPUTS[0] to the global space's active vote registered_votes attribute ## Issue Log 1. What happens when user X has a delegate of user Y, but then Y leaves the system? 2. Do we need to extend to more than one active voting happening at a time - What implications would it have for delegation, what if you only agree with the delegate on one of the voting issues - Delegation is done at a global/system level, but then there are individual voting decisions - Unless I am mistaken on this, it means you can't choose delegation on an issue by issue basis - Unless it is on an individual level in which case it defeats the purpose of having a fail safe for not voting because then you need to delegate every single vote 3. What if a user tries to leave and they have an active vote already put in? 4. 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 5. 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 6. 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? 7. 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

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully