A Community Vesting Contract

A vesting contract that solves the permanent banning problem.

Overview

Many groups within the Cardano community are planning initial token distributions requiring some form of vesting for their initial team members. Typically a group will develop, test, and distribute their own vesting contracts. Each contract must be audited and trusted. A very timely and costly process, leading to a steep entry into the system. It would be a great benefit to the entire community if there could be some standard vesting smart contract that satisfies all the needs of our modern world. Something that is trusted, open-sourced, audited, and the go-to-solution for many members in the Cardano community.

Why is this needed?

The vesting example driving this proposal stems from a real-life case where an arbitrary amount of users are vesting some allotted amount of tokens from their recent token distribution. Their agreement states that as long as a user works for the company they are allowed to vest. Years later a user leaves the company and must terminate their ability to vest in a decentralized and trustless manner. What vesting contract will allow a collective group of beneficiaries to remove a member of the group?

This problem and similar problems like it have been a source of discussion in many groups like NEWM, DripDropz, Adosia, and Tokhun. This is an indication that the community needs a solution for this problem. If a solution did exist it will have immediate usage. This dapp could have momentum within the community to become a community standard.

Current Solutions

The IOHK / Plutus Pioneer provided solutions and various public contracts from the community.

Proposed Solutions

The proposed solution is to combine tried and true Plutus pioneer vesting with an on-chain voting mechanism that allows anyone in the vesting group to propose a vote to change any vesting parameters, like the periodicity or beneficiaries, etc. The solution assumes there exists a treasury wallet or contract and some off-chain/on-chain means of communication such that other members could be notified about upcoming voting periods.

The goal is to have the vesting contract be a single contract with multiple endpoints. If fees or size becomes unwieldy then the solution will involve a set of contracts to help mitigate the issue. The contract will be fairly general so it can be accessible by as many users as possible. Any user will be able to start a vesting contract, redeem their tranche, leave the contract, propose a vote, and participate in a vote. The contract will also have the option and ability to revert to more classic style vesting.

Logical Flow Charts

Project Specifications

  • A user must have the ability to start a vesting contract with full customizability.

    • Current branches of the repo allow for a lot of functionality within the datum values.

    • Some of the initial information must be known before the start of the vesting contract.

      • There is public key information that is required.

  • A user must be able to redeem from the vesting contract.

    • Simple vesting applies here. No needed changes with respect to the current open-source solutions in the community.

  • A user must be able to leave the vesting contract.

    • Whether solo or with a group, a user must have the ability to prematurely end their vesting contract.

      • A fairly simple implementation is required for this and it doesn't require voting.

  • A user must be able to start a vote within their vesting group.

    • Some form of communication is required.

    • Any variable inside the vesting datum can be voted upon by the group.

    • Voting has options to determine which decision rule is enforced, i.e majority, etc.

    • Starting a vote is done in a decentralized and trustless manner.

  • A user must be able to participate in an ongoing vote.

    • Some form of communication is required.

    • A user can only vote with the correct data type, i.e. agreement is boolean, lovelaces are integers or similar things.

    • Voting is simply agreeing to change the datum value.

    • The voting period is defined in the initial parameters.

    • Votes can always be changed up until the voting deadline.

    • Votes made after the voting period do not count.

Goals

Depending on the status of the PAB:

The project's goal is to have

  • A complete end-to-end vesting dapp that follows the specifications defined in the project specifications as closely as possible.

  • A well-written guide and FAQ for using the dapp in practice.

  • At least 3 different groups use the vesting dapp for their vesting requirements.

  • Eventually getting professional third-party auditing of the vesting contract.

Timeline

This proposal is attempting to solve an ongoing problem within vesting contracts. The work has already started. Below is a non-ordered list of events that will happen or are currently ongoing. As the project moves forward a more typical timeline will come into view as a lot of this development is dependent upon the full release of PAB.

  • The initial solutions to this problem will be PAB emulator-focused until we get some releases towards a full PAB.

  • The project will be open-source from the beginning, meaning anyone can contribute or fork whenever they feel.

  • Every aspect of this project will have a flow chart mapping out each function with respect to the project's specifications.

  • Every aspect of this project that can be formally tested will be tested.

  • The project must be done by May 2022.

  • After project completion, the vesting contract will surge in popularity.

KPIs

Early KPIs will be mainly focused on GitHub, committing, and releases. This is a well-defined contract and allows a unique opportunity to track progress by individual component completion. With the upcoming updates to PAB, the community may be able to test the contract themselves, allowing for new KPIs to be created during development.

After the project is complete, all KPIs will focus on user use cases and community involvement.

Funding

The project is asking for 10000 USD to help pay for development costs. This type of project is well defined and is a low-risk high-reward situation. It will be completed within 3 months after the initial Fund7 funding which is approximately May 2022.

Summary

This proposal is perfect for the low-budget dapp challenge. It has clear goals and is very obtainable. This project will allow members in the community to vest inside smart contracts that will become the standard in the ecosystem. This proposal solves a problem that will result in immediate usage. It will be something that is trusted, open-sourced, audited, and the premier go-to solution for many members of the Cardano community.

Last updated