From 8d30f12f3cf5bbec12c0227e0806f2fc64f9bfa6 Mon Sep 17 00:00:00 2001 From: Jack Hodgkinson <30505104+jhodgdev@users.noreply.github.com> Date: Mon, 7 Feb 2022 09:47:21 +0000 Subject: [PATCH] Replaced vesting contract docs with new treasury docs --- docs/tech-design/treasury.md | 33 +++++++++++++++++++++++++-- docs/tech-design/vesting.md | 44 ------------------------------------ 2 files changed, 31 insertions(+), 46 deletions(-) delete mode 100644 docs/tech-design/vesting.md diff --git a/docs/tech-design/treasury.md b/docs/tech-design/treasury.md index 719ff58..abd977a 100644 --- a/docs/tech-design/treasury.md +++ b/docs/tech-design/treasury.md @@ -2,9 +2,9 @@ | Specification | Implementation | Last revision | |:-----------:|:--------------:|:-------------:| -| WIP | WIP | v0.1 2022-01-26 | +| WIP | WIP | v0.1 2022-02-07 | -*** +--- **Specification ownership:** [Jack Hodgkinson] @@ -16,4 +16,33 @@ [Jack Hodgkinson]: https://github.com/jhodgdev +[Emily Martins]: https://github.com/emiflake + **Current Status**: + +Initial conceptual draft. Requires review from [Emily Martins]. + +--- + +Treasuries in Cardano governance systems serve two functions: + +1. To serve as a community reserve or wallet. +2. To allow users to redeem their allocated share of rewards. + +## Community reserve + +A decentralised autonomous organisation (DAO) may wish to source funds from its members to save for use at a later date. A treasury therefore serves as a form of 'community wallet', where members can contribute funds, knowing that they may only be released at the behest of the community. + +Treasuries are not, by default, limited to the reserve of a single token and are indeed able to hold any supported Cardano tokens. + +A treasury, as a community's reserves, will naturally need to interact with governance proposals. Indeed, the primary mechanism by which funds are able to be released by the treasury, will be the passing of an appropriate proposal. + +## Reward holder + +The treasury will further be the initial holder of all a governance system's GT. It is likely that any governance system will desire a method to distribute these GT through the community _over time_. The amount of GT a DAO member is eligible for at a given time can be termed that user's 'reward'. The specifics of any 'reward structure', namely: + +1. Who is eligible for rewards? +2. When may they receive those rewards? +3. How much do they receive in their reward? + +are all, naturally, protocol-specific. A simple method for creating such a bespoke reward structure is **not** considered in-scope for Agora v1. Agora v1 will offer a simple, prescribed reward structure, that allows the treasury to determine the reward eligibility of a user and allow them to redeem said amount. diff --git a/docs/tech-design/vesting.md b/docs/tech-design/vesting.md deleted file mode 100644 index f10ad04..0000000 --- a/docs/tech-design/vesting.md +++ /dev/null @@ -1,44 +0,0 @@ -# Vesting contract technical design - -| Specification | Implementation | Last revision | -|:-----------:|:--------------:|:-------------:| -| WIP | WIP | v0.1 2022-01-26 | - -*** - -**Specification ownership:** [Emily Martins] - -**Authors**: - -- [Emily Martins] -- [Jack Hodgkinson] - -**Implementation ownership:** [Emily Martins] - -[Jack Hodgkinson]: https://github.com/jhodgdev - -[Emily Martins]: https://github.com/emiflake - -**Current Status**: - -*** - -## Vesting contract - -In order to distribute governance tokens, one or more vesting contracts may be deployed. - -First and foremost, there is a _schedule_ for the distribution of said tokens. Alongside this schedule, we keep track of how much we've distributed so far. This allows us to calculate how much is "due" at any particular time. - -To gain intuition, you can think of it being implemented this way: - -```haskell -distributed :: Schedule -> Time -> Value -distributed schedule time = scanl (+) mempty schedule !! time - -due :: Schedule -> Value -> Time -> Value -due schedule alreadyDistributed time = distributed schedule time - alreadyDistributed -``` - -The vesting contract may require that only an address in a particular set can withdraw from it. - -The vesting contract may have an optional escape hatch for trusted authority to recover from a potential DAO operation.