bsip38: Clarifications

This commit is contained in:
Taconator 2018-04-14 16:17:58 -04:00
parent 6b50260452
commit c7bc11e8e1

View file

@ -53,6 +53,13 @@ position in margin call territory.
## The Definition of Target Collateral Ratio
For reference purpose, the collateral ratio of any given debt/short position
describes the ratio between the available collateral (e.g. core toke BTS) to
the debt that is owed (e.g. CNY, etc.) by the original borrower to the
blockchain. It is defined to be a dimensionless value as
`CR = collateral / (debt / feed_price)` where the price is measured in units of
the debt asset / units of the collateral asset (e.g. `CNY / BTS`).
"Target collateral ratio" is an optional value which can be set onto a short
position, when the position being automatically liquidized (margin called),
sell no more than required collateral until collateral ratio of the position
@ -108,7 +115,8 @@ target but not go too far beyond.
That said, if a short position got matched with a big limit order, after
partially filled, its collateral ratio should be **just** higher than specified
target collateral ratio. Which means if `max_debt_to_cover` has no
fraction, need to plus it by one Satoshi; otherwise, need to round it up.
fractional component (e.g. 5.00 as opposed to 5.23), need to plus it by one
Satoshi; otherwise, need to round it up.
An effectively same approach is to round down then add one Satoshi onto the
result.
@ -264,7 +272,7 @@ The new option need to be presented and can be used in UI after the hard fork.
When there are call orders to be filled, if `target_collateral_ratio` option
is set, UI need to show exact amount of collateral that another trader is able
to buy and exact amount of debt that need to pay according to the equation
described above.
described above. Note that this calculation will need to use the current `feed_price`.
# Discussion