SBD Price Feeds with Automatic Peg Support

I am in no position to tell anyone how to run their witnesses, I am merely sharing the strategy I employ for mine.

Since the beginning, I have been running highly reactive price feeds updates (update on 1% change treshold, from near real-time volume weighted market prices).

I used to support the peg by manipulating the base, however, marking the peg support via quote is a much more elegant solution, so as of today, I am switching to that.

Calculating the Quote

We can derive the quote by looking at implied SBD/USD spread, and thus determine how much offset is necessary to create a $1 USD to $1 SBD peg.

Calculating the quote using implied price is actually really simple:

quote = 1 / markets.sbd_usd_implied()

You can find a reference implementation for witness price feeds in Python here.

steemtools support

Steemtools now supports setting the quote via quote argument:

tx = Transactions().witness_feed_publish(current_price, witness_name, active_key, quote=quote, sim_mode=False)
print(tx)

To upgrade to latest version (1.3.3), please run:

pip install -U steemtools

Result

Thanks

Big thanks to @thecryptodrive for diligent observation.

img source



Don't miss out on the next post - follow me.
SteemQ | steemtools | steem.li | witness


H2
H3
H4
Upload from PC
Video gallery
3 columns
2 columns
1 column
3 Comments