Author Topic: [Witness Proposal] gdex-witnness  (Read 1425 times)

0 Members and 1 Guest are viewing this topic.

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 873
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
[Witness Proposal] gdex-witnness
« on: April 11, 2018, 06:59:31 am »
Hello everyone, We, GDEX team, now announce to apply for a witness - gdex-witness

In the past several months, GDEX has provided gateway service for coins like BTC, ETH, EOS, NEO, QTUM, GXS, BTM, BTO, HPB, ATN, etc. we tried to create more user friendly service for all BTSers, hope you can enjoy our service.

I, bitrab, committee member of Bitshares and Lead of GDEX team, have ran a witness by myself 1 year ago, finally I gave up as I am not professional enough on many technology things. now we have development team that include members focus on development/deployment/QA test/maintenance, I believe they can ensure the witness node to run well.

As a big shorter I understand deeply the importance of exact price feeding, in our view, fed price should reflect the market fact about with what a price people can convert BTS with one kind of fiat. we build our price feeding scripts based on this view.

config detail of relevant nodes:

Witness  main  server:

-  Type:  Dedicated
-  System:  Ubuntu  Server  16.04  LTS
-  Processor:  Intel(R)  Xeon(R)  CPU  E5-2686  v4
-  Cores:  4
-  Ram:  32GB  DDR3
-  Disk:  1TB  SSD
-  Bandwidth:  1  Gbit/s
-  Location:  Japan

Witness  backup  server:

-  Type:  Dedicated
-  System:  Ubuntu  Server  16.04  LTS
-  Processor:  Intel(R)  Xeon(R)  CPU  E5-2686  v4
-  Cores:  4
-  Ram:  16GB  DDR3
-  Disk:  500GB  SSD
-  Bandwidth:  1  Gbit/s
-  Location:  Japan

Witness  price  feed  server  *2:

-  Type:  Dedicated
-  System:  Ubuntu  Server  16.04  LTS
-  Processor:  Intel(R)  Xeon(R)  CPU  E5-2686  v4
-  Cores:  4
-  Ram:  16GB  DDR3
-  Disk:  500GB  SSD
-  Bandwidth:  1  Gbit/s
-  Location:  Japan

GDEX  API  server  *2(wss://ws.gdex.io):

-  Type:  Dedicated
-  System:  Ubuntu  Server  16.04  LTS
-  Processor:  Intel(R)  Xeon(R)  CPU  E5-2686  v4
-  Cores:  4
-  Ram:  32GB  DDR3
-  Disk:  1TB  SSD
-  Bandwidth:  1  Gbit/s
-  Location:  Japan

GDEX  API  server  *2(wss://ws.gdex.top):

-  Type:  Dedicated
-  System:  Ubuntu  Server  16.04  LTS
-  Processor:  Intel(R)  Xeon(R)  CPU  E5-2682  v4
-  Cores:  4
-  Ram:  32GB  DDR3
-  Disk:  1TB  SSD
-  Bandwidth:  200  Mbit/s
-  Location:  China

Contacts:
Website:  https://gdex.io
QQ  group:602573197
Telegram:https://t.me/GDEXer

we also welcome every friends to attend the 2018 Global Graphene Developer Conference: http://blockgeek.io/graphene/index.html

Thanks for support!

Online Customminer

  • Sr. Member
  • ****
  • Posts: 492
  • Bitshares FTW!
    • View Profile
    • Gridcoin.US
  • GitHub: grctest
Re: [Witness Proposal] gdex-witnness
« Reply #1 on: April 11, 2018, 12:27:35 pm »
What are your plans regarding publishing price feeds? What price feed script library will you use? Would you consider publishing feeds for Hertz?

Thanks, good luck becoming an active witness :)
Hertz, Beyond Bitshares, Gridcoin!

Offline ripplexiaoshan

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 2180
    • View Profile
  • BitShares: xiaoshan
Re: [Witness Proposal] gdex-witnness
« Reply #2 on: April 11, 2018, 04:57:22 pm »
5% 5% 5%. Hope more developers can join BitShares as witness.
BTS committee member:jademont

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 873
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: [Witness Proposal] gdex-witnness
« Reply #3 on: August 28, 2018, 06:09:01 am »
gdex-witness now adopt a new algorithm to feed bitCNY price, the new algorithm is based on BSIP42.

1.get a market price in fiat CNY which is the max from referenced exchange.
market price = max(Pdex, Pcex1,Pcex2...)
2.calculate the bitCNY premium in percent from BTS price difference between DEX and CEX, and the deposit fee in magicwallet.
3.set a limit to restrict the max percent for adjusting the feed price, initially let limit=10%
feed price = market price*[1+min(premium, limit)]

we understand that although BSIP42 worker proposal is active, we need more time for community to review and decide. we now begin to adopt the new algorithm is to do some experiment, to do some controllable change to show the result to the public and help the voters to decide whether to support this kind of change. if finally the BSIP42 is rejected, we'll return to the old feed algorithm immediately.

any comments on the new algorithm are welcome.

Offline sschiessl

Re: [Witness Proposal] gdex-witnness
« Reply #4 on: August 28, 2018, 07:27:39 am »

Offline sschiessl

Re: [Witness Proposal] gdex-witnness
« Reply #5 on: August 29, 2018, 06:37:27 am »
https://github.com/bitshares/bsips/pull/105

Please consider this, and please to also honor it if accepted.

Offline gghi

  • Sr. Member
  • ****
  • Posts: 239
    • View Profile
  • BitShares: ttt888
Re: [Witness Proposal] gdex-witnness
« Reply #6 on: August 29, 2018, 12:52:35 pm »
gdex-witness now adopt a new algorithm to feed bitCNY price, the new algorithm is based on BSIP42.

1.get a market price in fiat CNY which is the max from referenced exchange.
market price = max(Pdex, Pcex1,Pcex2...)
2.calculate the bitCNY premium in percent from BTS price difference between DEX and CEX, and the deposit fee in magicwallet.
3.set a limit to restrict the max percent for adjusting the feed price, initially let limit=10%
feed price = market price*[1+min(premium, limit)]
feed price = market price*1.05*[1+min(premium, limit)]      feed price = market price*1.03*[1+min(premium, limit)] 

feed price = market price*1.02*[1+min(premium, limit)] 
   

 

we understand that although BSIP42 worker proposal is active, we need more time for community to review and decide. we now begin to adopt the new algorithm is to do some experiment, to do some controllable change to show the result to the public and help the voters to decide whether to support this kind of change. if finally the BSIP42 is rejected, we'll return to the old feed algorithm immediately.

any comments on the new algorithm are welcome.

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 873
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: [Witness Proposal] gdex-witnness
« Reply #7 on: September 07, 2018, 02:39:27 am »
updated gdex-witness bitCNY feed price algorithm:

Pdex:BTS price in bitCNY in DEX
premium: calculated from magicwallet bitCNY deposit/withdraw fee and BTS price difference in bitCNY & fiat CNY.

if 0<premium<1%:
feed price = Pdex*(1+9.6*premium)

if 1%<premium<2.4%:
feed price = Pdex*(1+9.6%)

if 2.4%<premium:
feed price = Pdex*(1+4*premium)

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 873
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: [Witness Proposal] gdex-witnness
« Reply #8 on: September 11, 2018, 03:15:34 pm »
gdex-witness plan to adopt below algorithm for bitCNY price feeding, the core idea comes from PID control theory.

Pdex:BTS price in DEX in bitCNY
Pf: current feed price
premium: current premium
Premium0: premium in the last period

Tp=4;Ti=6; Td=1; ##parameters for PID control, here the Ti plays a key role, setting it to 6 will make i reach maximum in 20 hours if the premium keeps 2% or higher.

get Pdex, Pf, premium;
premium0=premium;
p=Tp*premium;
i= Pf/Pdex-p-1; ##set initial value for p,i,d to make the initial calculated feed price equal to the current feed price in system.
d=0;

while True:
   
   get Pdex, Pf, premium;

   while (10 minutes passed after the last execution):
         i+=premium/Ti;
         if i>0.4: ##set limit to i, to speed up the backward adjustment if premium change to cross 0
            i=0.4;
         if i<-0.3:
            i=-0.3;
         d=Td*(premium-premium0);
         premium0=premium;
           
   p=Tp*premium;
   
   if p+i+d>0:
     feed price = Pdex*min(1+p+i+d, 1.5, 1.2*Pf/Pdex) ##limit the feed price not higher than 1.5 times Pdex or 1.2 times current feed price while the adjustment is upward.
   else:
     feed price = Pdex*max(1+p+i+d, 0.91*Pf/Pdex)##limit the feed price no less than 0.91 times current feed price while the adjustment is downward.

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 873
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: [Witness Proposal] gdex-witnness
« Reply #9 on: September 12, 2018, 08:50:48 am »
updated version:

Pdex:BTS price in DEX in bitCNY
Pf: current feed price
premium: current premium
Premium0: premium in the last period

Tp=4;Ti=10; Td=1; ##parameters for PID control, here the Ti plays a key role, it should fit the update period

get Pdex, Pf, premium;
premium0=premium;
p=Tp*premium;
i= Pf/Pdex-p-1; ##set initial value for p,i,d to make the initial calculated feed price equal to the current feed price in system.
d=0;

while True:
   
   get Pdex, Pf, premium;

   i+=premium/Ti;
   if i>0.4: ##set limit to i, to speed up the backward adjustment if premium change to cross 0
       i=0.4;
    if i<-0.3:
       i=-0.3;
    d=Td*(premium-premium0);
    premium0=premium;
           
   p=Tp*premium;
   
   if p+i+d>0:
     feed price = Pdex*min(1+p+i+d, 1.5, 1.03*Pf/Pdex) ##limit the feed price comparing to Pdex and current feed price while the adjustment is upward.
   else:
     feed price = Pdex*max(1+p+i+d, 0.98*Pf/Pdex)##limit the feed price comparing to current feed price while the adjustment is downward.
   time.sleep(120) ##update every 2 minutes.
« Last Edit: September 13, 2018, 02:29:39 am by bitcrab »

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3295
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: [Witness Proposal] gdex-witnness
« Reply #10 on: September 12, 2018, 12:18:11 pm »
1. due to the median mechanism, not like traditional PID system, in BitShares individual witness's feed affects the result only indirectly. We need more witnesses to adopt a feedback algorithm like this one. Before majority of witnesses started using a feedback algorithm, it's doesn't make sense to adjust one's feed far away from median. It's even dangerous since it may lead to potential unnecessary big swings when the trend changes.

2. IMHO it's not good to arbitrarily set a limit/cap on "i" since it may prevent the factor from effectively developing, especially when Ti is playing a key role.
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline Thul3

  • Full Member
  • ***
  • Posts: 80
    • View Profile
Re: [Witness Proposal] gdex-witnness
« Reply #11 on: September 13, 2018, 05:40:12 am »
BTS price on bitCNY is nearly 10% under margin call price which has already a premium of 10% under feed price.
When checking the reason i realised you just destroyed the function to arbitrage these margin calls even the current price on DEX is 10% lower than the margin call price.


People stopped buying margin called assets and BTS price is now 10% under margin call which means once the downtrend starts these margin walls will get bigger and bigger.

You just increased massivly the risk for a black swan event


What will be the next proposal to cancel black swan events ?
« Last Edit: September 13, 2018, 07:55:38 am by Thul3 »

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 873
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: [Witness Proposal] gdex-witnness
« Reply #12 on: September 13, 2018, 10:32:17 am »
What will be the next proposal to cancel black swan events ?

you are right, I am considering to cancel black swan events.

Offline Thul3

  • Full Member
  • ***
  • Posts: 80
    • View Profile
Re: [Witness Proposal] gdex-witnness
« Reply #13 on: September 13, 2018, 11:14:21 am »
What will be the next proposal to cancel black swan events ?

you are right, I am considering to cancel black swan events.


Maybe you should focus on adoption instead of manipulation ?

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 873
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: [Witness Proposal] gdex-witnness
« Reply #14 on: September 13, 2018, 12:08:03 pm »
What will be the next proposal to cancel black swan events ?

you are right, I am considering to cancel black swan events.


Maybe you should focus on adoption instead of manipulation ?

I'm just helping Bitshares to evolve. I cannot persuade more people to adopt bitCNY if it is always in serious shortage and high premium.