aragon / nest

A grants program to support the development of the ecosystem
https://aragon.org/project/grants
Creative Commons Zero v1.0 Universal
140 stars 78 forks source link

SVRP, VRP, and On-Chain Verification VRP Implementation #152

Closed amitrovich closed 5 years ago

amitrovich commented 5 years ago

Aragon Nest Proposal: SVRP, VRP, and On-Chain Verification VRP Implementation

Abstract

This proposal is based on Aragon SVRP blog post and SVRP Smart Contracts POC. We are proposing to continue the work done by Aragon's team. Therefore scope, deliverables, timelines and costs are subject to discussions with them and can be changed.

Voting Relay Protocols aim to make voting on blockchain more efficient in terms of gas. Without compromising the principle of trustless trust, it allows to aggregate hundreds of votes into one transaction and improve efficiency of voting by at least one order of magnitude.

Proposal is to implement SVRP, VRP, as well as alternative VRP protocol with on-chain signature verification and aggregation.

On-Chain aggregation and signature verification VRP requires more gas to submit votes, but at the same time this protocol is simpler in terms of challenging the actions of Relayer and may be more efficient if the full scope of voting process is taken in consideration. Challenging process can be made shorter, which will allow making end to end voting process shorter for quick decisions.

Deliverables

Smart contracts for full VRP and on-chain VRP.

Aragon App that allows to use each of VRP protocols for voting. Delivered in several stages:

Stage 1: Basic SVRP app that allows to:

Stage 2: Full VRP app. Differences from SVRP:

Stage 3: On-chain VRP. Differences from SVRP and VRP:

Grant size

Funding: $96k, $12k monthly upon deliverables

Success reward: 30k ANT, given out when all deliverables are ready.

Application requirements

Early POC of on-chain aggregation and signature verification VRP smart contract is available at this UseTech github repository.

Smart contracts, as well as Aragon UI App should allow:

  1. Creating vote and designating relayer(s)
  2. Depositing relayer collateral
  3. Voting, getting voters receipts
  4. Submitting batches to voting contract
  5. Challenging challengeables (batch aggregation, duplicate votes, missing votes, etc.)
  6. Clearing challenges (by Relayer)
  7. Slashing Relayers
  8. Unlocking and withdrawing Relayer collateral
  9. Displaying voting results
  10. Setting up and triggering vote on-chain actions (execute vote)

Development timeline

Stage 1 - SVRP

Timeframe Milestones
Month 1 Architecture and design
-- Open issues
-- Browser/wallet interaction for signing
-- Off-chain storage: Aragon IPFS server (https://hack.aragon.org/docs/guides-faq)
-- Oracles (as client independent autonomous background code) - Determine the need to create new or use existing Aragon infrastructure.
-- Deliverables:
-- Architecture and design documents
-- Aragon app and environment set up
-- Test run
Month 2 Prototype
-- New Components
-- - Relayer registration
-- - Vote Submission
-- - Vote Aggregation
-- - Message Signing
-- - Batch submission
-- - Oracle
-- - UI
-- - Challenging Relayer
-- Modify Existing Components
-- - Create Vote
-- - Vote
-- - Execute Vote
Month 3 Testing and bug fixing
Deliverable: SVRP Aragon App

Stage 2 - Full VRP

Time Frame Milestones
Month 1 Smart Contracts with Unit Tests
Month 2 Relayer Registration
-- Vote Submission
-- Vote Aggregation
-- Create Vote
-- Batch submission
-- - Oracle
-- - UI
-- Challenging Relayers
-- Voting
-- Executing Vote
Month 3 Testing
Deliverable: VRP Aragon App

Stage 3 - Alternative Voting Implementations

Time Frame Milestones
Month 1 Smart Contract
-- - On-chain aggregation
-- - Optimized implementation
-- Relayer Registration
-- Vote Submission
-- Vote Aggregation
-- Create Vote
Month 2 Batch submission
-- - Oracle
-- - UI
-- Challenging Relayers
-- Voting
-- Executing Vote
-- Testing
Deliverable: On chain VRP Aragon App
amitrovich commented 5 years ago

Forgot to list planned team for this: 1 Dev full time 1 Product Manager 20% 1 QA 30% 1 Architect 20%

amitrovich commented 5 years ago

@mariapao, just wondering what is the usual timeline to expect on your response, kindly advise. Thanks!

mariapao commented 5 years ago

@amitrovich we are in the process of reviewing the proposal, especially the PoC, and we will get back to you shortly!

amitrovich commented 5 years ago

Great, thank you!

LouisGrx commented 5 years ago

Hey there, thanks again for your interest in Nest and for you patience.

Here are a few additional questions/remarks

Can you explain what you mean by off-chain vs. on-chain VRP?

Looking forward to hearing more

amitrovich commented 5 years ago

@LouisGrx , Thanks for your review and interest.

  1. The plan is exactly to use the Aragon-made PoC and do the rest, that's what Stage 1 and Stage 2 would deliver - back end, front end, oracles... This is what we (very briefly) discussed with Jorge at Aracon, and is what you guys see as most valuable afaik.
  2. Month 1 - I kind of expected you to say that, just couldn't invest time in doing all that without some kind of confirmation that what we will do will be useful. What I propose we do next is for us to proceed with the architecture and design, and submit to you when done (hopefully by the end of June), with the details we are all looking for. This will be then a solid proposal with answers to all question you (and I) have.
  3. I agree it looks long, 2 reasons for that:
    • Besides the implementations of the SVRP and VRP, our proposal includes alternative voting implementations. This can be easily taken out of scope, or can be decided upon at a later date. We proposed it because we discussed this with several blockchain product companies we're working with, and they all need some alternative approaches - either very very cheap (the "offchain version) or completely trustless (the "onchain version"), and we have some good ideas on how they can work - PoC in our GitHub is a sample. These would be a low cost additions to what Aragon would offer (once SVRP and VRP are done, additional implementations are much quicker and easier), and would be a powerful addition. But that's completely up to you to decide if you want to include it or not. We put it forward mostly so that you can see a bit of what we can do, and since we don't really know each other, so that you can believe we know what is going on :)
    • When you take out the Architecture and Design, as well as the Alternative implementations, you get to 5 months. This estimate can and will be changed once we're done with Architecture and Design, I just don't like to over-promise and under-deliver. So yeah, conservative estimate. We will revise for the next version. Please confirm all this makes sense, we are very keen to do something like this (it has plenty of demand!), and we will proceed as outlined above. Cheers! AM
LouisGrx commented 5 years ago

Hey there,

Thanks a lot for the detailed answer and the motivation you are showing here, this is highly appreciated.

We thought about the proposal carefully and took the time to gather more feedback from Flock teams, including their preferred way to proceed with this. In spite of the very interesting proposal made here, we decided that we would keep developing this tech in-house for now..

We will close this proposal soon but in the meantime we remain available if you have questions. Of course, we'd love to keep seeing you around in the community.

amitrovich commented 5 years ago

Thanks! I was afraid you might want to do that in house, that's why we didn't want to go too much ahead of ourselves without getting your feedback :). It does make sense if you have people available to continue the work you have been doing. We would like very much to be a part of community, as we have some very good developers who can do great stuff. We've closed out a few "good first issues" for starts. Now we are looking for some meaningful work that we can do. Any directions on that would be appreciated.

LouisGrx commented 5 years ago

Thanks for your understanding!

We're actually in the process of scaling operations at the level of the Community Funding DAOdeployed here on mainnet. This community DAO is there to fund smaller (than Nest) pieces of work.

This is a great way to start working with the greater Aragon Network and maybe later ramp up to bigger grant programs. You can submit a proposal there following instructions discussed here, but otherwise if you don't have spontaneous proposals to come up with, I know that several Nest and Flock teams may put up bounties there in the near term.

If you are interested in being pinged once there are developer bounties there, definitely let us/me know and we'll be in touch.

(closing this proposal)

amitrovich commented 4 years ago

Hey @LouisGrx and @mariapao! I looked back at this and see no activity on your GIthub since this spring. Does it make sense to re-visit this topic?