Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - zapata42

Pages: [1] 2 3 4 5
1
There will be an update about the points you posted from cn-vote

Good. I am in favor of a patch done correctly, as I don't support what Abit did. I just don't want to make the situation worse than it is already.

2
I don't support the patch nor the fork:

  • The patch is not properly tested (no unit test, no testnet)
  • the content is not a reversal as announced, but a new unspecified behaviour;
  • from my understanding of the code it does not remove most of the controversial behaviours like non voting rights for bts in collateral or in orders;
  • the fork not properly prepared is not good for Bitshares as it is untested, feeds are not ready, exchanges and gateway supports are not properly defined, liquidity will be reduced.

3
zapata42-witness would like to continue providing price feeding service according to the community's consensus.

4
General Discussion / Re: lucky us, avoid from a disaster
« on: April 23, 2019, 08:23:40 pm »
Note that Zapata/bitshares-pricefeed don't had the issue, even with global settlement activated (see the code).

The core team announced the change weeks before the network update, and in my case the pricefeed code was checked.

You can also visualize what happened today on the pricefeed tracker.



5
Is there a plan for a bounty process as in the core and UI proposal, so external freelancers can help you?

6
Stakeholder Proposals / Re: [Witness Proposal] 1.6.129 - zapata42-witness
« on: November 16, 2018, 06:11:30 pm »
Have we got agreed weighting for the different price feed sources? I.e. if we are concerned one exchange has faked volume it could be having an unjustified impact on the feed.

Currently my weighting is volume based average.
I currently don't apply any adjustment by market, however the script has a `scaleVolumeBy` feature that let you adjust each source volume according to an arbitrary ratio.
I'm not aware of any agreed weighting, but abit has publicly expressed his opinions, and this topic has been discussed multiple times here and on telegram.
I agree that some volumes (and trade history) seems faked, so I'll take some time to forge an updated opinion and scale my volumes accordingly.
I'll keep you informed.

7
General Discussion / Re: price feeding review
« on: November 16, 2018, 03:44:04 pm »
price feeding is so important for Bitshares and it need witnesses to pay more attention and efforts on this.

witnesses need to publish their algorithm to for voters to evaluate and check with the real feed price.

the published algorithm need to include

1. how the premium is calculated out.
2. how the feed price is calculated out based on premium and other factors.

I am sorry that I'll use my voting power to push this thing, after 20th, Nov, I may update voting on witnesses if the behavior on this is not satisfactory.

I agree transparency on pricefeed is a must.

You can find the up-to-date details of my algorithm there.

Note that, I always tryed to be the more transparent as I can:
  • My algorithm and the various changes are discused in my application thread.
  • My pricefeed code is public, and I always used the public version of the code.
  • I've build a tool to help shareholders to monitor the witnesses prices over time, and compare against each other, median feed/dex/cex prices.

8
Stakeholder Proposals / Re: [Witness Proposal] 1.6.129 - zapata42-witness
« on: November 16, 2018, 03:38:35 pm »
In order to give more visibility on what I currently use, and summarize the changes since my initial setup, here is an update of the my algorithm:

CNY:
   
  • Compute CNY/BTS price from a weighted mean of those routes:
           
    • 'aex - CNY:BTS'
    • 'magicwallet - CNY:BITCNY', 'bitshares - BITCNY:BTS'
    • 'qc_fees - CNY:QC', 'zb - QC:BITCNY', 'bitshares - BITCNY:BTS'
    • 'qc_fees - CNY:QC', 'zb - QC:BTS'
    • 'magicwallet - CNY:BITCNY', 'zb - BITCNY:QC', 'zb - QC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'zb - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'binance - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'poloniex - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'openledger - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'gdex - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'coinegg - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'cointiger - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:ETH', 'cointiger - ETH:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'huobi - BTC:BTS'
    • 'magicwallet - CNY:BITCNY', 'cointiger - BITCNY:ETH', 'huobi - ETH:BTS'

          Notes:
         
    • 'magicwallet - CNY:BITCNY' is computed using 1h deposit/withdrawal ratio, if less than 10 operation where made the 24h volume is used.
    • 'qc_fees - CNY:QC' is manually set using ZB OTC market, currently is 0.997
       
  • Get BITCNY/BTS price from Bitshares DEX
  • Get current feed price from Bitshares DEX
  • Compute premium or discount: CNY/BTS / BITCNY/BTS
  • Compute adjusted feed price: current_feed_price * (1 + premium_or_discount * adjustment_scale)
            adjustment_scale is manually adjusted depending my appreciation on how fast the market react. Current value is 1.
  • Publish the adjusted feed price (this means BSIP-42 is activated on BitCNY)


USD:
   
  • Compute USD/BTS price from a weighted mean of those routes:
           
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'binance - BTC:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'openledger - BTC:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'gdex - BTC:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'coinegg - BTC:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'cointiger - BTC:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'huobi - BTC:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'poloniex - BTC:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'zb - BTC:BTS'
    • 'weighted_mean(bittrex, kraken) - USD:USDT', 'huobi - USDT:BTS'
    • 'weighted_mean(bittrex, kraken) - USD:USDT', 'zb - USDT:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:ETH', 'cointiger - ETH:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:ETH', 'huobi - ETH:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:BTC', 'cointiger - BTC:BITCNY', 'bitshares - BITCNY:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - USD:ETH', 'cointiger - ETH:BITCNY', 'bitshares - BITCNY:BTS'

            Notes:
           
    • USD:BTC is computed only from CEX that have a FIAT ramp
         
  • Get BITUSD/BTS price from Bitshares DEX
  • Get current feed price from Bitshares DEX
  • Compute premium or discount: USD/BTS / BITUSD/BTS
  • Compute adjusted feed price: current_feed_price * (1 + premium_or_discount * adjustment_scale)
            adjustment_scale is manually adjusted depending my appreciation on how fast the market react. Current value is 1.2.
         
  • Publish the adjusted feed price (this means BSIP-42 is activated on BitUSD)


BTC:
   
  • Compute BTC/BTS price from a weighted mean of those routes:
           
    • 'binance - BTC:BTS'
    • 'openledger - BTC:BTS'
    • 'gdex - BTC:BTS'
    • 'coinegg - BTC:BTS'
    • 'cointiger - BTC:BTS'
    • 'huobi - BTC:BTS'
    • 'poloniex - BTC:BTS'
    • 'zb - BTC:BTS'
    • 'cointiger - BTC:BITCNY', 'bitshares - BITCNY:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - BTC:USD', 'weighted_mean(bittrex, kraken) - USD:USDT', 'huobi - USDT:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - BTC:USD', 'weighted_mean(bittrex, kraken) - USD:USDT', 'zb - USDT:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - BTC:USD', 'weighted_mean(coinbase, kraken, bitstamp) - USD:ETH', 'cointiger - ETH:BTS'
    • 'weighted_mean(coinbase, kraken, bitstamp) - BTC:USD', 'weighted_mean(coinbase, kraken, bitstamp) - USD:ETH', 'huobi - ETH:BTS'
    • 'cointiger - BTC:BITCNY', 'cointiger - BITCNY:ETH', 'cointiger - ETH:BTS'
    • 'cointiger - BTC:BITCNY', 'cointiger - BITCNY:ETH', 'huobi - ETH:BTS'
    • 'cointiger - BTC:BITCNY', 'zb - BITCNY:QC', 'zb - QC:BTS'
       
  • Publish BTC/BTS unadjusted (no BSIP-42)

RUBLE/EUR/AUD/JPY/CHF/MXN/GBP/CAD/ARS/HKD/SEK/SGD/NZD/KRW:
  • Get USD/BTS price from Bitshares DEX (I do not use the feed price since BSIP-42 is applied to USD)
  • Get XXX/USD from the mean of CurrencyLayer and OpenExchangeRates
  • Then apply XXX/USD * USD/BTS to publish XXX/BTS (no BSIP-42)

GOLD/SILVER:
  • Get USD/BTS price from Bitshares DEX (I do not use the feed price since BSIP-42 is applied to USD)
  • Get XXX/USD from Quadl LMBA source
  • Then apply XXX/USD * USD/BTS to publish XXX/BTS  (no BSIP-42)

HERTZ:
  • Apply the formula to USD/BTS price from Bitshares DEX (I do not use the feed price since BSIP-42 is applied to USD)

AMAZONCOM:
  • Get USD/BTS price from Bitshares DEX (I do not use the feed price since BSIP-42 is applied to USD)
  • Get AMAZONCOM/USD from IEX source
  • Then apply XXX/USD * USD/BTS to publish XXX/BTS  (no BSIP-42)

The up-to-date version of the code used is available there.
It contains implementations for many BSIP 42 algorithms, a large variety of price sources, and is largely configurable.

You can use the pricefeed tracker to check the published prices over time and against other witnesses, and/or to compare feed price to CEX and DEX price and track premium/discount.

I plan to update my setup to:
  • implement the "protect discount limit" as disccussed here.
  • use a lower scale at discount and a higher scale at premium as suggested by abit here.
  • publish all my intermediary values to the pricefeed tracker website so anyone would be able to analyze where my price comes from.


Edit:
  - 20181116 17:55 UTC : Added forgotten AEX source for BitCNY (api is unstable, so sometime it's not used).

9
Stakeholder Proposals / Re: [Witness Proposal] 1.6.129 - zapata42-witness
« on: October 21, 2018, 05:34:41 pm »
  • Get BTC/USD, ETH/USD, USDT/USD from CoinMarketCap.com (fallback to worldcoinindex.com)
As discussed in Telegram channel, CMC's price is not reliable thus should be avoided.

Agree, I have removed it since, my configuration now use a weighted mean of exchanges with FIAT deposit (Coinbase, Kraken and Bitstamp).
Here is the config:

Code: [Select]
    btc_and_eth_price:
        klass: Composite
        aggregation_type: 'weighted_mean'
        exchanges:
            coinbase:
                klass: Coinbase
                quotes:
                    - BTC
                    - ETH
                bases:
                    - USD
            kraken:
                klass: Kraken
                quotes:
                    - XXBT
                    - XETH
                bases:
                    - ZUSD
                aliases:
                    XXBT: BTC
                    XETH: ETH
                    ZUSD: USD
            bitstamp:
                klass: Bitstamp
                quotes:
                    - BTC
                    - ETH
                bases:
                    - USD

Note that Coinbase source has been added for that.

http://www.untether.space/ has some interesting data about USDT, perhaps we can use it or the way it calculates USDT price.

Unfortunately the website does not provide any API currently. We can easely recompute the same data (see the code), but I don't see big differences with current approach (weighted average of USD/USDT of Bittrex and Kraken). Market arbitrage seems efficient.

10
Stakeholder Proposals / Re: [Witness Proposal] 1.6.129 - zapata42-witness
« on: October 07, 2018, 12:15:46 am »
Another thing mentioned in Telegram group by @pc:
> please make sure that you publish a CER that is not higher than the settlement price for assets in black swan state. "higher" as in more BTS per bitXYZ

If CER is too low, it's cheaper for people to pay fees in that asset than in BTS if there is some BTS in the fee pool, although not a big deal because there should not be much BTS in the fee pool.

I have updated the script to handle the case, see commit 1, 2.
The applyed formula is: If CER < asset global settlement price, then published CER is the asset global settlement price.

My feed for those assets will be impacted: BTC, SILVER, GOLD, SGD, CHF, AUD.


11
Stakeholder Proposals / Re: [Witness Proposal] 1.6.129 - zapata42-witness
« on: October 04, 2018, 10:16:52 pm »
@zapata42 USDT is now trading at around 0.991 USD. Data sources (direct trading pairs):
* https://www.kraken.com/charts
* https://bittrex.com/Market/Index?MarketName=USD-USDT

CoinMarketCap is reporting 0.9968 which seems a bit off. https://coinmarketcap.com/currencies/tether/

Perhaps your script need to be updated.

It was already possible to configure the script to retrieve USDT price from Bittrex.
However, the Kraken source was not implemented, so I just added it.

As an example witnesses can add this configuration to the script in order to use Bittrex+Kraken sources for USDT:
Code: [Select]
    usdt_price:
        klass: Composite
        aggregation_type: 'weighted_mean'
        exchanges:
            bittrex:
                klass: Bittrex
                quotes:
                    - USDT
                bases:
                    - USD
            kraken:
                klass: Kraken
                quotes:
                    - USDT
                bases:
                    - ZUSD
                aliases:
                    ZUSD: USD

I have updated my script to use those sources.

I would also like to take this opportunity to say that the PID formula implementation is also available if poeple want to practice with it.

I am also working on a tool to visualize witness pricefeeds over time: http://pricefeed-tracker.dex.trading/
(code is here)

12
Stakeholder Proposals / Re: [Witness Proposal] 1.6.129 - zapata42-witness
« on: September 07, 2018, 12:03:13 am »
As BSIP42 has been voted in, my feed price has been adjusted accordingly.

The current adjustment is the use the same formula as gdex-witness.

13
Thanks for your votes, I am an active witness since the begining of the week.

Some updates from the last two weeks:
  • my nodes have been updated to 2.0.180823.
  • my pricefeed configuration has been updated following Abit's comments.
  • I have published code to experiment with BSIP42. It currently implements all the algorithms publicly discussed.  I have not activated any of them in my feed as I wait for the end of the BSIP42 voting period. This should allow anyone to experiment their formulas easely (just add your algorithm there).
  • a first Dedicated 4c/8t 3Ghz CPU, 64go RAM, 1To SSD hard drive, 250Mpbs internet bandwith has been ordered. I will use it to setup ElasticSearch + OpenExplorer + Explorer API in the coming weeks.
  • I am helping Alfredo on the backend of open-explorer.io to improve performances and make it easier to install and maintain (see this, this, this and this PR.. and more to come)

I will be at BitFest, Friday and Saturday, ping me here or on Telegram if you want to have a chat there.

14
Following current various discussions on price feeds I spend a couple of days tuning mine.


Here is the algorithm I use:
  • Get BTC/USD, ETH/USD, USDT/USD from CoinMarketCap.com (fallback to worldcoinindex.com)
  • Get Fiat forex USD/CNY, USD/EUR, ... from CurrencyLayer (fallback to OpenExchangeRates)
  • Get BITCNY/CNY from MagicWallet (use last 1h data, and if not enough trades use last 24h data)
  • Get last price and daily volume of BTS/USDT, BTS/BTC, BTS/ETH if available from Centralized Exchanges: Aex, Binance, CoinEgg, CoinTiger, Huobi, Lbank, Poloniex, Zb
  • Get last price and daily volume from BTS/OPEN.BTC, BTS/GDEX.BTC on BitShares DEX (and consider xxx.BTC = BTC)
  • Get last price for BITCNY/BTC, BITCNY/ETH from CoinTiger
  • Get last price for BTS/BITCNY from BitShares DEX

With that I compute all possible routes using BTC, ETH, USDT or BITCNY as intermediate asset.
Then I use a weighted average using the BTS/{BTC,ETH,USDT,BITCNY} daily volume.

Here is a sample result of all the routes for USD/BTS and CNY/BTS at 17/08/2018 21:58 UTC:

Code: [Select]
+------+-------+--------------+-------+--------------------+------------------------------------------------------------------------------------+
| base | quote | price        | diff  | quote volume       | source                                                                             |
+------+-------+--------------+-------+--------------------+------------------------------------------------------------------------------------+
| CNY  | BTS   | 0.8008708826 | +1.58 | 31726149.140697803 | ['magicwallet - CNY:BITCNY', 'bitshares - BITCNY:BTS']                             |
| CNY  | BTS   | 0.7775048363 | -1.38 | 275814.57983       | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'gdex - BTC:BTS']       |
| CNY  | BTS   | 0.7767051983 | -1.48 | 6099695.41644055   | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'poloniex - BTC:BTS']   |
| CNY  | BTS   | 0.7776046832 | -1.37 | 6823092.1          | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'zb - BTC:BTS']         |
| CNY  | BTS   | 0.7826822718 | -0.73 | 1944911.60043      | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'openledger - BTC:BTS'] |
| CNY  | BTS   | 0.7897477292 | +0.17 | 8090672.0          | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'coinegg - BTC:BTS']    |
| CNY  | BTS   | 0.7821021076 | -0.80 | 719268.12          | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'cointiger - BTC:BTS']  |
| CNY  | BTS   | 0.7758057134 | -1.60 | 3068685.9901371617 | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'huobi - BTC:BTS']      |
| CNY  | BTS   | 0.7816523652 | -0.86 | 1648254.1922999984 | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'lbank - BTC:BTS']      |
| CNY  | BTS   | 0.7798533954 | -1.08 | 5457868.0          | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:BTC', 'binance - BTC:BTS']    |
| CNY  | BTS   | 0.7968423519 | +1.07 | 275814.57983       | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'gdex - BTC:BTS']           |
| CNY  | BTS   | 0.7960228259 | +0.97 | 6099695.41644055   | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'poloniex - BTC:BTS']       |
| CNY  | BTS   | 0.7969446821 | +1.08 | 6823092.1          | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'zb - BTC:BTS']             |
| CNY  | BTS   | 0.8021485567 | +1.74 | 1944911.60043      | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'openledger - BTC:BTS']     |
| CNY  | BTS   | 0.8093897408 | +2.66 | 8090672.0          | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'coinegg - BTC:BTS']        |
| CNY  | BTS   | 0.8015539631 | +1.67 | 719268.12          | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'cointiger - BTC:BTS']      |
| CNY  | BTS   | 0.7951009697 | +0.85 | 3068685.9901371617 | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'huobi - BTC:BTS']          |
| CNY  | BTS   | 0.8010930350 | +1.61 | 1648254.1922999984 | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'lbank - BTC:BTS']          |
| CNY  | BTS   | 0.7992493226 | +1.38 | 5457868.0          | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:BTC', 'binance - BTC:BTS']        |
| CNY  | BTS   | 0.7739653886 | -1.83 | 17591765.91406     | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:USDT', 'aex - USDT:BTS']      |
| CNY  | BTS   | 0.7767270849 | -1.48 | 15976040.0         | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:USDT', 'zb - USDT:BTS']       |
| CNY  | BTS   | 0.7794887812 | -1.13 | 10213236.688898135 | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:USDT', 'huobi - USDT:BTS']    |
| CNY  | BTS   | 0.7760030565 | -1.57 | 188647.0           | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:ETH', 'cointiger - ETH:BTS']  |
| CNY  | BTS   | 0.7760030565 | -1.57 | 1040797.2504070019 | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:ETH', 'huobi - ETH:BTS']      |
| CNY  | BTS   | 0.7778900585 | -1.33 | 4698376.790000004  | ['openexchangerates - CNY:USD', 'coinmarketcap - USD:ETH', 'lbank - ETH:BTS']      |
| CNY  | BTS   | 0.7930701250 | +0.59 | 188647.0           | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:ETH', 'cointiger - ETH:BTS']      |
| CNY  | BTS   | 0.7930701250 | +0.59 | 1040797.2504070019 | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:ETH', 'huobi - ETH:BTS']          |
| CNY  | BTS   | 0.7949986288 | +0.84 | 4698376.790000004  | ['magicwallet - CNY:BITCNY', 'cointiger - BITCNY:ETH', 'lbank - ETH:BTS']          |
| USD  | BTS   | 0.1130179495 | -0.27 | 275814.57983       | ['coinmarketcap - USD:BTC', 'gdex - BTC:BTS']                                      |
| USD  | BTS   | 0.1129017143 | -0.37 | 6099695.41644055   | ['coinmarketcap - USD:BTC', 'poloniex - BTC:BTS']                                  |
| USD  | BTS   | 0.1130324632 | -0.26 | 6823092.1          | ['coinmarketcap - USD:BTC', 'zb - BTC:BTS']                                        |
| USD  | BTS   | 0.1137705405 | +0.39 | 1944911.60043      | ['coinmarketcap - USD:BTC', 'openledger - BTC:BTS']                                |
| USD  | BTS   | 0.1147975740 | +1.30 | 8090672.0          | ['coinmarketcap - USD:BTC', 'coinegg - BTC:BTS']                                   |
| USD  | BTS   | 0.1136862080 | +0.32 | 719268.12          | ['coinmarketcap - USD:BTC', 'cointiger - BTC:BTS']                                 |
| USD  | BTS   | 0.1127709653 | -0.49 | 3068685.9901371617 | ['coinmarketcap - USD:BTC', 'huobi - BTC:BTS']                                     |
| USD  | BTS   | 0.1136208335 | +0.26 | 1648254.1922999984 | ['coinmarketcap - USD:BTC', 'lbank - BTC:BTS']                                     |
| USD  | BTS   | 0.1133593356 | +0.03 | 5457868.0          | ['coinmarketcap - USD:BTC', 'binance - BTC:BTS']                                   |
| USD  | BTS   | 0.1125034561 | -0.72 | 17591765.91406     | ['coinmarketcap - USD:USDT', 'aex - USDT:BTS']                                     |
| USD  | BTS   | 0.1129048957 | -0.37 | 15976040.0         | ['coinmarketcap - USD:USDT', 'zb - USDT:BTS']                                      |
| USD  | BTS   | 0.1133063354 | -0.02 | 10213236.688898135 | ['coinmarketcap - USD:USDT', 'huobi - USDT:BTS']                                   |
| USD  | BTS   | 0.1127996511 | -0.46 | 188647.0           | ['coinmarketcap - USD:ETH', 'cointiger - ETH:BTS']                                 |
| USD  | BTS   | 0.1127996511 | -0.46 | 1040797.2504070019 | ['coinmarketcap - USD:ETH', 'huobi - ETH:BTS']                                     |
| USD  | BTS   | 0.1130739453 | -0.22 | 4698376.790000004  | ['coinmarketcap - USD:ETH', 'lbank - ETH:BTS']                                     |
| USD  | BTS   | 0.1128235134 | -0.44 | 275814.57983       | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'gdex - BTC:BTS']         |
| USD  | BTS   | 0.1127074782 | -0.54 | 6099695.41644055   | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'poloniex - BTC:BTS']     |
| USD  | BTS   | 0.1128380022 | -0.43 | 6823092.1          | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'zb - BTC:BTS']           |
| USD  | BTS   | 0.1135748097 | +0.22 | 1944911.60043      | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'openledger - BTC:BTS']   |
| USD  | BTS   | 0.1146000762 | +1.13 | 8090672.0          | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'coinegg - BTC:BTS']      |
| USD  | BTS   | 0.1134906222 | +0.15 | 719268.12          | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'cointiger - BTC:BTS']    |
| USD  | BTS   | 0.1125769542 | -0.66 | 3068685.9901371617 | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'huobi - BTC:BTS']        |
| USD  | BTS   | 0.1134253602 | +0.09 | 1648254.1922999984 | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'lbank - BTC:BTS']        |
| USD  | BTS   | 0.1131643122 | -0.14 | 5457868.0          | ['coinmarketcap - USD:USDT', 'coinmarketcap - USDT:BTC', 'binance - BTC:BTS']      |
| USD  | BTS   | 0.1128514039 | -0.42 | 275814.57983       | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'gdex - BTC:BTS']           |
| USD  | BTS   | 0.1127353400 | -0.52 | 6099695.41644055   | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'poloniex - BTC:BTS']       |
| USD  | BTS   | 0.1128658963 | -0.40 | 6823092.1          | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'zb - BTC:BTS']             |
| USD  | BTS   | 0.1136028859 | +0.25 | 1944911.60043      | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'openledger - BTC:BTS']     |
| USD  | BTS   | 0.1146284059 | +1.15 | 8090672.0          | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'coinegg - BTC:BTS']        |
| USD  | BTS   | 0.1135186776 | +0.17 | 719268.12          | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'cointiger - BTC:BTS']      |
| USD  | BTS   | 0.1126047837 | -0.63 | 3068685.9901371617 | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'huobi - BTC:BTS']          |
| USD  | BTS   | 0.1134533995 | +0.11 | 1648254.1922999984 | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'lbank - BTC:BTS']          |
| USD  | BTS   | 0.1131922869 | -0.12 | 5457868.0          | ['coinmarketcap - USD:ETH', 'coinmarketcap - ETH:BTC', 'binance - BTC:BTS']        |
| USD  | BTS   | 0.1126973406 | -0.55 | 17591765.91406     | ['coinmarketcap - USD:BTC', 'coinmarketcap - BTC:USDT', 'aex - USDT:BTS']          |
| USD  | BTS   | 0.1130994721 | -0.20 | 15976040.0         | ['coinmarketcap - USD:BTC', 'coinmarketcap - BTC:USDT', 'zb - USDT:BTS']           |
| USD  | BTS   | 0.1135016035 | +0.16 | 10213236.688898135 | ['coinmarketcap - USD:BTC', 'coinmarketcap - BTC:USDT', 'huobi - USDT:BTS']        |
| USD  | BTS   | 0.1135893251 | +0.23 | 31726149.140697803 | ['coinmarketcap - USD:BTC', 'cointiger - BTC:BITCNY', 'bitshares - BITCNY:BTS']    |
| USD  | BTS   | 0.1139091655 | +0.52 | 31726149.140697803 | ['coinmarketcap - USD:ETH', 'cointiger - ETH:BITCNY', 'bitshares - BITCNY:BTS']    |
| USD  | BTS   | 0.1129661203 | -0.32 | 188647.0           | ['coinmarketcap - USD:BTC', 'coinmarketcap - BTC:ETH', 'cointiger - ETH:BTS']      |
| USD  | BTS   | 0.1129661203 | -0.32 | 1040797.2504070019 | ['coinmarketcap - USD:BTC', 'coinmarketcap - BTC:ETH', 'huobi - ETH:BTS']          |
| USD  | BTS   | 0.1132408193 | -0.07 | 4698376.790000004  | ['coinmarketcap - USD:BTC', 'coinmarketcap - BTC:ETH', 'lbank - ETH:BTS']          |
+------+-------+--------------+-------+--------------------+------------------------------------------------------------------------------------+

And the final results I get:

Code: [Select]
+--------+------------+--------------+--------------+---------------------+---------------------+---------------------+--------------+---------------------+--------+--------+-------------------------+-------------+
| symbol | collateral |  new price   |     cer      |         mean        |        median       |      wgt. avg.      | wgt. std (#) |      blockchain     |  mssr  |  mcr   |      my last price      | last update |
+--------+------------+--------------+--------------+---------------------+---------------------+---------------------+--------------+---------------------+--------+--------+-------------------------+-------------+
|  CNY   |    BTS     | 0.7884066494 | 0.9460879792 | 0.7880032477 (0.05) | 0.7862150005 (0.28) | 0.7884066494 (0.00) |  1.17 (28)   | 0.7728333333 (2.02) | 110.0% | 175.0% | -1.0000000000 (-178.84) | unknown ago |
|  USD   |    BTS     | 0.1133240311 | 0.1189902327 | 0.1132431633 (0.07) | 0.1130994721 (0.20) | 0.1133240311 (0.00) |  0.06 (41)   | 0.1123699660 (0.85) | 110.0% | 175.0% | -1.0000000000 (-111.33) | unknown ago |
+--------+------------+--------------+--------------+---------------------+---------------------+---------------------+--------------+---------------------+--------+--------+-------------------------+-------------+

I use xeroc's pricefeed script that I modified again to add:
  • Composite source to group multiple sources as one (to handle things like fallbacks);
  • Add CoinTiger, CoinEgg, Huobi and MagicWallet sources;
  • Change the way derived routes volumes are computed;
  • Better tracking of source for debug/audit purpose;
  • Various code refactoring and small enhancements.
All code is accessible at Zapata/bitshares-pricefeed.

Your comments are more than welcome, this is intended to be adjusted over time.

Currently my ideas to further improve are:
  • use the volume weighted average of the last X minutes trades instead of the last prices.
  • use the order book depth to weight prices instead of daily volume.
  • plot and track current active feeds and backup/test feeds over time. This will help shareholders to vote accurately.
  • make all the data used for all my feeds publicly available for auditing

I would be able to progress on that once voted. Since then I'm helping Alfredo on the open-explorer (see last PR).

15
Thanks for your votes so far.

Please submit your mainnet API node to https://github.com/bitshares/bitshares-ui/ .

My nodes will be available in the next UI release (see PR). You can already find them in the staging wallet.
Any feedback on the latency is welcome.

My testnet witness (witness.zapata) and API node (wss://testnet.dex.trading) have been updated (see release thread).
I missed one block in the deployment process as I switched my signing key back to my main witness node while it was my turn.
I will take care to avoid this case in the future.
(Note that I had a typo in my previous post, you should have read 597, instead of 579. I'm now at 598).

This week I also added Bitshares integration to EOSIO/demux-js. You can find out more information on Demux here.

Pages: [1] 2 3 4 5