DAI to xHDI swap wouldn’t go thru. Appears problem with the exchange. Transaction timed out. Out $91.32 ETH for it.
see my post. i have same problem
Transactions don’t time out, but they can fail to execute as specified. And when they do fail, it still costs gas. Unfortunately, in the current gas environment, where gas prices are 10x what they were just a few months ago due to increased network demand, this means that failed transactions can be quite costly. This resource explains the reasoning for this model, and it applies universally to everything on Ethereum:
On Balancer specifically, the most common cause of a failed transaction is volatile price action. When you submit a transaction, you specify a limit to the price slippage you are willing to incur on the swap. By default, this limit is set at 0.5%, which is a nice compromise in most markets between success probability and swap pricing. But you can set it to whatever you’d like using the gear icon on the swap page.
The reason for this limit is that, if you accepted infinite slippage, 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. Of course, every once in a while, in a volatile market, a transaction will fail. That stinks but it’s the best-case scenario.
Thank you so much for the response. I am new to this so your information helps with learning.
Etherscan indicated on the transaction status a Fail with error ‘ERR _LIMIT_OUT’ and underneath the contract area it shows warning! Error encountered during the contract execution.
So does the information above support what you said below?
It does, yes. The ERR_LIMIT_OUT is shorthand for this:
“The transaction failed with an error because the number of tokens to come out of the swap was less than the minimum amount (limit) specified.”
And this is all about price slippage. When you make the swap, you specify the number of tokens you will provide (DAI) and also the minimum number of tokens you would accept as payment (xHDX). If, after the swap is computed, the number of xHDX to be received is too small, the transaction fails: you would have gotten a worse deal than you bargained for, and this mechanism exists to protect you from committing to a bad deal. Because transactions aren’t always immediately mined, there can be a discrepancy between the deal you committed to on the UI and the deal you actually get at the time of confirmation.