plan for next update on bitCNY:
Pdex:BTS price in DEX in smartcoin
Pf: current feed price
premium: current premium
GS_price: global settlement price
scale= 0.5;
get Pdex, Pf, premium, GS_price;
black_swan_protection_price = GS_price*MSSR*1.01
while True:
   
   get Pdex, Pf, premium;
   if 0.5%>premium>-1%: ##just adopt the current median if the absolute premium is low enough.
       feed price = Pf;
   else:
       feed price = Pf*(1+premium*scale);
   feed price = min(feed price, Pdex*MSSR)
   feed price = max(feed price, Pdex, black_swan_protection_price)
 
   time.sleep(120); ##update every 2 minutes.