Speed Up or Cancel an Ethereum Transaction with KyberSwap

Sunny Jain
KyberSwap
Published in
3 min readSep 11, 2020

All transactions on the Ethereum blockchain (known as on-chain transactions) go through following 4 main stages.

  1. User Confirmation— Signing a transaction with the wallet’s private key
  2. Broadcasting — Broadcasting the signed transaction on the blockchain
  3. Mining — Waiting for the transaction to be mined by Ethereum miners
  4. Completion — Success or Failure

Due to the immutable nature of the blockchain, once the transaction is completed (Step #4), it can’t be changed. KyberSwap trades are performed fully on-chain on Ethereum, so all successful transactions also follow these 4 stages.

Here we discuss your options if you broadcast a transaction by mistake or if your transaction is stuck in the mining phase (#3) for a very long time.

1. Cancelling a pending transaction

Example: Alice tried to make an ETH to KNC swap using LOW gas price. Transaction has been pending for over 20 minutes and Alice wants to cancel the transaction.

On the KyberSwap mobile app, Alice can follow these steps to cancel the transaction:

Explore Tab → Transactions → Pending → Left Swipe → Cancel

Attempt to cancel a transaction with the KyberSwap mobile app

Behind the scenes, KyberSwap broadcasts a new ‘Self-transfer’ transaction.

  1. The ‘Self-transfer’ transaction attempts to transfer 0 ETH from the user’s wallet to itself (the same wallet address).
  2. The transaction is broadcasted with the same nonce as the pending transaction but with 10% higher (faster) gas price. Due to the higher gas price used, chances of the Self-transfer transaction mining BEFORE the pending transaction are very high. Do note that this isn’t guaranteed.
  3. If the new transaction is successfully mined, the earlier (pending) transaction with the same nonce will be dropped or replaced. You don’t pay additional gas for dropped or replaced transactions.

2. Speeding up a pending transaction

Using the same example — Alice is making an ETH to KNC swap using LOW gas price. Transaction has been pending for over 20 minutes and this time Alice wants to speed up the transaction.

On the KyberSwap mobile app, Alice follows these steps:

Explore Tab → Transactions → Pending → Left Swipe → Speed Up

Behind the scenes, KyberSwap broadcasts a new transaction:

  1. The new transaction attempts to do the same ETH → KNC swap as the original pending transaction. Before broadcasting, the app prompts Alice to choose the gas price for this transaction. Alice is expected to choose a higher gas than the original pending transaction.
  2. The transaction is broadcasted with the same nonce as the earlier (pending) transaction but with a higher gas price. Due to the higher gas price used, chances of the new transaction being mined BEFORE the pending transaction are very high. Do note that this isn’t guaranteed.
  3. If the new transaction is successfully mined, the earlier (pending) transaction with the same nonce will be dropped or replaced. You don’t pay additional gas for dropped or replaced transactions.

As you can see, cancelling or speeding up on-chain transactions using the KyberSwap mobile app is a piece of cake! Download our mobile app now! Follow us for more exciting updates and tips about the Ethereum blockchain.

Other Information

👉🏻KyberSwap Support Helpdesk

👉🏻Why KyberSwap?

👉🏻KyberSwap Official Telegram

👉🏻Get started on Ethereum with KyberSwap

👉🏻Tips for trading on KyberSwap

👉🏻Follow KyberSwap Twitter Announcements

👉🏻Download KyberSwap Android App

👉🏻Download KyberSwap iOS App

👉🏻Website: KyberSwap.com

--

--