For example, latest price dump on internal market would only be somewhat reflected on feeds of witnesses that use it among their sources, but since it barely showed on most exchanges and only with delay as a result of arbitrage, it would not have much impact on official feed entry (at some point price on internal market was rushing down to
37 cents0.37 HBD while price on Binance was still 44 cents - bots were super happy, I presume; notice how it only reached 41 cents on Binance while internal market dipped below36 cents0.36 HBD).
The top source of confusion when it comes to understanding conversions is using the word "dollar" (in this case "cent") and the "$" sign to describe both USD and HBD.
Witnesses broadcast HIVE/USD price. Internal market has no HIVE/USD price displayed anywhere. It only trades HIVE/HBD. The apparent discrepancy did not exist, it was just market evaluating HBD over 1 USD. If anyone ever asked witnesses what the HIVE/HBD price was, they would know (ok, the current scripts would not but the people running them would know how to amend them to respond).
For that reason hived uses median of witness price feeds to produce an official feed entry.
Median of what set of feeds? Top 20? Top 20+1? Is there any input from backup witnesses taken?
They actually don't. They broadcast HIVE->BUSD or HIVE->BTC->USDT, or HIVE->BTC->KRW->USD. HIVE->HBD from internal market is also taken into account by some witnesses. For the purpose of price discovery all major stablecoins are considered dollars. It doesn't matter if you can actually perform all the steps to exit to fiat dollars - after all you might be limited by sanctions (if you are f.e. from Iran or Russia) or regulatory burden (if you are US citizen). There might also be fees to be paid on each step of conversion and they are also different for individuals, so they can't be taken into account.
When some form of dollars turns out to be trading above "global consensus" of dollar price, like we had recently with HBD, it is an opportunity for quick profit. It is not limited to crypto, although I think in banking system the opposite happens more frequently. The example of one form of fiat dollars being worth more than the other would be if you are in a country with crappy economy and you have some dollars in your bank account, but you can't transfer them abroad and you can only exchange them with fake official rate, while real (black) market rate is vastly different. In such case dollars in physical cash will be worth more than those in the bank.
[rant mode on]
But it happens in "stable" countries too. Banks and other financial institutions keep mix of MBS-dollars, USTreasury-dollars, Gold-dollars, CorporateBond-dollars and whatever dollars printed from myriad of assets used as collateral and for inter-bank settlements. When system is healthy (on the surface) we all think we have "actual dollars" on our bank accounts. But when some form of collateral turns out to be mostly fake (like in 2008), the dollars that sprung from that asset disappear, and everyone learns what was true all along: you don't have dollars in YourBank, you have YourBank-dollars. Nothing really changed since the time when each bank printed its own banknotes, just introduction of central banks, lenders-of-last-resort, helped to muddy the waters. At least in crypto everyone can decide for themselves which and if any form of stablecoin to keep, so they are not much affected if some other form fails.
[rant mode off]
All witnesses from current schedule are taken into account, which means top 20 plus one backup that happened to be in schedule active at time of feed entry creation.