⛓ Managing Transactions on Ethereum

A quick overview of some key concept related to transaction management and ordering on the Ethereum network

Transactions on the Ethereum network are validated thanks to a consensus of miners. They can clear very fast, take a long time, or even fail. This page helps you understand why that happens.

Understanding the different transaction status

On the Ethereum network, everything starts by submitting a transaction - which can then succeed, fail or be replaced:

  1. Submitted: the transaction is ready to be picked up by the miners and broadcasted on the blockchain (if valid).

  2. Success: the transaction cleared - there is no going back.

  3. Failed: the transaction failed because it was not valid - see more below.

  4. Canceled, Replaced, Dropped&Replaced: the transaction was canceled or replaced by another, see more below

⛽ Transaction Status - Gas Cost Overview

Status

Gas Cost Incurred & Status

Submitted

Expected cost (not paid yet)

Success

Actual Gas Cost (lower than expected)

Failed

The gas cost is still incurred

Canceled or Replaced

No gas cost incurred

Why do transactions fail?

If the gas price of a given transaction is too low to be picked up within a reasonable amount of time, your swap will most likely fail because the price changed.

Depending on the specifics of your trade, ParaSwap can secure a minimal expected price only for so long - we recommend defaulting your transaction to a fast gas price to avoid any risk of failure.

Transactions can fail for various a range of other reasons, such as invalid input parameters.

What happens when several tx are on the same nounce?

On top of all their other parameters, Ethereum transactions are submitted with a "nounce". The nounce represents the order of transactions made by an address - it increases with each transaction.

Several transactions can be submitted on the same as long as no transaction was cleared on that nounce yet. In such a case, once the first transaction succeeds (most likely the one with the highest gas price), all others will be "dropped and replaced".

It means that to replace or cancel a transaction, you can submit another one on the same nounce with a higher gas cost than the original.