Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voting Pallet #98

Closed
5 tasks done
letodunc opened this issue Jul 18, 2022 · 0 comments · Fixed by #107
Closed
5 tasks done

Voting Pallet #98

letodunc opened this issue Jul 18, 2022 · 0 comments · Fixed by #107
Assignees
Labels
enhancement New feature or request

Comments

@letodunc
Copy link
Contributor

letodunc commented Jul 18, 2022

Motivation

This pallet will manage the voting process for the house selling proposal. It should pass through the vote of the house council and the investors.

Solution

The house council process will be implemented with the collective pallet. The investors process will be implemented with the democracy pallet. The voting pallet will manage the data between these pallets.

Steps

  • Create and configure vote pallet
  • Add collective and democracy pallet to the vote pallet and the runtime
  • Add structs and storages
  • Add callable functions and helpers (see Implementation section below)
  • Add tests and benchmarking

Implementation

  • call::submit_proposal

    • A Seller role submit a proposal to the pallet. As input parameters, the accountId of a SELLER (role), and a proposal index which should be linked to a struct containing information about the [asset/asset_nft] are used
    • The proposal index is transmitted to the treasury-pallet, in order to trigger a spending_proposal, and lock a deposit fee proportional to the value of the proposal.
    • A call to collective::propose is done by the pallet. An accountId linked to the Vote pallet is added in the collective council to be able to submit proposal to the collective pallet
  • call::council_vote

    • Only a house council member can call this function.
    • In case of unfavorable vote result, the negative vote answer is transmitted to the treasury's spending_proposal, which in turn will trigger the transfer of the deposit fee to the treasury.
    • In case of favorable vote, a Referendum (Democracy_pallet) linked to this proposal is immediately triggered, waiting for Investor's vote
  • call::investor_vote

    • This vote is managed by the democracy-pallet
    • Only an investor can call this function
    • In case of unfavorable vote result, the negative vote answer is transmitted to the treasury's spending_proposal, which in turn will trigger the transfer of the deposit fee to the treasury.
    • In case of favorable outcome, the vote answer is still transmitted to the treasury's spending_proposal, which will trigger the return of the Deposit to the Seller.
@letodunc letodunc added the enhancement New feature or request label Jul 18, 2022
@letodunc letodunc added this to the M2 milestone Jul 18, 2022
@letodunc letodunc self-assigned this Jul 18, 2022
@ilhanu ilhanu mentioned this issue Jul 18, 2022
19 tasks
@ilhanu ilhanu moved this to In Progress in FS W3F milestones 5 Jul 18, 2022
@letodunc letodunc linked a pull request Aug 16, 2022 that will close this issue
@ndkazu ndkazu moved this from In Progress to ✅ Done in FS W3F milestones 5 Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant