bitshares / bsips

BitShares Improvement Proposals and Protocols. These technical documents describe the process of updating and improving the BitShares blockchain and technical ecosystem.
https://bitshares.github.io
63 stars 86 forks source link

New BSIP: per-position force-settlement volume (percentage) limit #261

Open abitmore opened 4 years ago

abitmore commented 4 years ago

BSIP38 introduced the target collateral ratio (abbr. TCR) option so that debt position owners can decide how much collateral to sell when being margin called. However, the TCR option doesn't affect force-settlements. When being force-settled, the debt position with the least collateral ratio (abbr. CR) will buy as much debt asset as possible (capped by its total debt) to fill the matched force-settlement order.

Some debt position holders may also like to sell as little collateral as possible when being force-settled. Since a debt position's CR would raise after sold some collateral, it's possible that the position's new CR would be higher than other positions', thus it's fair for this position to not sell more collateral.

The new options could include

When executing (filling) a force-settlement, let the debt position with the least CR buy up to force_settlement_percentage of its total debt from the settle order, then reevaluate the debt position list and loop.

This would bring better experience for debtors.

Note: the design is incomplete, there are edge cases to consider to avoid infinity loop and for better performance.