You did not approve USDT to the router address before attempting the swap.
The USDT contract uses assert
instead of revert
or throw
to cancel the transaction because of the lack of approval. Using assert
will consume all the gas left. It's bad practice by Tether to use assert
, but it's probably because their contract is really old.