# Counzil
## Pitch
A flexible application to create and manage a Decentralized Autonomous Organization (DAO), leveraging the capabilities of the Zcash blockchain for privacy and decentralization.
## Applicant Background
[Vergara Technologies](https://vergara.tech/) has been building applications that leverage the Zcash blockchain since 2022.
We are the creators of:
- [ZGo](https://zgo.cash/), the Zcash point-of-sale app
- [Zenith](https://vergara.tech/zenith), the full-node wallet for Zebra[^1].
- [Zcash-Haskell](https://vergara.tech/products/zcash-haskell.html), the Haskell library for interacting with Zcash.
## Opportunity
As the decentralization movement grows, governance of DAOs has relied on centralized platforms and public blockchains. The management of DAOs can be a sensitive matter and is a great use case for the privacy and selective disclosure provided by the Zcash blockchain.
## Proposed Solution
A desktop application that allows users to:
- Create and manage multiple DAOs, including managing membership
- Create, edit and review proposals
- Vote on proposals
- Maintain key information like membership, proposal submission and votes on-chain, using the Ironwood pool.
- Maintain supplemental information like proposal details and signatures.
## Technical Approach
Counzil is desktop application that leverages our Zenith wallet features to interact with the Zcash blockchain through a `zaino` server. Counzil shall have a local database to store the user's private keys, the DAO structure and the DAO's private keys if the user is the DAO manager.
Counzil shall store core DAO information on-chain and maintain supplemental information like proposal details and cryptographic signatures in IPFS.
### DAO Mechanics
Counzil is an implementation of the DAO management method proposed [here](https://hedgedoc.vergara.tech/s/dtiVMIqAb). Our app simplifies the process of creating and managing the necessary Zcash addresses and cryptographic keys needed to submit proposals and votes to the DAO.
#### Proposal submission
```sequence
Title: Counzil proposal submission
participant User as u
participant Counzil as c
participant IPFS as ipfs
participant Zcash as zcash
note over u: Writes proposal
u ->> c: saves proposal
note over c: Validates format
c ->> u: requests signature
u ->> c: signs proposal
c ->> ipfs: saves proposal
ipfs ->> c: proposal hash
c ->> ipfs: saves signature
ipfs ->> c: signature hash
c ->> zcash: records proposal on-chain
```
A user can submit a proposal if they are a current member of the DAO, and they do so by creating a proposal as a text document with a mandatory section showing the options up for a vote. Once this proposal is finalized, the user signs it and publishes it. Other users now can review the proposal.
#### Membership
A membership request is a special case of a proposal, in which an existing member of the DAO sponsors a new member. The proposal includes the prospective member's Zcash address and Counzil public key. Upon proposal approval, Counzil records the new member's Zcash address and public key on-chain with a reference to this approved proposal.
Membership can also be revoked by a proposal, creating a separate on-chain record with the revokation.
#### Voting
```sequence
Title: Counzil voting
participant User as u
participant Counzil as c
participant IPFS as ipfs
participant Zcash as zcash
c ->> zcash: Sync DAO accounts
zcash ->> c: Proposal memo
zcash ->> c: Membership memo
c ->> ipfs: Request proposal
ipfs ->> c: Proposal content
note over c: Validates proposal
c ->> u: Prompt for vote
u ->> c: Vote selection
note over c: Signs proposal
c ->> ipfs: Saves signature
ipfs ->> c: Signature hash
c ->> zcash: Records vote
```
Counzil reads the proposal memos recorded on-chain and uses that information to retrieve the proposal from IPFS and validate that the signature provided matches the sponsor of the proposal and confirms that the sponsor is a current member of the DAO. Counzil then prompts the user for their vote and records it on-chain, creating a digital signature of the proposal and storing it in IPFS.
## Execution Risks
- Significant changes to the `zaino` API can delay the implementaion of Counzil.
- Availability of `zaino` testnet instances can delay the implementation of Counzil.
## Unintended Consequences
- None identified.
## Budget
| Item | Estimate |
|------|---------:|
|Infrastructure | $2,000.00 |
|Development | $134,400.00 |
|**Total** | **$136,400.00** |
### Infrastructure
In order to support users of Counzil, we propose creating and maintaining our own new storage and Zcash blockchain infrastructure.
- Dedicated servers: $2,000.
- `zaino` server
- IPFS server
### Development
We are estimating 1,280 person-hours at $105/hour for a total development cost of $134,400.
## Schedule
- Milestone 1: $2,000.00 Start-up costs
- Milestone 2: Testnet Demo $30,000.00
- Milestone 3: Mainnet Release $104,400.00
[^1]: Zebra: https://zebra.zfnd.org/