We have that case coded. It uses the fallback token (in this case BTRFLY) if the primary token the user inputs (in this case xBTRYFLY) does not return a price from the Moralis price API. However, in this case, it does return a price, and it’s a very wrong price. So this code does not kick in.
The other way to code it would be to try the fallback token first, but that is no good because sometimes the fallback token does not trade in line with the primary. For example, if the user wants a quote for stETH and we fall back to ETH, that doesn’t work when stETH breaks its peg.
If the user asks for an apple, you always try to give them an apple before falling back to a pear.
What we need is a price API that functions as advertised in the docs: If there is not enough liquidity to return an accurate price, we should get an error instead of a crazy price.