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

BSIP62: Close short position (i.e. manual margin call) #156

Closed
sschiessl-bcp opened this issue Mar 28, 2019 · 16 comments
Closed

BSIP62: Close short position (i.e. manual margin call) #156

sschiessl-bcp opened this issue Mar 28, 2019 · 16 comments
Labels

Comments

@sschiessl-bcp
Copy link
Collaborator

sschiessl-bcp commented Mar 28, 2019

BSIP: 0062
Title: Close short position (i.e. manual margin call)
Authors:
  Stefan Schießl <stefan.schiessl@blockchainprojectsbv.com>
Contributors and Reviewers:
  Jerry Liu bitcrab@qq.com
Status: Draft
Type: Protocol
Created: 2019-03-28
Discussion: https://bitsharestalk.org/index.php?topic=28211.0
Worker: Unpaid

Abstract

Closing a short position comes with a risk of getting margin called if no spare funds are available to buy the long and reduce the debt to zero. This BSIP introduces a way to put the short position directly on the market.

Rationale

Closing a short position with a healthy CR should come with no risk of getting margin called.

Specification

Introduce a way that triggers something similar to a margin call. The user defines:

  • amount of short to sell
  • price of short/long

The price must be restricted such that the CR is not reduced when orders are matched against it. The order must appear as a normal order on the order book and not as a margin call. If the position is in a state of being margin called, this manual margin call will remain alongside the margin call.

This can be done by adding optional parameters to the update of a short position, or by addition of a new operation that activates the manual margin call (and deactivates on setting amount to 0)

Discussion and Summary for Shareholders

Reducing the risk of a margin call is favorable for the network and the position holder, while there is no risk for the market or long holders in allowing to put the position on the market.

References

@sschiessl-bcp
Copy link
Collaborator Author

Question:

Include in update of short position, or extra operation?

@abitmore
Copy link
Member

Also see #129.

@sschiessl-bcp
Copy link
Collaborator Author

Also see #129.

Adjusted the text to include the idea there.

@bitcrab
Copy link
Contributor

bitcrab commented Mar 28, 2019

it's easy to ensure that the CR is not reduced with close short orders by limiting the selling price >margin call price/MCR.

how to coordinate this close short logic with the margin call logic?
in my view the margin call logic should take high priority, means if a position is margin called with "close short" orders, all the close short orders should be deleted and then the margin called orders will be placed.

if necessary(although not very necessary in my view) maybe we can introduce independent MSSR for each position, however independent MSSR should be equal or greater than global MSSR.

how to coordinate this close short logic with adjusting position?
seems some pre check is necessary, the updated position should have more collateral than in the close short orders and the close short orders price should >updated margin call price/MCR.

@froooze
Copy link

froooze commented May 20, 2019

Is this not related to #167 ?

@bitcrab
Copy link
Contributor

bitcrab commented Aug 8, 2019

I feel the title should be "close long positions", right? when one hold a debt position he is holding a long position of BTS, right?

@pmconrad
Copy link
Contributor

pmconrad commented Aug 9, 2019

He is short in the debt asset. He may be long in BTS at the same time, but that is irrelevant. (He could have sold the BTS on a CEX for example.)

@bitcrab
Copy link
Contributor

bitcrab commented Aug 16, 2019

smartcoin is stablecoin, when we do BTS/stablecoin trading, it's reasonable to tell long or short BTS, it's wired to tell long or short stablecoin.

@abitmore
Copy link
Member

I think using the term "debt position" is better. MPA is not only for stable coins.

@bitcrab
Copy link
Contributor

bitcrab commented Sep 12, 2019

hope this can be pushed forward and included in the next HF, as the logic is clear and will greatly help the smartcoin ecosystem.

@abitmore
Copy link
Member

The specification needs to be more detailed.

@bitcrab
Copy link
Contributor

bitcrab commented Sep 13, 2019

updated specitication, not sure whether it is detailed enough, seems more detailed specification should come from developer?

Specification

Introduce a way that user can directly place orders to sell collaterals in a debt position, and the got smartcoins will be used to reduce debt automatically.

User need to define the amount and price while placing the sell orders, and the price should be greater or equal to margin call price/MCR, to ensure the deposit position CR will not be reduced after the filling of the sell orders.

When a debt position is margin called with close short orders, 2 ways are possible to handle this:
1.system delete all the close short orders and place margin call orders.
2.system define a logic to check whether the margin call conflict with the close short orders, if yes than delete all the close short orders and place margin call orders, if not just place margin call orders.

When user adjust the debt position, system will check whether the target debt position conflict with the close short orders, if yes than reject to adjust.

@abitmore
Copy link
Member

I think the feature described here is clear enough, although there are many corner cases to consider when implementing. Someone please create a PR?

@bitcrab
Copy link
Contributor

bitcrab commented Sep 14, 2019

done. #211

@shulthz
Copy link

shulthz commented Dec 18, 2019

If want BSIP62 to become really useful? It must charge the MCFR fees++Liquidity penalty 1%; #164

If someone want to use BSIP62, the system will charge the MCFR fees +Liquidity penalty 1% from the user;

These fees were very important.

@sschiessl-bcp
Copy link
Collaborator Author

sschiessl-bcp commented Jan 15, 2020

Voting outcome: Approved.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants