Author Topic: Proposal for liquidation of short sales  (Read 2937 times)

0 Members and 1 Guest are viewing this topic.

Offline theoretical

BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical

BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical

BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical

BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical

BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical


Now I will address the problem of short squeezes.  When the market price movements from block to block are small, the bid orders generated by forced liquidations of short positions are above the market, and relieve upward pressure on the price.  However, consider what happens when there is a large movement in the price, at least doubling from one block to the next -- perhaps caused by a single actor buying all the liquidity from the market.  A massive number of shorts will move into the red zone; their holders will be completely wiped out, and the high price will now be strongly supported -- any downward pressure will now have to break through all the bid orders generated by forced liquidations.

As a solution, I propose rate-limiting tracking price movements.  That is, compute TP_new = max(TP_prev * (1 + TP_maxdelta), (best_bid_prev + best_ask_prev) / 2).  I propose TP_maxdelta = 1 / 512.  Thus, large moves in the price (as represented by the best bid-ask average) will not result in immediate forced liquidation of most short positions.

As a side benefit to this rate-limiting, it becomes possible to compute the minimum number of blocks it will take for the tracking price to exceed a given threshold.

For example, let's suppose that some time ago, Alice shorted 1000 BitUSD at a price of 0.1 BTS/BitUSD.  The tracking price has since moved against Alice, and is now p0 = 0.13 BTS/BitUSD.  Alice currently has 35% equity.
She will be forced to liquidate when the tracking price reaches a value that results in her equity dropping to 25% or lower; the tracking price must be at least p1 = 0.15 BTS/BitUSD for Alice to be involuntarily liquidated.

Suppose the tracking price grows as fast as the rate limit allows:  Geometrically by a factor of (1 + TP_maxdelta) per block.  It cannot reach p1 until at least n blocks have passed, where

    n = ceil((log(p1) - log(p0)) / log(1 + TP_maxdelta))

In Alice's case, she's safe for at least 74 blocks, which is a little over six hours, assuming five minutes per block.
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical

Now I will discuss my ideas for the detailed mechanics for liquidation of short sales.

(Green Zone)  A short position is said to be "In the Green Zone" if it has at least 25% equity.  Green Zone short positions are not subject to involuntary liquidation.

(Yellow Zone)  The Yellow Zone consists of short positions with non-zero equity, but less equity than the Green Zone.  Yellow Zone short positions are subject to involuntary liquidation.

(Red Zone)  The Red Zone consists of short positions with zero or negative equity.  Red Zone short positions are subject to involuntary liquidation.  (If using Wipeout Elbow, negative equity is impossible.)

Note, the zone a given position is in depends on the Tracking Price.  Suppose Alice's position is in the Green Zone in the current block, based on the current tracking price.  If the tracking price rises in a later block, Alice's position may move into the Yellow or Red Zone.

In "normal" market conditions, poorly capitalized positions move into the Yellow Zone and are liquidated before they move into the Red Zone.  However, large movements in the tracking price within the space of a single block may cause positions to jump directly from the Green Zone to the Red Zone without an intervening stop in the Yellow Zone.

Wipeout Elbow and Strong Linearization give the same results in the Yellow Zone conditions, only the Red Zone handling is different.

The sequence of steps for liquidating shorts are as follows:

(1) The best bid and ask price for the previous block are used to determine the tracking price.

(2) For every position in the Red and Yellow Zone, a limit bid order is placed.  The order quantity is the size of the short position.  The equity less fee (elf) is the proportion of the proceeds to which the short holder is entitled, less liqfee = 5%, and is given by:

    elf = max(0, equity - liqfee)

The limit bid order's price is given by (1 - elf) * pie / quantity.

(3) Suppose some fraction z of this limit order is fulfilled.  Then BTS moves from the pie to the short position holder and the seller fulfilling the bid order.  The short holder gets elf * pie * z, and (1-elf) * pie * z goes to the seller.  The remaining money, pie * (1-z), goes back into the pie.
« Last Edit: February 28, 2014, 08:28:27 am by drltc »
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical


Single Short Example:  Bob places a Bid on BitUSD, offering to buy 1000 BitUSD at a price of 0.1 BTS/BitUSD; there are no takers immediately, so Bob's offer will remain on the order books until it expires.  Several blocks later, but before Bob's order has expired, Alice places a market short order for 1000 BitUSD.  Alice's and Bob's orders are matched and a trade is performed.  Bob's account is debited 100 BTS; Alice's account is debited enough to meet the Margin Requirement.  For a 2x margin requirement, this means Alice contributes 100 BTS; for a 10x margin requirement, this means Alice contributes 900 BTS.

Let us assume a 2x margin requirement.  Then the pie contains 200 BTS; 100 BTS each from Alice and Bob.  Alice's equity is 100 BTS or fifty percent.  Now consider the function f which describes Alice's equity
as a function of the tracking price.  By the Capitalization Principle, f(0.1 BTS/BitUSD) = 100 BTS.  By the Total Win Principle, f(0 BTS/BitUSD) = 200 BTS.  By the Weak Linearity of Short Position, f is linear until it reaches zero,
which happens at f(0.2 BTS/BitUSD) = 0 BTS.  In general, f(x) = 200 - 1000*x for x <= 0.2 BTS/BitUSD.  What happens when x > 0.2 BTS/BitUSD has not yet been specified, and is what much of the controversy is about.

The Slope is -1000 and the Wipeout Price is 0.2 BTS/BitUSD.

(Strong Linearization)  The function f(x) should be linear for all x.  This is Bytemaster's proposal.  That is, f(x) = 200 - 1000*x.

Bytemaster proposes to achieve strong linearization through increasing the margin requirement, or allowing printing of BTS to enlarge the pie.

(Wipeout Elbow)  I believe that Strong Linearization is unnecessary.  I think that simply setting f(x) = 0 for all x greater than or equal to the wipeout price is perfectly okay.  I call this the Wipeout Elbow.
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical


We'll deal with a single BitAsset, for convenience I will call it BitUSD, but this also applies to other BitAssets (e.g. BitGLD).  Each paragraph in the following is preceded by a term in parentheses; the goal of the paragraph is to define that term.

(Short Position)  Accounts can have positive or negative BitUSD balance.  A negative BitUSD balance is called a "short position."

(Short Sale)  A negative BitUSD balance can only be obtained through a short sale.  A "short sale" is a sale of BitUSD which results in a negative BitUSD balance in the seller's account.

(Market Price Lock)  A short sale can only occur by the fulfillment of a public Ask order (either market or limit order); thus, a short sale always occurs at the market price.  I call this the Market Price Lock.

(Collateral)  When a short sale occurs, "collateral" is set aside.  The collateral consists of the money the buyer used for the purchase (less fee), and some amount of the seller's money.

(Buyer Perspective Equivalence Principle)  From the buyer's point of view, there is no difference between buying from a short seller and buying from a long seller on the exchange.

(Pie)  The collateral is set aside into a container I'll call a Pie.  Each pie is tied to an account and a BitAsset.  So if Alice shorts BitUSD, and Charlie shorts BitUSD and BitGLD, there will be three pies:  Alice's BitUSD pie, Charlie's BitUSD pie, and Charlie's BitGLD pie.

(Margin Requirement)  The initial size of the pie divided by the buyer's contribution to the pie.  This is 2x in the BitShares whitepaper, but Bytemaster has proposed an increased margin requirement of 10x.

(Equity)  The piece of the pie that would be given to the attached account in a purely theoretical, "fair" unwinding of the short position.  Can be specified as either a percentage of the total pie, or a number.

(Total Win Principle)  When the Tracking Price of BitUSD is equal to zero, equity is one hundred percent.

(Weak Linearity of Short Position)  Equity decreases linearly as a function of Tracking Price, until reaching zero at the Wipeout Price.

(Tracking Price)  The price that is used to determine equity is called the Tracking Price.  I believe it is currently specified as the average of the best bid and the best ask, but am not 100% sure about that.

(Wipeout Price)  For a given pie, the Tracking Price at which equity becomes zero is called the Wipeout Price.

(Capitalization Principle)  When an account initiates a short position, its initial equity is equal to its contribution to the pie.

(Slope)  The Slope is the rate-of-change of equity position.  The Total Win Principle, the Weak Linearity of Short Position, and the Capitalization Principle combine to determine the Wipeout Price and Slope.
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk

Offline theoretical


This will be partly an explanation of my understanding of short sales, then I'll develop some detailed ideas for liquidation mechanics.  This is in response to the following threads:

https://bitsharestalk.org/index.php?topic=3015.0  (I am explaining the issue raised in this thread's OP)
https://bitsharestalk.org/index.php?topic=3130.0  (I propose anti-short-squeeze measure which will make Slingshot attack impractical)

I will reserve some posts at the beginning of the thread, because I'm long-winded and I want to logically break up what I have to say into multiple posts without later posts getting buried in replies.

If you find my explanation helpful, please send PTS to PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk