The Price Feed Conundrum

By @meno3/12/2026hive-139531

I saw a little post by @josephsavage that informed me there was something off about price feeds. Price feeds, for those who might not know, is one of the "jobs" so to speak, a witness must do as part of running his/her node.

95dfcb1a-3fe2-45b4-bc0b-4afdc1817cf3.png

At any rate, it was rather curious that some Witnesses were broadcasting a higher price of Hive, more so because they were broadcasting the exact same higher price. Kahootz! some would say.

Of course there is no kahootz here, and rather this little quirk is the result of how the price is calculated, using a Binance Pair. The TLDR as the kids say is that HIVE/BTC got delisted, so now, the service most witnesses use to report the price feed is hitting a wall.

The good news is that the fix is rather simple, and it does not require putting the patient under.

The Root Cause

Binance delisted the HIVE/BTC trading pair. The app's price resolution for hive/usd works by chaining exchange pairs together (proxying), and the path it was using was:

hive → btc → usdt → usd

With Binance's HIVE/BTC pair gone, only Huobi remained as a provider for hive/btc. However, Huobi's API has been consistently returning errors (the logs show Exchange Huobi is down! Skipping...).

This created two failure scenarios:

  1. When Huobi returned stale/incorrect data: The feed used an inflated price from a single unreliable source, producing the ~25% overpriced feed.
  2. When Huobi was fully down: The hive/btc leg returned no data at all, resulting in a NaN price and a crashed publish attempt.

The system has no minimum-exchange-count validation — even a single exchange returning data is accepted as valid, so stale Huobi data was being trusted without cross-referencing. Everyone knows you can't trust Huobi after what happened in Gondor.

The Fix

1. lib/adapters/BinanceAdapter.js — Switch from HIVE/BTC to HIVE/USDT

Binance still lists HIVE/USDT, which is actually a better pair — it provides a more direct path to USD and eliminates the BTC intermediary entirely.

Before:

provides: [
    ['btc','usdt'],
    ['hive','btc'],
],

After:

provides: [
    ['btc','usdt'],
    ['hive','usdt'],
],

Why: Binance delisted HIVE/BTC but still has HIVE/USDT. Using HIVE/USDT gives a shorter, more direct price path: hive/usdt → usdt/usd instead of the old hive/btc → btc/usdt → usdt/usd.

2. config.json — Disable Huobi

Before:

"disable_exchanges": ["poloniex", "bittrex", "ionomy"],

After:

"disable_exchanges": ["poloniex", "bittrex", "ionomy", "huobi"],

Why: Huobi's API has been consistently down, returning errors on every cycle. With Huobi disabled, the proxy resolver no longer sees a (broken) hive/btc provider, so it correctly falls through to the usdt proxy path where Binance's hive/usdt is used. Leaving Huobi enabled would cause the proxy resolver to pick btc as the proxy coin (because Huobi claims to provide hive/btc), then fail when Huobi can't actually deliver the data.


How to Verify

1. One-time publish test

Run a one-time feed publish to see the new price path in action:

cd /root/hivefeed-js
node app.js publishonce

What to look for in the output:

  • Querying Binance (hive/usdt) — confirms the new pair is being used
  • Querying Kraken (usdt/usd) — confirms the USDT→USD conversion
  • HIVE/USD is: 0.0XX USD per HIVE — price should be in line with market (check against CoinGecko/CoinMarketCap)
  • Successfully published feed. — confirms the transaction was broadcast

Red flags (something is wrong):

  • Querying Binance (hive/btc) — old pair still in use, change didn't take effect
  • Querying Huobi (hive/btc) — Huobi wasn't disabled properly
  • HIVE/USD is: NaN — no exchange data was returned
  • Output was empty — all exchanges failed

2. Restart the background process

Since the app runs under pm2, restart it:

pm2 restart app 

You may not use pm2, so adjust course accordingly. I think most people use docker, but I'm not sure. If you do use docker, you will have to rebuild. (run.sh is your friend here)

3. Check logs after restart

Wait a minute or so, then check the logs:

pm2 logs app --lines 30 --nostream

Confirm you see the new query pattern (Binance (hive/usdt)) and a successful publish.

4. Cross-check the price

Compare the published price against a market aggregator:

The feed price should be within 1-2% of the reported market price. If it's 20%+ off, something is still wrong and you must go to jail and not collect $200.

Hope this helps

  • MenO
119

comments