Giter Site home page Giter Site logo

dxgovernance / dxvote Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 23.0 65.29 MB

Governance Dapp of DXdao

Home Page: https://dxvote.eth.limo

License: GNU Affero General Public License v3.0

Shell 0.43% JavaScript 1.86% HTML 0.46% TypeScript 97.16% Dockerfile 0.09%
blockchain dao dapp ethereum solidity web3

dxvote's People

Contributors

0xvangrim avatar adamazad avatar augustol avatar daveai avatar dcrescimbeni avatar hhamud avatar luchux avatar miltontulli avatar mprasanjith avatar rossneilson avatar tiagofneto avatar yalexis-eth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dxvote's Issues

Add quiet ending period back schemes

Add the quiet ending period in the dapp, this a configuration parameter that was skipped, this will create a new state in the proposals to be used.

Show history of actions that happened on each proposal

The user should be able to see a list of all actions that happened on the proposal, when it was created, when the states changed, who staked and how much to which decision, who voted and how much in which decision.

Improve proposal description edition

Right now the proposal description is submitted to ipfs when the proposal is created and sometimes it fails, this should be improved by allowing the user upload the proposal description doc to IPFS before submitting the proposal on chain, this way the user will be 100% sure that his proposal description is online when submitting the proposal.

So the user should be able to "upload to IPFS" and see a link to the uploaded document, where he can verify the content of the proposal that will be shown online.

In schemes view the table dissapears after clicking on it.

Describe the bug
When going to dxvote/#/info?view=schemes the table dissapears when you click on it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://augustol.github.io/dxvote/#/info?view=schemes
  2. Click anywhere in the table
  3. Table dissapears

Expected behavior
Nothing/Page stays the same

Screenshots
tableinfobug

Desktop (please complete the following information):

  • OS: Manjaro
  • Browser: Brave
  • Version: 1.23.71 Chromium: 90.0.4430.72 (Official Build) unknown (64-bit)

Additional context
None

DXdao Gov 1.x contracts

Describe the task that needs to be done
We need to have the smart contracts for Gov 1.x deployed in rinkeby and xdai or arbitrum.

Describe how you have considered doing it
When we believe the code is ready to be audited a deployment can be done in rinkeby and we can use those contracts while they go trough an audit and we can do another redeployment with the changes applied after audit.

Describe how do you expect to test the task resolution
This would be resolved when the audited smart contracts are deployed in rinkeby and another network like xdai or arbitrum.

Error 'Lock already being held for file : ipfs/repo.lock"

Describe the bug
When wanting to create proposal with quick wallet scheme if I deny the prompted transaction and attempt to make a new one this error will pop up once i click submit for the second time

To Reproduce
Steps to reproduce the behavior:

  1. Click 'New Proposal'
  2. Select quick wallet scheme and Input all fields like you would
  3. Click on submit proposal
  4. Then cancel the prompted transaction
  5. Click on submit again
  6. Error pops up

Expected behavior
When clicking on submit the second time it should prompt the transaction like before instead of showing error

Screenshots
Screenshot 2021-05-04 at 16 05 44

Desktop (please complete the following information):
-MAC OS

Smartphone (please complete the following information):

  • Browser [e.g. chrome]

Additional context
Add any other context about the problem here.

[Security] Potential Secret Leak

It has been noticed that while using anantaramdas/[email protected] your pinata-api-key 121008788ba8017a9a57 is present in plaintext. Please ensure that secrets are encrypted or not passed as plain text in github workflows.

Cannot submit signal proposal without a Call

I'm trying to submit a proposal on the new DXvote on rinkeby. My REP address has been mapped over and i was able to write text into the proposal. I wanted to try and test a 'signal proposal' but when i go to press submit, there is no metamask prompt to confirm the transaction.

It would be great to have a way to submit a proposal without requesting anything or a call
Screen Shot 2021-04-08 at 12 26 43 PM

Show transactions sent and their actions

Whenever a proposal is submitted, a vote sent or a stake is done the user should see that he has a transaction pending with an action and should be notified in the dapp when the action is executed successfully or not.

Config and User pages wrong redirection

Describe the bug
The config and user links in the navbar redirects to the worng path when I click on them

redirects to https://augustol.github.io/#/config and should be https://augustol.github.io/dxvote/#/config

To Reproduce
Steps to reproduce the behavior:

  1. Click on the user or config icon in the navbar
  2. The page breaks

Expected behavior
Should redirect to https://augustol.github.io/dxvote/#/config or https://augustol.github.io/dxvote/#/user/ADDRESS

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser Brave
  • Version 1.15.72 Chromium: 86.0.4240.75 (Official Build) (64-bit)

Do multiple stakes in one transaction

The user should be able to submit multiple stakes in one transaction, I guess the best way to do it would be to add another button next to stake that will add the stake to a "stake bundle" or something like that. The user will see a button in the navbar that will display all the stakes in the bundle and execute them all in one transaction.

Signed Votes

The user should be able to sign a vote a share it somehow with the rest of the users. This signed vote can later be executed by anyone in the voting machine.
The signed vote can be signaled, it has to be executed in the voting machine.
One of the possible ways of sharing a signed message across a distributed network is PSS messaging in bee protocol https://docs.ethswarm.org/docs/advanced/pss

Signal votes

The user should be able to signal a vote, this means that he will execute a very cheap transaction on chain that will register his decision on a proposal but it wont execute the vote in the voting machine. A signaled vote can be executed later by anyone in the voting machine.

v1.0 To Do List

  • Bugs:
    • Not allow voting on pending execution or when executed.
  • Technical Features:
    • Load scheme information from configuration files.
    • Load Scheme configurations indexed by hash from configuration files.
    • Allow addition of external services trough API keys.
    • Pin IPFS content using pinata api key.
    • Add cache file with votes, stakes, executed proposals, all actions that were executed that are immutable.
    • Decode proposals calls in proposal information page using etherscan api key.
    • Simulate decoded calls in proposal information page using tenderly api key.
    • Add permission layer to dxdao smart contracts.
    • Add devops documentation.
    • Import all contracts data and ABI from github.
  • UI Features:
    • Improve styles and app look.
    • Add scheme information page.
    • Add user information page.
    • Add app configuration page.
    • Show recommended calls like transfer ERC20 mint/burn rep in create proposal page.

Show Booster's Address

Is your feature request related to a problem? Please describe.
Feature request! I think there is a missing signal in the UI on proposals. It's easy to see who submitted a proposal and who voted for and against a proposal, but there is no place in Alchemy or DXvote (i think) to show the address of the account that boosted it. That way, a voter can see, "Oh Augusto boosted it, he probably tested it". This is no guarantee of course and all voters should do their own diligence but any signal is good.

Describe the solution you'd like
When you hover over the amounts staked on "For" or "Against", it shows the address(es) that boosted it.
Screen Shot 2021-04-15 at 3 09 29 PM

Describe alternatives you've considered
Or it could be displayed at the bottom of the proposal. Like "Boosted by 0x090"

Additional context
Definitely for 1.3/4/5 and not an immediate priority!

Stake DXD transaction Error (and vote error?)

Describe the bug
I went to boost this proposal
https://augustol.github.io/dxvote/#/scheme/0x200188373f1346c615089b8a880E64de2C0854eC/proposal/0xceb4535dea19c8dc63562e005c376e43ed21baceeb4b98688517e3bebcdac3e7
I was able to approve DXD for staking, but when I went to do the Staking transaction, my metamask prompt had an error in this. Here is the failed transaction:
https://rinkeby.etherscan.io/tx/0x3f32bf03285084732166d1f5c267ab336f965e2ee951f6e99ef084b0343b112e

This same thing happened when I tried to vote on the proposal too.
https://rinkeby.etherscan.io/tx/0x0412f02bd3d2f2704926bc58fddd56958f1c6c27080778a5d7635ea3db5c69f1

Screen shots below

To Reproduce
Steps to reproduce the behavior:

  1. Go to any proposal that can be boosted
  2. Approve DXD staking, confirm in metamask
  3. Click 'Stake' button
  4. See error in metamask prompt

Expected behavior
I wanted to stake on this proposal and vote on it because I think DXvote is the most decentralized voting interface

Screenshots
Screen Shot 2021-04-15 at 3 46 32 PM

Desktop (please complete the following information):

  • OS: Mac M1
  • Browser Firefox
  • Version 87.0

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

call function values should strip whitespace after commas

I seem to have found a pattern where I get "ERROR" (with no description) if the values I enter have spaces after the commans, but otherwise not.

Describe the solution you'd like
Strip whitespace around the commas

Describe alternatives you've considered
Alternative - require quotes

Additional context
I may be wrong as I didn't try too many times.

Pagination in proposals table

The proposals table should show a maximum number of proposals per page.

To Reproduce
Create a lot of proposals in development and see that there is no pagination.

Expected behavior
Show 10 proposals per page.

To solve and test
Add lot more of proposals creation and execution in the development script, the more proposals the better, maybe lets have something like +30 different proposals?

Add cache file with votes, stakes, executed proposals, all actions that were executed that are immutable

This is a very important feature!

There is information and data that we know that wont change, this are proposals that were executed and votes and staking that were already done. We dont need to query that information from the blockchain every time if we have a source of truth that we can trust. This will incrase a lot the dapp performance by querying only the necessary data.

We already have a tool that generates an snapshot of all the dxdao information and it creates a "dxdao database", we can identify the immutable data from this DB and use it in the dapp.

The first approach would be to place a .json file that will be updated regularly, lets say once a month on each new dxvote release.
This .json file will act as our immutable DB allowing us to query and navigate trough old proposals very fast :)

Allow addition of external services trough API keys

The main goal of the dapp is to be completely decentralzied and independant from other services, BUT we want to be able to use external services if possible.

The user needs to be able to add/remove API keys by service name, this API keys should be stored in the local storage of the dapp.

When the app runs in development the API keys should be loaded from .env variables, making it easier for developers to test.

This will be used for services like etherscan and tenderly.

Show history of actions done by the user.

The user should be able to see the actions done by any user when seeing the users page. It should show all the proposals creations, stakes, votes, redeems and executions. Ordered by date.

Automatic boost of proposals in DXDVotingMachine

Problem
The voting machine smart contract that we are using requires to call the _execute function to pass a proposal form the preBoosted to the boosted state, this action should happen next time a proposal is voted once that past the boost time threshold or when is executed.

Solution
Make the necessary changes in the DXDVotingMachine smart contract to have the desired behaviour.

Additional context
DXDVotingMachine contract: https://github.com/AugustoL/dxdao-contracts/blob/dxdao-contracts/contracts/dxdao/DXDVotingMachine.sol

When starting New Proposal, we should set some key parameters (most common scenario)

Is your feature request related to a problem? Please describe.
Not a problem. But QuickWalletScheme is prob most common use. It defaults to "RegisterWalletScheme". Prob not ideal. Also, I start to create some content, and then realize i didn't have correct Template. So I change Template, and lose all my content.

Describe the solution you'd like
Set default to most common use. Also warn people they will lose their content is changing templates. Or make them choose a template early in the process. So they can't mess up.

Describe alternatives you've considered
Saving drafts would be cool. As long as it doesn't get too cluttered.

Additional context
Already informed @AugustoL about this idea

DXvote on Arbitrum

Deploy dxdao gov 1.x contracts in arbitrum network.

The deployment can be done running the deployment script in dxdao-contracts, it will likely need some code changes. Then the arbitrum network needs to be added in the dxvote dapp and use the deployed contracts.

This task will be resolved when proposals are created voted and staked over the arbitrum network.

Add devops documentation

Improve overall documentation of the dapp, describe how the developer operations works and dapp development process, to make it easier for developers to contribute.

When Creating Proposal, it's getting hung on "Uploading to IPFS"

Describe the bug
When Creating Proposal, it's getting hung on "Uploading to IPFS"

To Reproduce
Steps to reproduce the behavior:

  1. Go to "+New Proposal"
  2. Click on Fill out details
  3. Click "Upload to IPFS"
  4. See how it get's hung up. Keeps trying, but nothing. Tried multiple times.

Expected behavior
I expect it to move to the next step of being able to do on chain txn.

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Brave
  • Version: Version 1.19.92 Chromium: 88.0.4324.152 (Official Build) (x86_64)

Additional context
Informed @AugustoL of this issue over Keybase already for informational reasons

Note: Love this "Submit Issue" process. Every DXdao product needs this same feature. PLEASE!!! Great work and idea.

Do multiple votes in one transaction

The user should be able to submit multiple votes in one transaction, I guess the best way to do it would be to add another button next to vote that will add the vote to a "voting bundle" or something like that. The user will see a button in the navbar that will display all the votes in the bundle and execute them all in one transaction.

Load scheme information from configuration files

Right now the schemes are deployed and loaded based on hardcoded configuration and parameters form the scripts, it would be good to have a .json file with all the information needed for deployment in a single file.
The file can also be used to load schemes configurations in the dapp.

Each configuration is hashed and stored/indexed by hash in the voting machine.

So the scheme configurations file will have an array of configurations that will be read from a .json file, and we used them based on their hash.

Add option for pinata api key

The user should be able to add his pinata API key, allowing him to pin his content and even important DXdao files to his pinata account.

Add app configuration page

Add a page where we can see and update the dapp configuration, this is where the API keys should be handled.

Requried a minimum amount of REP to vote in favor of executing boosted proposals

Problem
The genesis protocol machine that we are using allows any the execution of any boosted proposal with any amount of positive votes, this means that if a boosted proposal reach the execution time with 1 REP it will be executed. We have been talking about this and we considered this a problem, we need to be able to set up a mimum amount of positive votes required for a proposal to be executed.

Solution
Modify the configuration parameter in the voting machine contract called queuedVoteRequiredPercentage to be an array of uints, having in the first index the queuedVoteRequiredPercentage and in the second index the boostedVoteRequiredPercentage.

Every time a boosted proposal will be executed the amount of % in prositive votes needs to be higher than boostedVoteRequiredPercentage

Additional context
DXDVotingMachine contract: https://github.com/AugustoL/dxdao-contracts/blob/dxdao-contracts/contracts/dxdao/DXDVotingMachine.sol

IPFS content getting lost

Describe the bug
After some time, lets say.. 48hs? The body of the proposal is not being loaded form IPFS, I guess it needs to be pinned somewhere in order to be kept alive in the ipfs network.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://augustol.github.io/dxvote/#/scheme/0x01DD430f1C4f4aA1300309Bcc0C5C66Ab59259bA/proposal/0x95a51d34c3541b0fbf3d94036766f2b47c40919896a178b65c1998a9718a49cb
  2. After opening the console I see the description hash of the proposal is e30101701220def6340da821ad09f60720c29fa60a22d3e5f4133756af6194f356602fa70d44
  3. If I decode the content hash in https://content-hash.surge.sh/ I get an IPFS record https://gateway.ipfs.io/ipfs/QmdLzxk9C4V4vYFupCFrQBTFUhxFfvUjiRx8tyVq6yyy5V/
  4. The content is not there.

Expected behavior
I expect the proposal to load the description of the proposal from IPFS.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser Brave
  • Version 1.15.72 Chromium: 86.0.4240.75 (Official Build) (64-bit)

template dropdown filtering

Template dropdown seems chosen independently of the scheme chosen but I'm guessing they're only appropriate for certain schemes.

Describe the solution you'd like
A filtered Template dropdown for the chosen scheme.

Describe alternatives you've considered
I could be wrong and maybe all templates are appropriate in all schemes.

Submitted Proposal does not return to DXvote home

Describe the bug
I created this proposal: https://augustol.github.io/dxvote/#/scheme/0x200188373f1346c615089b8a880E64de2C0854eC/proposal/0xceb4535dea19c8dc63562e005c376e43ed21baceeb4b98688517e3bebcdac3e7
but when I pressed submit and confirmed the tx on my metamask, i was still on the 'proposal submission' page, even after the tx had confirmed. I feel like it should take me back to the list of proposals after I've submitted the tx?

To Reproduce
Steps to reproduce the behavior:

  1. Go to DXvote
  2. Click on + 'New Proposal'
  3. Create your proposal!
  4. Press submit
  5. And wait...

Expected behavior
After I pressed submit and confirmed the tx on metamask, I expected to be taken back to the home page and list of proposals. Or just closing the proposal page or maybe even some confirmation

Screenshots
Just stuck here:
Screen Shot 2021-04-15 at 3 20 12 PM

Desktop (please complete the following information):

  • OS: Mac M1
  • Browser Firefox
  • Version 87.0

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.