Skip to content

Instantly share code, notes, and snippets.

@jmjatlanta
Created May 4, 2020 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmjatlanta/0b7a814f4494e8d989cd4aa45970597f to your computer and use it in GitHub Desktop.
Save jmjatlanta/0b7a814f4494e8d989cd4aa45970597f to your computer and use it in GitHub Desktop.
BSIP-0074
BSIP: 0074
Title: Margin Call Fee Ratio
Authors:
  Jerry Liu bitcrab@qq.com
Status: Draft
Type: Protocol
Created: 2019-09-07
Discussion: https://github.com/bitshares/bsips/issues/164
Worker: TBD

Abstract

This BSIP provides a solution to charge a fee for margin call trading.

Motivation

The BitShares community has become more and more aware that BTS need a powerful economic model. One simple selection is to charge for trading and use the accumulated fees to buy back BTS, as is done with many exchanges' platform tokens. The continuous income can help to provide smartcoin liquidity and sustain the price of BTS. Margin call trading has the potential to make a large contribution to the income of the system. However, up until now margin call trading is not charged for. We need to find a suitable way for this to add to the system's income.

Rationale

A margin call fee can be seen as a way to pay part of the cost for smartcoin supply and stabilization. It is unrelated to market fee sharing.

To ensure the debt positions can always be closed with suffcient smartcoin, it is more feasible to charge part of the traded collaterals as the fee, instead of the smartcoin.

As the margin call fee ratio may be obviously higher than market fee, the margin call orders should be placed at the actual price without margin call fee. This will avoid misleading the buyer.

Specification

Add one new parameter Margin Call Fee Ratio(MCFR) for each smartcoin, which is controlled by the smartcoin owner.

Case 1: In the case of the call order being the maker,

Margin call match price = settlement price/(MSSR-MCFR).

Here settlement price is a new parameter introduced as part of BSIP71. Note that settlement price = feed price when there is no bad debt.

When margin call trading happens with the call order as the maker, the buyer sells smartcoin with quantity X and get collaterals in quantity X*(MSSR-MCFR)/settlement price, the margin call order owner sells collaterals in quantity X*MSSR/settlement price and get smartcoin in quantity X, the delta in paid and received collaterals (quantity X*MCFR/settlement price) will be paid to the owner of the smartcoin as the margin call fee.

Case 2: In the case of the call order being the taker,

Margin call match price = settlement price/MSSR.

Note that MCFR does not come into play for order matching in this case, but it is involved in the calculation of collateral that is returned to the call order owner.

When margin call trading happens with the call order as the taker, the buyer sells smartcoin with quantity X and receives collateral in quantity X*MSSR/settlement price, the margin call order owner sells collateral in quantity X*(MSSR-MCFR)/settlement price and get smartcoin in quantity X, the delta in paid and received collaterals (quantity X*MCFR/settlement price) will be paid to the owner of the smartcoin as the margin call fee.

Copyright

This document is placed in the public domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment