Author Topic: BSIP70 "Lending for Margin Trading" Price discussion  (Read 9115 times)

0 Members and 1 Guest are viewing this topic.

Offline Crypto Kong

  • Full Member
  • ***
  • Posts: 109
    • View Profile
The problem I see with using last price is you could be called with not enough liquidity to pay back the loan.

If a liquidation price was used borrowers could be called at the earliest point to return maximum amount to lenders if liquidity dried up.

Having liquidation prices would also make spotting opportunities for market makers easy. They could see liquidation prices in a market far cheaper than on external markets and place orders to try and benefit from a liquidation. Liquidation prices would also deter users borrowing/ lending amounts larger than can be liquidated at a reasonable price.

Collateral and asset being lent should be priced the same as they are the same asset.





« Last Edit: June 20, 2019, 08:24:46 am by Crypto Kong »

Offline Crypto Kong

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Manipulation happens in all markets, you cant stop it. People are also stupid and want easy money, you cant change it. Limiting the availability of this feature or its usefulness to address either of these facts would be short sighted.

What we can do though is highlight risks involved and allow users to make their own decisions.

If someone tries to lend/ borrow a large amount relative to how liquid the market is, they can easily be warned.

Reducing features due to perceived potential market manipulation based on how liquid a market is, is naive. I could be the sole market maker, create a healthy liquid market, tricking the blockchain into thinking it's less risky because of the great liquidity but in reality I am the only market maker and pull my orders at any point.

The above could be done with 5 or 10 market makers working together so tell me... how does the chain determine risk? It cant. All we can do is advise and warn about potential scenarios.

Perhaps more market data/ information is needed to help users determine risk. Such as how many accounts are providing liquidity and how much each user is providing but even this can be gamed by using multiple accounts.

Anyway... I think we have moved slightly off topic and need to refocus on how price should be determined.
« Last Edit: June 20, 2019, 07:40:46 am by Crypto Kong »

Offline binggo

  • Hero Member
  • *****
  • Posts: 2374
  • 世间太多瘪犊子
    • View Profile
Which market pair the BSIP70 will be implemented? BTC/BITUSD(BITCNY)? EHT/BITUSD(BITCNY)?

'last price' is very dangerous,you will not want to use it.

Must reference Bitmex.

"Lending for Margin Trading" must have the people to maintenance it in time.
« Last Edit: June 20, 2019, 08:13:36 am by binggo »

Offline matle85

  • Full Member
  • ***
  • Posts: 148
    • View Profile
I am really excited about this. I do think there is a lot of pressure to get it right though as if it goes wrong people can lose a lot of money.

I tend to agree with using 'last price' but how vulnerable is this to manipulation even in quite liquid markets and could it lead to a big crash? I.e. someone dumps $1M USD because they are it will cause $10M in calls, that $10M gets dumped on the market and forces the price even lower causing more Longs to get liquidated. The person dumping $1M buys back in at a 20% profit or whatever.

How instant will the liquidations be? I know there has been some outrage on other platforms about flash spikes/crashes liquidating...if the price drops 20% in one trade and is back up withing 20 seconds will all those longs be out of the game?

Offline Crypto Kong

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Absolutely agree with George's comments above, great point about liquidity is relative to desired position size.

All mechanics of this bsip should focus only on the market in question, feeds for external prices should not be used for so many reasons.

Offline George_Bitspark

  • Full Member
  • ***
  • Posts: 61
  • Co-Founder and CEO of Bitspark
    • View Profile
    • Bitspark
Hi all,

BSIP70 "Lending for Margin Trading" is getting closer and there remains a few key points to address. One is important and warrants a thorough discussion is about how to determine 'the price' of the asset being lent relative to the collateral held and market price of the collateral vs the lent asset.

Firstly a lender defines the markets in which he is willing for the borrower to use his lent asset. Therefore the lender assumes risk and takes responsibility for the liquidity, pricing and legitimacy of those markets. The risk for the lender is he may not get back the amount lent in the case of a catastrophic collapse in price of the the lent asset vs the asset the borrower buys. Discussion on margin call mechanics aside (which I think was covered well in Github) the main point for community input now is on 'the price'- what is it, where is referenced to and the best method for insuring a robust pricing for these margin loans.

A price is required for many of the key operations required for BSIP70. You need a price to determine the collateral ratio of the borrowers collateral vs the the size of the loan. You need to monitor the price for a margin call event and you need to execute a limit order in the case of a margin call at some price in order buy back enough of the loan to repay the lender. An accurate price is needed in all these cases, we will call this a 'reference price'. Lets examine how similar lending and margin markets have existed on other platforms:

Bitfinex: Bitfinex has the most similar proposed margin trading and lending system to BSIP70. Bitfinex choose what markets can be used for lending so they limit the issue of exposure to illiquid markets. The Bitfinex price they use for the loans is based on the 'Last price' in that market. That means that the last executed trade represents the pricing of that asset pair. This is a simple and direct method of determining the price.

Bitmex: Bitmex, while not employing the same P2P CFD style of margin trading as BSIP70 still needs a price for their margin mechanisms. Bitmex use an external price feed of the bitcoin price relative to their self selected set of coins they list. They use multiple datapoints to ensure the robustness of their pricing feed based off the prices of several exchanges.

Other solutions: Perhaps a Middle price could be used which is = ((highest bid + lowest ask) / 2). However we would need to carefully think of the implications of this and how to game it. I have some initial thoughts but open to ideas here.

I think the best solution is just to use the last price for that particular market pairing, yes it is open to someone dumping price and forcing margin calls but the lender takes that into consideration when he allows his asset to be traded on that market knowing the risk is that he might not receive  what he lent in return. A conservative lender might only be willing to lend to high volume and liquidity markets to limit his risk of a giant margin call killing the last price. Also, even if this were the case, if I knew there was a market with a high chance of this happen this is an excellent opportunity for market makers. If there was alot of margin calls on one market I as a market maker would place bids 10% below market price knowing ill be able to scoop up cheap coins in the event of the margincall and sell them on another exchange for a price 10% higher using a cross exchange arb like via DEXbot.

What are the best methods in order to establish a reference price that is robust that you would like to see? Did I miss any potential implementations?

Logic/Concept - Support.

 3 things I might add/define better to this above, before it goes to reality:

1) Markets with no liquidity are a big no-no. Currently only liquid market on the entire blockchain seems to by BTS:BitCNY if we are to compare liquidity with Bitfinex, Bitmex or even Poloniex and take them as fine working example (they do provide these services for quite a while without problems).
2) For UIA price should still be determined by 3rd source and witnesses should be doing minimum 2 feeds for that contract. Marketplace gives Lender opportunity to rig the debt over the period of time since amount of return is in the same contract not related to any pair of it. If for example open.USDT or Spark.HKD, by 2 fiat sources against contracts used for lending.
3) bitshares-core software should determine on its base level of asset are markets liquid enough or not, not the Lender. e.g. bsip70_enable_marketminimum_volume = 500,000.00000 BTS


Anything else would be potential manipulation.

Chee®s

1. Firstly its up to the lender to set the markets you want to lend to, Bitshares is decentralised and everyone should be free to lend to whatever they want its not up to someone to decide what people can and cant do, in this case the lender assumes the risk if they allow a borrower to take their money.

Secondly "Liquidity" is only important when referenced to how much you are loaning. For example if the market cap of a particular coin is $10000 and you are loaning $1, just because the market cap is not high relative to Bitcoin, the fact you are lending a small amount does not present any high risk to that market and because the market cap is low it can actually be difficult to find lenders/traders willing to engage in that market. So I dont see this as a concern TBH.

2. Not sure what you mean here but lets address additional price feeds. If we require additional price feeds there are a few concerns:

A ) Whos going to provide them and for what coins?
B ) This is additional computational burden on the network and we dont have a large number of witnesses as it is
C ) Whos feed is correct? Will we use median values for a number of witnesses? Then we will also need to design new voting principles for price feeders for lending.
D ) Last but most importantly it limits who and what you can lend and trade. If there is no price feed its no longer possible to margin on that market. People should be free to lend some small cap coin for some other small cap coin without being dictated to what they can and cant do because a small set of 10 random people in the world dont want to provide feeds for their coin. This massively limits this BSIP to probably only 0.001% of Bitshares markets. We want to make this BSIP for anyone to be able to get leverage and earn a return on anything.

3. Volume is not a good indicator and easily faked. Also, for UIA markets one can easily trade 1 BTS for 1S**TCOIN @ price of $100000. Then execute 2 trades daily in order to get a volume of $200000 which magically enables them go margin on whatever. Whereas maybe there is a small cap coin with a real market but is below some artificial threshold which is honest, but is not able to get margin access because its not above some arbitrary value. Also it should not be up to core or some individuals to determine what you can trade or not. Also for UIA/UIA makets there is no BTS reference so not possible to get a BTS volume as benchmark even if there was it would not be representative of real BTS because UIA/UIA are easily faked whereas BTS/UIA actually requires someone to pay real value to exchange them.
Bitspark- Cash to Cryptocurrency

Offline Crypto Kong

  • Full Member
  • ***
  • Posts: 109
    • View Profile
I don't think "price" for calls etc should be determined from feeds and other external markets. "Price" should be determined from the market the loans relate to. Perhaps a full liquidisation of position could be used for price somehow. This price would reflect any lack of liquidity.

I also don't think any markets/ assets should be excluded from margin trading, if the market is illiquid lenders should price in the higher risk accordingly.

If bitshares core can determine illiquid markets, rather than blocking the feature it should warn users of the risk and suggest higher rates.
« Last Edit: June 20, 2019, 06:38:25 am by Crypto Kong »

Offline Digital Lucifer

  • Sr. Member
  • ****
  • Posts: 368
  • BitShares Maximalist & Venture Architect
    • View Profile
    • BitShares
  • BitShares: dls.cipher
  • GitHub: dls-cipher
wow ... bombastic proposal

??

Definition Bombastic: marked by or given to speech or writing that is given exaggerated importance by artificial or empty means

You think BSIP70 is exaggerated or lacking? Please let us know so we can improve it ;)

https://github.com/bitshares/bsips/issues/170#issuecomment-503525518
Milos (DL) Preocanin
Owner and manager of bitshares.org
Move Institute, Non-profit organization
RN: 2098555000
Murska Sobota, Slovenia.

Offline Digital Lucifer

  • Sr. Member
  • ****
  • Posts: 368
  • BitShares Maximalist & Venture Architect
    • View Profile
    • BitShares
  • BitShares: dls.cipher
  • GitHub: dls-cipher
Hi all,

BSIP70 "Lending for Margin Trading" is getting closer and there remains a few key points to address. One is important and warrants a thorough discussion is about how to determine 'the price' of the asset being lent relative to the collateral held and market price of the collateral vs the lent asset.

Firstly a lender defines the markets in which he is willing for the borrower to use his lent asset. Therefore the lender assumes risk and takes responsibility for the liquidity, pricing and legitimacy of those markets. The risk for the lender is he may not get back the amount lent in the case of a catastrophic collapse in price of the the lent asset vs the asset the borrower buys. Discussion on margin call mechanics aside (which I think was covered well in Github) the main point for community input now is on 'the price'- what is it, where is referenced to and the best method for insuring a robust pricing for these margin loans.

A price is required for many of the key operations required for BSIP70. You need a price to determine the collateral ratio of the borrowers collateral vs the the size of the loan. You need to monitor the price for a margin call event and you need to execute a limit order in the case of a margin call at some price in order buy back enough of the loan to repay the lender. An accurate price is needed in all these cases, we will call this a 'reference price'. Lets examine how similar lending and margin markets have existed on other platforms:

Bitfinex: Bitfinex has the most similar proposed margin trading and lending system to BSIP70. Bitfinex choose what markets can be used for lending so they limit the issue of exposure to illiquid markets. The Bitfinex price they use for the loans is based on the 'Last price' in that market. That means that the last executed trade represents the pricing of that asset pair. This is a simple and direct method of determining the price.

Bitmex: Bitmex, while not employing the same P2P CFD style of margin trading as BSIP70 still needs a price for their margin mechanisms. Bitmex use an external price feed of the bitcoin price relative to their self selected set of coins they list. They use multiple datapoints to ensure the robustness of their pricing feed based off the prices of several exchanges.

Other solutions: Perhaps a Middle price could be used which is = ((highest bid + lowest ask) / 2). However we would need to carefully think of the implications of this and how to game it. I have some initial thoughts but open to ideas here.

I think the best solution is just to use the last price for that particular market pairing, yes it is open to someone dumping price and forcing margin calls but the lender takes that into consideration when he allows his asset to be traded on that market knowing the risk is that he might not receive  what he lent in return. A conservative lender might only be willing to lend to high volume and liquidity markets to limit his risk of a giant margin call killing the last price. Also, even if this were the case, if I knew there was a market with a high chance of this happen this is an excellent opportunity for market makers. If there was alot of margin calls on one market I as a market maker would place bids 10% below market price knowing ill be able to scoop up cheap coins in the event of the margincall and sell them on another exchange for a price 10% higher using a cross exchange arb like via DEXbot.

What are the best methods in order to establish a reference price that is robust that you would like to see? Did I miss any potential implementations?

Logic/Concept - Support.

 3 things I might add/define better to this above, before it goes to reality:

1) Markets with no liquidity are a big no-no. Currently only liquid market on the entire blockchain seems to by BTS:BitCNY if we are to compare liquidity with Bitfinex, Bitmex or even Poloniex and take them as fine working example (they do provide these services for quite a while without problems).
2) For UIA price should still be determined by 3rd source and witnesses should be doing minimum 2 feeds for that contract. Marketplace gives Lender opportunity to rig the debt over the period of time since amount of return is in the same contract not related to any pair of it. If for example open.USDT or Spark.HKD, by 2 fiat sources against contracts used for lending.
3) bitshares-core software should determine on its base level of asset are markets liquid enough or not, not the Lender. e.g. bsip70_enable_marketminimum_volume = 500,000.00000 BTS


Anything else would be potential manipulation.

Chee®s
« Last Edit: June 20, 2019, 06:02:39 am by Digital Lucifer »
Milos (DL) Preocanin
Owner and manager of bitshares.org
Move Institute, Non-profit organization
RN: 2098555000
Murska Sobota, Slovenia.

Offline George_Bitspark

  • Full Member
  • ***
  • Posts: 61
  • Co-Founder and CEO of Bitspark
    • View Profile
    • Bitspark
wow ... bombastic proposal

??

Definition Bombastic: marked by or given to speech or writing that is given exaggerated importance by artificial or empty means

You think BSIP70 is exaggerated or lacking? Please let us know so we can improve it ;) 
Bitspark- Cash to Cryptocurrency

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline btstodamoon

  • Full Member
  • ***
  • Posts: 111
    • View Profile

Offline George_Bitspark

  • Full Member
  • ***
  • Posts: 61
  • Co-Founder and CEO of Bitspark
    • View Profile
    • Bitspark
Hi all,

BSIP70 "Lending for Margin Trading" is getting closer and there remains a few key points to address. One is important and warrants a thorough discussion is about how to determine 'the price' of the asset being lent relative to the collateral held and market price of the collateral vs the lent asset.

Firstly a lender defines the markets in which he is willing for the borrower to use his lent asset. Therefore the lender assumes risk and takes responsibility for the liquidity, pricing and legitimacy of those markets. The risk for the lender is he may not get back the amount lent in the case of a catastrophic collapse in price of the the lent asset vs the asset the borrower buys. Discussion on margin call mechanics aside (which I think was covered well in Github) the main point for community input now is on 'the price'- what is it, where is referenced to and the best method for insuring a robust pricing for these margin loans.

A price is required for many of the key operations required for BSIP70. You need a price to determine the collateral ratio of the borrowers collateral vs the the size of the loan. You need to monitor the price for a margin call event and you need to execute a limit order in the case of a margin call at some price in order buy back enough of the loan to repay the lender. An accurate price is needed in all these cases, we will call this a 'reference price'. Lets examine how similar lending and margin markets have existed on other platforms:

Bitfinex: Bitfinex has the most similar proposed margin trading and lending system to BSIP70. Bitfinex choose what markets can be used for lending so they limit the issue of exposure to illiquid markets. The Bitfinex price they use for the loans is based on the 'Last price' in that market. That means that the last executed trade represents the pricing of that asset pair. This is a simple and direct method of determining the price.

Bitmex: Bitmex, while not employing the same P2P CFD style of margin trading as BSIP70 still needs a price for their margin mechanisms. Bitmex use an external price feed of the bitcoin price relative to their self selected set of coins they list. They use multiple datapoints to ensure the robustness of their pricing feed based off the prices of several exchanges.

Other solutions: Perhaps a Middle price could be used which is = ((highest bid + lowest ask) / 2). However we would need to carefully think of the implications of this and how to game it. I have some initial thoughts but open to ideas here.

I think the best solution is just to use the last price for that particular market pairing, yes it is open to someone dumping price and forcing margin calls but the lender takes that into consideration when he allows his asset to be traded on that market knowing the risk is that he might not receive  what he lent in return. A conservative lender might only be willing to lend to high volume and liquidity markets to limit his risk of a giant margin call killing the last price. Also, even if this were the case, if I knew there was a market with a high chance of this happen this is an excellent opportunity for market makers. If there was alot of margin calls on one market I as a market maker would place bids 10% below market price knowing ill be able to scoop up cheap coins in the event of the margincall and sell them on another exchange for a price 10% higher using a cross exchange arb like via DEXbot.

What are the best methods in order to establish a reference price that is robust that you would like to see? Did I miss any potential implementations?
Bitspark- Cash to Cryptocurrency