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

BSIP 87: Force-settlement Fee Ratio #260

Closed abitmore closed 4 years ago

abitmore commented 4 years ago

Just like BSIP74 (Margin Call Fee Ratio) which enables asset owners to charge a fee on margin calls, asset owners may also like to charge a fee on force settlements.

In recent days there was a volume of around 4.8 million bitCNY or say more than 20 million BTS generated in the BitShares DEX each day due to force settlements. If the network charge 1% on the force settlements, the income for the network would be around 200K BTS each day, which is not trivial.

The force-settlement fee ratio can be a per-asset option configurable by the asset owners.The fee would be paid in collateral asset when a force-settlement executes.

shulthz commented 4 years ago

This fee come from who?

If come from the debtor, when a healthy position was force-settlement, why he should pay the fees?

abitmore commented 4 years ago

Similar to BSIP 74, paying fees in collateral asset is for easier implementation.

The receiver pays the fee. Actually it's the same no matter who pays it.

shulthz commented 4 years ago

OK, that seems good.

shulthz commented 4 years ago

and i think this should come with (New BSIP: Make the settlement offset vary with CR) #160 .

sschiessl-bcp commented 4 years ago

Would the fee be defined as 0-100% of the force settlement offset?

abitmore commented 4 years ago

It is an additional fee to the force-settler, after the offset took place (on top of the offset).

sschiessl-bcp commented 4 years ago

Existing API's and also UI's would still display the correct force settlement "fee" if the new fee is a part of the offset. That would be great for compatibility reasons and UX (the one that force settles still only cares about the penalty he has to pay, doesn't matter what it is composed of). The fee is a percent so at least looking at absolute values it shouldn't matter if you increase the offset and define part of it as owner fee, or add an additional fee. Do you have other strong consideration why it should be a separate fee?

abitmore commented 4 years ago

There are 5 parties involved when filling a force settle order: the settler, the debtor, the debt asset owner, the collateral asset owner, the referral program. Ideally the API should include the amounts to all the parties, but actually there is some data missing already. With this BSIP we could probably fix the API. How UI would show the data for better UX is up to the UI dev team(s) to decide.

Back to the topic, while the settlers only care about how much they would pay and get, the borrowers only care about how they would pay and get too. The numbers now match. However, after added the new fee, the new numbers won't match. So IMHO not showing the fee would only bring more confusion.

sschiessl-bcp commented 4 years ago

Of course, it should be displayed properly in the UI. Still, if ALL fees are within the force settlement offset and we ONLY add parameters to define to distribution of the fee, the old UI will still display the correct total fee. If we add additional fees, then the old UI (and people are lazy with updates) will display an incorrect fee to the users initiating the force settlement.

shulthz commented 4 years ago

offset fee settle: X bitcny the settler buy X/(1+offset+fee), pay X bitcny; the debtor sell X/(1+offset), get X bitcny. the system will get bts =X/(1+offset) - X/(1+offset+fee)?

bitcrab commented 4 years ago
BSIP: 
Title: Force Settlement Fee Ratio
Authors:
  Jerry Liu bitcrab@qq.com
Status: Draft
Type: Protocol
Created: 2020-02-23
Discussion: https://github.com/bitshares/bsips/issues/260
Worker: TBD

Abstract

This BSIP provide a solution to charge fee from force settlement.

Motivation

Force settlement is an important part in smartcoin design, it provides the power to smartcoin owner to ask for collaterals with reference to feed price, and then guarantees the peg of smartcoin.

The community continuously optimize the rules of smartcoin to balance the interests of relevant parties, taking bitCNY as an example, at the beginning the rules focus more on smart coin peg but care less on debt position owners’ interests, change are done to give debt position owners more protection, the force settlement offset has been changed from 0 to 2%, the max settlement volume per maintenance period has been changed from no limit to 0.5% of smartcoin supply.

In the past several weeks, force settlement happened more intensively than before, the background is that the crypto market seemly switched from bear to bull, and BTS price went above 0.22CNY - which is the voted threshold per BSIP76, at some time the frequently happened force settlements made the lowest debt position collateral ratio even higher than 3, this phenomenon triggered warm discussion, almost all the users agree that the settler need to pay more cost while executing force settlement, and the cost will be paid to system as fee.

Rationale

Force settlement fee can be seen as to pay part of the cost for smartcoin supply, stabilization and also the liquidation of collaterals, it is irrelevant to market fee sharing. To ensure the debt positions can always be closed with suffcient smartcoin, it is more feasible to cut off part of the traded collaterals as fee, instead of smartcoin.

Specification

Add one new parameter Force Settlement Fee Ratio(FSFR) for each smartcoin, which is controlled by the smartcoin owner. Force settlement order price = settlement price*(1+FSO)/(1-FSFR)

Here settlement price is a new introduced parameter which is defined in BSIP71, settlement price = feed price when there is no bad debt.

FSO is Force Settlement Offset.

When a force settlement is executed, the buyer sells smartcoin with quantity X and get collaterals in quantity X*(1-FSFR)/[settlement price*(1+FSO)], the settled debt position owner sells collaterals in quantity X/[settlement price*(1+FSO)] and get smartcoin in quantity X, the delta in paid and received collaterals in quantity X*FSFR/[settlement price*(1+FSO)] will be paid to the owner of the smartcoin as force settlement fee.

Copyright

This document is placed in the public domain.

bitcrab commented 4 years ago

@sschiessl-bcp possible to assign a new BSIP number to the above BSIP draft?

abitmore commented 4 years ago

@bitcrab thanks. While waiting for a BSIP number, please create a pull request so other people could directly comment on the content (E.G. to fix typos).

sschiessl-bcp commented 4 years ago

Is there any strong reason why we can't consolidate ALL fees / deduction that are being applied when force settling into the force settlement offset?

Advantages of only one fee:

bitcrab commented 4 years ago

Is there any strong reason why we can't consolidate ALL fees / deduction that are being applied when force settling into the force settlement offset?

Advantages of only one fee:

  • For the everyday / indifferent user it will be easier to grasp (there is ONE fee with a possibly deviating distribution depending on the asset)
  • For the power user it makes no difference because he is aware of the difference
  • There are no compatibility issues with existing code. The UI still displays the offset. It will only need an update to make the user aware of the distribution

the current offset is actually compensation, it is paid from settler to the debt position owner.

however fee is paid to the system.

so all this finally appear as the difference between feed price and force settlement price, but actually there are 2 parts that go to different destination. so I don't think how UI handle this is the key issue, but how to make the specification compatible with core code is important, hope core team member can advise.

abitmore commented 4 years ago

For faster progress, @sschiessl-bcp please assign a BSIP number, and @bitcrab please create a pull request. My opinion about the fee split is above: https://github.com/bitshares/bsips/issues/260#issuecomment-586539430, IMHO it's a UI issue so no need to waste time here.

bitcrab commented 4 years ago

@abitmore PR created, pls check.

sschiessl-bcp commented 4 years ago

@abitmore @bitcrab added it as 87

abitmore commented 4 years ago

I think the fee should cover instant settlement (when settling a GSed asset) as well.

sschiessl-bcp commented 4 years ago

I think the fee should cover instant settlement (when settling a GSed asset) as well.

I understood as included. The force settlement operation is called, but executes instantly if asset in GS. This does not exclude it from the fee.

shulthz commented 4 years ago

This BSIP is meaningless, can't solve any problem, just want to charge fees.

It didn't have any logic, can't stand up to scrutiny. Develop it is just waste money and time of bts holder. One day all of you will pay for it.

abitmore commented 4 years ago

Draft merged in https://github.com/bitshares/bsips/pull/265. Closing.

abitmore commented 4 years ago

Discussion in https://github.com/bitshares/bitshares-core/pull/2151#issuecomment-620701543:

Mentioned by @abitmore:

Another thing is we also need to charge fees for instant force-settlements (for GSed assets).

Mentioned by @christophersanborn:

I'm not sure I agree with this. It's not mentioned in the BSIP — and I note there is something odd about an asset owner charging fees on settlement for an asset that's in a "failed" state, as opposed to letting claimants claim their full value from the settlement pool. It also could be a vector for an exit scam — as the asset owner could in theory ramp the fees up substantially after GS and make off with a big chunk of the pool, effectively abandoning their product and their customers.

I would argue that the differences between "instant settling" and "force settling" are not just semantic but also substantive, and enough so to argue that instant settling is not covered by the BSIP as written. I'm trying not to editorialize too much though.

If I recall, but I haven't gone back to double-check, the market fees mechanism is also not triggered during instant settle, (although perhaps it should be, since they are collected by the collateral issuer, who was not responsible for the GS). This also partly informed my choice not to touch the GS settle code.