Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BAIP3 : Refer to MA24 instead of MA48 in feed price calculation #18

Open
bitcrab opened this issue Feb 18, 2020 · 4 comments
Open

BAIP3 : Refer to MA24 instead of MA48 in feed price calculation #18

bitcrab opened this issue Feb 18, 2020 · 4 comments

Comments

@bitcrab
Copy link
Contributor

bitcrab commented Feb 18, 2020

BAIP: 0003
Title: Refer to MA24 instead of MA48 in feed price calculation
Authors: bitcrab
Status: Draft
Type: Consensus 
Created: 2020-2-18

Abstract

This BAIP can be seen as a subsequent optimization of BAIP2, it propose to feed price as the highest of current market price and the 24 hours moving average price.

Motivation

We have tried a lot to resist shorting attack on BTS, BAIP2 is the latest effort on this, in the recent past BTS experienced once more rapid price downtrend, it is observed that BAIP2 worked well on delaying the rapid downtrend on feed price, avoiding extreme short time lowest price appear in feed price, and smoothing the feed price line, all this contributed on resisting shorting attack.

However, all this is at the cost that a big gap comes between the market price and the feed price when the market is in rapid down trend, which brings a big devaluation of the relevant smartcoin, bitCNY has been devaluated more than 10% sometime in the past 2 days, which brought bad experience to users.

We have to balance this, We have to try to resist shorting attack as well as to make a good enough peg of smartcoins. analysis shows that to replace MA48 with MA24 will obviously make thing better.

Rational

"The feed price is the highest between the current price and the 24 hours moving average price ".
This BAIP does not conflict with the previous consensus on the feed price of all the communities. The feed provider continue to collect the feed price according to the original community consensus, and the community consensus on the protection of the black swan(BSIP58) and the minimum feed price is continued(BSIP76).

Specifications

Implementing measures

If (current market price > 24 hours moving average price) {
  feed price = current market price;
}
Else{
  feed price = 24 hours moving average price;
}

Explanation

Current market price : The real-time price of BTS, which is calculated from the trading data collected from exchanges with high enough volume and not faded data all around the world.

24 hours moving average price : 24 hours moving average price =( current price (1) + current price (2) + current price ( 3) ...+ current price (n) )/n.

n is the sampling frequency, n = 24*m; m is a positive integer: m = 1, 2, 3....
price (k) is the real time price at the time of sampling.

Sampling interval (in hours): sampling interval = 24 / n = 24 / (24 * m). If m=1, then sampling will happen once an hour, if m=2, sampling will happen twice an hour, and so on.

Supplementary explanation

To decide whether to implement this BAIP, 2 poll worker proposals will be created for each martcoin.

For example, below 2 poll worker proposals will be created for bitCNY:
Poll-BAIP3-Refer MA24 instead of MA48 in bitCNY feed price calculation.
Poll-BAIP3-Still refer MA48 in bitCNY feed price calculation.

If the voting power got by the "FOR“ poll worker overcome the voting power got by the "BAIP-threshold" worer and also that of the "AGAINST" poll worker, it will be regarded that the community confirm the change, then committee will announce the change at least 3 days before the change is implemented by feed provider.

Summary for Shareholders

This program is simple and effective, and can prevent malicious short-selling or increase malicious short-selling costs to a certain extent.

Discussion

https://bitsharestalk.org/index.php?topic=32130.0

See Also

https://bitsharestalk.org/index.php?topic=29698.0
https://bitsharestalk.org/index.php?topic=29699.0
https://bitsharestalk.org/index.php?topic=29635.0
https://bitsharestalk.org/index.php?topic=28418.0
https://bitsharestalk.org/index.php?topic=29684.0
https://bitsharestalk.org/index.php?topic=29687.0

Copyright

This document is placed in the public domain.

@bitcrab bitcrab changed the title BAIP3 : Refer MA24 instead of MA48 in feed price calculation BAIP3 : Refer to MA24 instead of MA48 in feed price calculation Feb 18, 2020
@shulthz
Copy link

shulthz commented Feb 18, 2020

Why not use EMA6 or EMA3? they can track the price more quickly and can avoid the price bottom.

MA24 and MA12 still is too slow and will make the bitasset have a big discount space, these will harm the holder of bitasset.

Snipaste_2020-02-18_19-46-43_cr22
Snipaste_2020-02-18_19-46-43_cr2

@bitcrab
Copy link
Contributor Author

bitcrab commented Feb 18, 2020

Why not use EMA6 or EMA3? they can track the price more quickly and can avoid the price bottom.

MA24 and MA12 still is too slow and will make the bitasset have a big discount space, these will harm the holder of bitasset.

Snipaste_2020-02-18_19-46-43_cr22
Snipaste_2020-02-18_19-46-43_cr2

they are too quick to provide enough buffer.

@abitmore
Copy link
Member

Why not create a pull request?

@shulthz
Copy link

shulthz commented Feb 19, 2020

I think we didn't need the buffer, just need to advoid the lower shadow.
When we advoid the lower shadow, many debtor can advoid unnecessary margin call, this is the aim of BAIP 2.

What i think is:

FEED PRICE = max (weighting factor * 1 hours EM6 + weighting factort * current price,current price)

this will track the price more quickly than six hours moving average price and have more likelihood,and can advoid the lower shadow also.

they are too quick to provide enough buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants