Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BEP-6: Add delist proposal #6

Merged
merged 7 commits into from
Jun 6, 2019
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions BEP6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# BEP-6: Delist Trading Pairs

abelliumnt marked this conversation as resolved.
Show resolved Hide resolved
## 1. Summary

This BEP describes a proposal for delisting trading pairs on the Binance Chain.
abelliumnt marked this conversation as resolved.
Show resolved Hide resolved

## 2. Abstract

Currently, we already have listing proposal to list new trading pairs. However, we can't delist any trading pairs now. Suppose a token has very bad reputation or one of its trading pairs has little trading volume for a long time, then the community might consider to remove related trading paris. BIP-5 proposal just provides the community a method to delist the unwanted trading pairs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paris - typo


## 3. Status

This BEP is R4R.

## 4. Motivation

To accelerate dex TPS and make the community healthier, some tokens with bad reputations or some trading pairs have very little trading volume should be removed.

## 5. Specification

### 5.1 `DelistTradingPair` proposal

**Msg Parameters**:

| | Type | Description |
| --------------- | --------------- | -------------------- |
| Title | string | Title of the proposal |
| Description | string | Description of the proposal |
| ProposalType | ProposalKind | Type of proposal |
| Proposer | Bech32_address | Address of the proposer |
| InitialDeposit | Coins | Initial deposit paid by sender. Must be strictly positive. |
| VotingPeriod | int | Length of the voting period |

Parameters to specify which trading pair to delist and why to do this.

| | Type | Description | json field |
| ------------------- | -------- | -------------------- | ---------- |
| BaseAssetSymbol | string | base asset symbol | base_asset_symbol |
| QuoteAssetSymbol | string | quote asset symbol | quote_asset_symbol|
| Justification | string | the reason to delist trading pair | justification|

The above data structures will be json marshaled to string and assigned to proposal `Description` field.

### 5.2 Delist trading pairs and expire all orders in breathe block
We assume that the ideal proposal life cycle is like this:
```
+-----------------+ +----------------+ +---------------+ +--------------------+ +--------+
| | | deposit period | | voting period | | cooling-off period | | |
| | | +--------+ | | +-----------+ | | +--------+ | | |
| Submit proposal | <---> | | 2 days | | <----> | | less than | | <----> | | 3 days | | <---> | delist |
| | | +--------+ | | | 14 days | | | +--------+ | | |
| | | | | +-----------+ | | | | |
+-----------------+ +----------------+ +---------------+ +--------------------+ +--------+
```
If a `DelistTradingPair` proposal is passed, and its passed time is 3 day before the breathe block time, then a delist operation will be triggered.

When a trading pair is delisted, all related uncompleted orders will be expired. The locked tokens in the orders will be refunded to users and fee will be charged as normal expire orders.

### 5.3 Delist dependency

In binance chain, all listed tokens must be listed against `BNB` first. Suppose there are three tokens on binance chain: `A`, `B` and `BNB`, and there only one trading pair: `A_BNB`. If someone want to create a new trading pair: `A_B`, then he must create another trading pair first: `B_BNB`. This is the dependency example between different trading pairs.

In conclusion, a non-`BNB` trading pair `A_B` will depend on two other trading pairs: `A_BNB` and `B_BNB`, and any non-`BNB` trading pairs won't be the dependency of other trading pairs. A `BNB` related trading pair might be the dependency of other trading pairs.

So we can delist any non-`BNB` related trading pairs directly. However, if you want to delist a `BNB` related trading pair, you must check if there are other trading pairs which depend on it. If so, you must delist these trading pairs first.

## 6. License

The content is licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/).