|
| 1 | +# Capacity Staking Rewards |
| 2 | + |
| 3 | +## Context and Scope: |
| 4 | +The Frequency Transaction Payment system uses Capacity to pay for certain transactions on chain. Accounts that wish to pay with FRQCY must: |
| 5 | +1. Have an [MSA](https://github.com/LibertyDSNP/frequency/blob/main/designdocs/accounts.md) |
| 6 | +2. Be a [Provider](https://github.com/LibertyDSNP/frequency/blob/main/designdocs/provider_registration.md) (see also [Provider Permissions and Grants](https://github.com/LibertyDSNP/frequency/blob/main/designdocs/provider_permissions.md) |
| 7 | +3. Stake token to receive [Capacity](https://github.com/LibertyDSNP/frequency/blob/main/designdocs/capacity.md). |
| 8 | + |
| 9 | +The proposed feature is a design for staking FRQCY token in exchange for Capacity and/or FRQCY. |
| 10 | +It consists of enhancements to the capacity pallet, needed traits and their implementations, and needed runtime configuration. |
| 11 | + |
| 12 | +[//]: # (A short description of the landscape in which the new system is being built, what is actually being built.) |
| 13 | +[//]: # (It may also say what is not being built, and any assumptions.) |
| 14 | +[//]: # (Example: The proposed feature is a testing library. The context is: the library is for our chosen blockchain. The scope is: this is for a specific repository, so it's not meant to be reused. That means it won't be a separate package, and the code will be tailored for this repo. One might also say that the scope is also limited to developer testing, so it's not meant to be used in CI or a test environment such as a test blockchain network.) |
| 15 | + |
| 16 | +## Problem Statement: |
| 17 | +To build a self-sustaining Frequency network, a variety of economic incentives are needed. One of these is the ability to stake token in return for something. |
| 18 | + |
| 19 | +[//]: # (The "why." A short summary of the issue(s) that this design solves. This doesn't have to be a technical problem, and it doesn't have to be a literal "problem." It could also be a necessary feature. "Developer unhappiness", "user experience needs improvement", are also problems.) |
| 20 | + |
| 21 | +## Goals |
| 22 | +* Outline the architecture for the implementation of staking rewards for Capacity. |
| 23 | +* Allow staking rewards to be adjusted without a chain upgrade. |
| 24 | + |
| 25 | +## Non-goals |
| 26 | +* This does not determine the actual amount of rewards - either in Capacity or FRQCY - for staking. |
| 27 | +* This does not account for other economic incentives on the Frequency network, such as collator rewards. |
| 28 | +* This design does not (and cannot) account for token price in any other currency. |
| 29 | +* It does not change how paying for transactions with Capacity works |
| 30 | + |
| 31 | +[//]: # (what this solution is trying to do, and is also not trying to do, in concrete terms. Measurable goals are best.) |
| 32 | +[//]: # (## Glossary (optional):) |
| 33 | +[//]: # (if you think inline links to concepts are too distracting, include a glossary section. This can be links, text or both.) |
| 34 | + |
| 35 | +## Proposal: |
| 36 | +Any Frequency account with a set minimum amount of FRQCY to may stake token to the network. |
| 37 | +On staking, the staker designates a type of staking, plus a target Provider to receive Capacity. |
| 38 | +There are two types of staking, **Maximized Rewards** and **Simple Rewards**. |
| 39 | +In both types, the staker designates a target Provider who receives capacity upon staking. |
| 40 | +The difference is: |
| 41 | + |
| 42 | +* With **Maximized Rewards**, the target Provider receives more Capacity than it would with Simple Rewards. |
| 43 | + The staker does not receive any token rewards. |
| 44 | +* With **Simple Rewards**, the target Provider shares rewards with the staker. |
| 45 | + The target Provider receives some Capacity, and the staker receives periodic rewards in FRQCY. |
| 46 | + |
| 47 | + |
| 48 | +[//]: # (A high level overview, followed by a detailed description.) |
| 49 | +[//]: # (This is where specific technology, such as language, frameworks, encryption algorithms, type of authentication, and APIs can be described.) |
| 50 | +[//]: # (It can include diagrams such as a system context diagram, or a sequence diagram.) |
| 51 | + |
| 52 | +## Benefits and Risks: |
| 53 | +### Benefit: stabilizing message costs |
| 54 | +Staking locks up token. Locked token may not be immediately withdrawn; this dampens some level of speculation-driven volatility as well as that driven by opportunistic Capacity purchases. |
| 55 | + |
| 56 | +### Benefit: engage and expand user base |
| 57 | +A Provider may, for example, airdrop tokens to users who meet certain criteria, such as referrals or sharing links on other platforms. Users with token may choose Simple Reward staking to generate Capacity for their Provider and also get token rewards. |
| 58 | + |
| 59 | +### Benefit: improved economic sustainability |
| 60 | +A staking reward system can improve /onboard/uptake/usage/... |
| 61 | + |
| 62 | +### Risk: Faulty reward calculations: |
| 63 | +* Maximized Stake for capacity is not cheaper per txn than pay-as-you-go with token |
| 64 | +* Maximized Stake for capacity pays better than staking to be a collator |
| 65 | + |
| 66 | +#### Mitigation: |
| 67 | +Adjust reward amounts. This is why the reward amounts need to be adjustable. |
| 68 | + |
| 69 | +[//]: # (the reasons why this solution was chosen, and the risks this solution poses.) |
| 70 | +[//]: # (For example, the solution may be very simple, but there could performance bottlenecks above a certain threshold.) |
| 71 | +[//]: # (Another: the solution is well known and widely used, but it's not a perfect fit and requires complicated changes in one area.) |
| 72 | + |
| 73 | +## Alternatives and Rationale: |
| 74 | +### 1. Providers simply purchase capacity without staking (locking token balance) |
| 75 | +### 2. Accounts stake only for token and/or to be collators |
| 76 | +### 3. Only Simple Rewards staking type |
| 77 | +### 4. ?? |
| 78 | + |
| 79 | +[//]: # (discuss alternatives that were considered, and why they were rejected.) |
| 80 | +[//]: # (Note when there are absolute requirements that the solution does not and can't meet. One example might be, it's a proprietary solution but we need something open source.) |
| 81 | + |
| 82 | +## Sources: |
| 83 | + |
| 84 | +[//]: # (sources of information that led to this design.) |
0 commit comments