Failed swap the fees for it were deducted

Hi , I don’t know why fail swap.
can anyone explain where I made a mistake.

Hi,

Yesterday, I tried the Balancer Swap app (Balancer Exchange) though my Coinbase Wallet to make a simple swap between UNI and xHDX. The transaction was confirmed successfully and the fees for it were deducted but the swap never happened.

Here is a copy of the transaction
Ethereum Transaction Hash (Txhash) Details | Etherscan.

Any Idea?

This swap wasn’t successful; it failed. Even a failed transaction on Ethereum costs gas. The error given, ERR_LIMIT_OUT, implies that the price slippage was beyond your tolerance, so the transaction reverted to save you from front-running. When the price moves very fast, transactions can occasionally fail. The default slippage tolerance is 0.5% and it can be changed within the Balancer Exchange (there is a gear icon at the top-right of the modal). If you suspect that the token pair you are trading might be volatile, it’s best to increase the slippage tolerance to 1% or 2%.

The reason for this is that if you accepted infinite slippage, for example, someone could spot your transaction in the mempool and make a “sandwich attack” on you. This user would buy a ton of xHDX, then let your transaction go through (so you’ve now bought at a much more expensive price than you were quoted on the UI), and then the user would sell xHDX at the markup created by your purchase to turn a quick profit. So slippage tolerance is very important, and there’s a reason we have it set at 0.5% by default: it’s high enough to let most transactions succeed while still low enough to protect from the occasional front-run attempt. Of course, every once in a while, in a volatile market, a transaction will fail. That stinks but it’s the best-case scenario.

Hi.
The default slippage I set to 4 %.
So if I understand correctly, the higher the slipagr tolerance, the greater the chance that someone will “steal the gas” and I have nothing.

Theoretically, I know where to find my fee ended.

It’s the opposite: the lower the slippage tolerance, the higher the chance of a failed transaction. Increasing it to 4% here was a smart move, but unfortunately there was unprecedented demand for this particular token sale and the price was moving very fast.

To be clear, the Ethereum miners get the gas fee, not Balancer.

The slippage tolerance is directly proportional to the value of the gas?

The two are completely independent. Slippage tolerance applies to the value of your trade (i.e. the minimum number of xHDX tokens you are willing to accept as payment for your UNI tokens), whereas the price of gas is determined by Ethereum network demand and denominated in ETH.

The reason there is any correlation at all is because the longer it takes for a transaction to be mined, the greater the probability of price on the market slipping beyond your maximum tolerance. And in order to have a transaction mined faster, you must provide a larger gas payment.

Imagine the extreme scenario where you set your gas price so low that it takes a year to be mined; will the market price of your token pair (xHDX/UNI) still be close enough to what you specified in your transaction, or will you pretty much get some completely unpredictable new price? Slippage tolerance protects you by throwing away your transaction if the price discrepancy is too large. And while the timescale of my example was a year, you can imagine that in certain highly volatile crypto markets, it only takes a few minutes for the price to move 5% (and therefore overwhelm your 4% slippage tolerance).

Because at that moment there was a lot of movement with the price of xHDX and the set slip tolerance was not enough.
The algorithm evaluated that I would get less xHDX than I requested and so ended the swap with an error.
If the fee was a few euros, I would not regret that my gas burned down.

I know the fees
are paid to miners, but the higher the fee, the more people are discouraged. I personally will not change for a long time.
It’s not good for me right now.

Thanks for explaining where I made a mistake.

I just had the same problem. Luckily it wasn’t a large transaction.
Tried to swap 291 USDC for 0.16 ETH @ 0.006 tx fee.
The ETH fee was taken but that was where it ended. No USDC taken from my wallet and no ETH credited. So what should I do?