Can I cancel a smart contract once I've initiated a trade?
Asked 4 years ago
Can I stop my transactions from executing If I set my slippage tolerance too low during peak trading time? I'm worried that I've set the slippage too low, that the transaction may fail, and that I will lose money through gas fees.
Truman Perry
Thursday, September 15, 2022
Yes, you can cancel a pending DEX transaction either through in-application cancellation or setting a custom nonce. Typically, a DEX transaction may be left pending for some time or stuck when you submit with a low slippage tolerance or gas fees. The easiest method of cancelling a pending transaction is through in-application cancellation. You simply need to exit your web3 wallet app and close your browser, reopen it and log back into the app.
Alternatively, you can cancel a pending transaction by setting a custom nonce – creating a 0 token transaction with a high gas fee to your own address to limit a previous transaction from being executed. Before initiating the second transaction, you should note the nonce of the pending transaction and reuse it. In other words, both transactions should have the same nonce.
Please follow our Community Guidelines
Related Articles
/filters:quality(80)/entail/Placeholder_Image-1736949779751.png)
Key Features of DeFi Explained
Filip Dimkovski
March 16, 2022
/filters:quality(80)/entail/Placeholder_Image-1736949779751.png)
How to Invest in the Ampleforth Stablecoin
Anderson Ezie
April 30, 2022
/filters:quality(80)/entail/Placeholder_Image-1736949779751.png)
DAO NFTs: What They Are and How They Work?
David Akilo
June 6, 2022
Related Posts
Filip Dimkovski
What Is Slippage in Crypto?
Filip Dimkovski
Pangolin: Avalanche's Innovative Cross-Chain DEX
Thasni Maya
Swap vs. DEX: What's the Difference?
Marcel Deer
Different Types of Smart Contracts
Can't find what you're looking for?