Please note, this article is for MetaMask swaps performed with the swap button within our app or extension. For all other swap inquiries, please contact the third-party swap system you used, as they will have a better understanding of their system's intricacies, nuances, and issues.
There are two main reasons why a swap might end up with less "value" in terms of dollar (fiat) amount.
1) Price slippage - every swap has a preset price slippage limit to it. This % prevents the swap from completing outside of the range. So say the slippage is set to 5%, and you bought 100 X tokens. You could end up with 96 tokens.
2) Price difference (or price impact) - before approving a swap quote, check to see if there is a warning of a price difference. This warning is important to review as it is stating the output is at a large difference from the spot price of the token at that moment. Our warning for this will look like:
MetaMask Swaps fetches multiple quotes from various DeFi protocols. When you execute a swap through MetaMask, you interact directly with the liquidity source that offered the best price for your requested trade. MetaMask does its best to optimize each transaction before the swap is submitted.
However, MetaMask cannot guarantee that every transaction will be successful because the market and network conditions can vary dramatically, especially when highly volatile assets are traded. In your case, the swap failed due to slippage and was reverted because the tokens that you were about to receive were lower than the 2% slippage that was set on the trade.
The transaction failed in order to protect you and your funds. When a swap reverts, some of the gas fees are routed to the Ethereum miners, who process the transactions on the network. It is worth noting that MetaMask did not get any fees from your failed transaction.
Next time you decide to trade a highly volatile asset, make sure to increase your slippage preferences and gas for the transactions as it will increase the likelihood that your swap will successfully go through.