Skip to content

Commit

Permalink
Masterchef estaking docs update (#633)
Browse files Browse the repository at this point in the history
* add diagram and more text for masterhef and estaking

* update diagram image

* image direct display
  • Loading branch information
jelysn authored Jun 28, 2024
1 parent 5fda96c commit e0da1dc
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
8 changes: 8 additions & 0 deletions x/estaking/spec/01_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ order: 1
# Concepts

The `estaking` module in the Elys Network extends basic staking capabilities, providing additional functionalities such as managing and distributing rewards from multiple validators, updating staking parameters, and handling Eden and EdenB token mechanics in relation to staking rewards. This module aims to enhance the staking experience and efficiency within the network.

## Flow

`estaking` is a wrapper module of `staking` module to consider `Eden/EdenB` committed tokens in commitment module as virtual delegation to reuse `distribution` module for reward distribution to `Eden/EdenB` commit users.

`estaking` module inherits `staking` module functions and add `Eden` and `EdenB` virtual validators and `Eden/EdenB` virtual delegations.

`distribution` module considers `estaking` as `staking` module and distribute rewards based on `estaking` module's `delegation`.
4 changes: 4 additions & 0 deletions x/estaking/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ The `estaking` module in the Elys Network is designed to extend basic staking fu
- **Token Mechanics**: Handle Eden and EdenB tokens in relation to staking rewards effectively.

For more detailed information, please refer to the individual sections listed in the contents above.

## Diagram

![Estaking diagram](estaking_diagram.png)
Binary file added x/estaking/spec/estaking_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion x/masterchef/spec/01_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ The source of rewards are from `Eden` allocation, `DEX revenue` (USDC) and `Gas
## Flow

1. Allocation of eden in based on tokenmics module which is capped allocation of eden for 50% Apr (Note: multiplier is applied on APR cap, e.g. if multiplier is 1.5 cap's increased to 75% APR)
2. Every block, gas and swap fee rewards are distributed to liquidity providers
2. Every block, gas and swap fee rewards are distributed to liquidity providers - liquidity provider tokens are all locked in `commitment` module as part of liquidity addition and reward calculation's done based on committed lp tokens in `commitment` module.
3. Reward is splitted based on proxy TVL which is `TVL * multiplier` (USDC stable pool's included as one of pools with lower multiplier)
18 changes: 12 additions & 6 deletions x/masterchef/spec/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# masterchef module

## Contents

1. **[Concepts](01_concepts.md)**
2. **[State](02_state.md)**
3. **[Keeper](03_keeper.md)**
4. **[Endpoints](04_endpoints.md)**
5. **[CLI](05_cli.md)**

## Overview

The `Masterchef` module in the Elys Network is designed to manage liquidity provider (LP) rewards and external incentives. It provides functionalities for tracking LP rewards, distributing external incentives, and updating staking parameters dynamically. The module aims to enhance the efficiency and fairness of reward distribution within the network.

## Key Features
Expand All @@ -8,10 +18,6 @@ The `Masterchef` module in the Elys Network is designed to manage liquidity prov
- **External Incentives**: Handle external incentives and distribute them to specified pools within the defined block range.
- **Dynamic Parameter Updates**: Update and manage staking parameters dynamically.

## Contents
## Diagram

1. **[Concepts](01_concepts.md)**
2. **[State](02_state.md)**
3. **[Keeper](03_keeper.md)**
4. **[Endpoints](04_endpoints.md)**
5. **[CLI](05_cli.md)**
![Masterchef diagram](masterchef_diagram.png)
Binary file added x/masterchef/spec/masterchef_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e0da1dc

Please sign in to comment.