Skip to content

Commit

Permalink
docs: updated docs for deactivation of liquidFarms
Browse files Browse the repository at this point in the history
  • Loading branch information
jeonghoyeo7 committed Aug 8, 2022
1 parent e013f4f commit 2a0545d
Show file tree
Hide file tree
Showing 36 changed files with 39 additions and 3 deletions.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added x/boost/abci.go
Empty file.
Empty file added x/boost/client/cli/query.go
Empty file.
Empty file added x/boost/client/cli/tx.go
Empty file.
Empty file added x/boost/handler.go
Empty file.
Empty file added x/boost/keeper/genesis.go
Empty file.
Empty file added x/boost/keeper/grpc_query.go
Empty file.
Empty file added x/boost/keeper/keeper.go
Empty file.
Empty file added x/boost/keeper/msg_server.go
Empty file.
Empty file added x/boost/module.go
Empty file.
Empty file added x/boost/spec/01_concepts.md
Empty file.
Empty file added x/boost/spec/02_state.md
Empty file.
Empty file.
Empty file added x/boost/spec/04_messages.md
Empty file.
Empty file added x/boost/spec/05_begin_block.md
Empty file.
Empty file added x/boost/spec/06_end_block.md
Empty file.
Empty file added x/boost/spec/07_hooks.md
Empty file.
Empty file added x/boost/spec/08_events.md
Empty file.
Empty file added x/boost/spec/09_params.md
Empty file.
Empty file added x/boost/types/codec.go
Empty file.
Empty file added x/boost/types/errors.go
Empty file.
Empty file added x/boost/types/events.go
Empty file.
Empty file added x/boost/types/genesis.go
Empty file.
Empty file added x/boost/types/keys.go
Empty file.
Empty file added x/boost/types/msgs.go
Empty file.
Empty file added x/boost/types/params.go
Empty file.
14 changes: 14 additions & 0 deletions x/liquidfarming/spec/01_concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,17 @@ Therefore, a bidder to place a bid for the auction should be aware of this uncer

A bidder can place a bid with the pool coin, which is the paying coin of the auction. A bidder only can place a single bid per auction of a liquid farm.
The bid amount of the pool coin must be higher than the current winning bid amount that is the highest bid amount of the auction. The bidder placing the bid with the highest amount of the pool coin becomes the winner of the auction and will takes all the accumulated rewards amount at the end of the auction.

## Activation of LiquidFarm

A `liquidFarm` is activated by addition of `liquidFarm` in the parameter by governance.
When a `liquidFarm` is activated, users can request to farm their pool coins and the `liquidfarming` module stakes the pool coins.

## Deactivation of LiquidFarm

A `liquidFarm` is deactivated by deletion of `liquidFarm` in the parameter by governance.
When a `liquidFarm` is deactivated, the `liquidfarming` module unstakes all pool coins from the farming module with the reserve module account.
The users cannot request to farm their pool coins, but users can still request to unfarm LF coins.
If a user has the request as `QueuedFarming`, the user needs to cancel the request to get the pool coins back.
In this case, the ongoing rewards auction becomes finished, all bids are refunded, and a new auction is not started.

6 changes: 6 additions & 0 deletions x/liquidfarming/spec/02_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

The `liquidfarming` module keeps track of the states of pool coins and LFCoins.

## LiquidFarms

```go
type LiquidFarms []LiquidFarm
```

## QueuedFarming

```go
Expand Down
16 changes: 16 additions & 0 deletions x/liquidfarming/spec/05_begin_block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- order: 5 -->

# Begin-Block

Begin block operations for the liquidfarming module synchronizes `liquidFarms` of the parameter and state.

## Addition of new liquidFarm

When a new liquidFarm is added in the parameter `LiquidFarms`, the new liquidFarm is also added in the state `LiquidFarms`.

## Deletion of liquidFarm

When a liquidFarm is deleted in the parameter `LiquidFarms`, the following opertions are done.
- Unstake all pool coins from the farming module with the reserve module account
- The ongoing auction status is set to `AUCTION_STATUS_FINISHED`.
- The new liquidFarm is also deleted in the state `LiquidFarms`.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- order: 5 -->
<!-- order: 6 -->

# Events

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- order: 6 -->
<!-- order: 7 -->

# Parameters

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- order: 7 -->
<!-- order: 8 -->

# Hooks

Expand Down

0 comments on commit 2a0545d

Please sign in to comment.