A private transaction is now available to all 1inch users who want to exchange assets safely without worrying about potential losses from front-running.
Just like in traditional finance, front-running is an acute issue for blockchain-based decentralized exchanges. In a nutshell, front-running is a phenomenon where the third party attempts to intercept a large transaction. By reordering the way transactions are meant to be mined on the blockchain, a front-runner steps exactly in front of a transaction in an effort to influence the market price and profit from it, respectively.
Upon signing, all transactions are broadcast to the mempool where they remain pending until miners pick them and add to the block. This mempool of pending transactions is a great source of information about transferred values and respective gas prices. The logic of ordering transactions in a block is that the cheapest one will be picked up the latest. By monitoring broadcast transactions in the mempool, a front-runner can easily set the gas price higher than that of a targeted transaction and secure priority execution of his/her transaction.
From now on, through the 1inch exchange interface, any user can set a private mode of his/her transaction, which means that it will not be seen by the third party in the mempool, as it will not be broadcast there.
This feature is possible due to a direct connection between 1inch and miners who provide this service. As soon as a transaction is mined, it is added to the block and gets visibility by anyone.
As a result, a user can be sure that his/her transaction will not get front-run and will be executed at a target price. The processing of a private transaction may take longer but you can rest assured that the data won’t be disclosed before the transaction is added to the block.
There is no additional cost for private transactions.
How to set a private transaction?
To take advantage of the private transaction feature, do the following:
- go to 1inch.exchange, ‘exchange’ tab;
- connect your wallet;
Please, note that private transactions do not work with Metamask and WalletConnect (Ledger, MEW etc. are compatible)
- fill the ‘you pay’ and ‘you receive’ fields;
- unlock your tokens for a swap, if needed;
- hit the ‘swap token’ button;
- in the verification window, select the option ‘send as private transaction’;
- confirm the transaction in your wallet;
- wait for the banner informing you that the transaction has been mined.
We put our best effort into private transactions. However, in some cases, transactions might still be publicly exposed before confirmation. Such cases include but are not limited to:
- a block containing a private transaction becomes an uncle block;
- the blockchain reorganizes and a block containing a private transaction becomes an orphaned block.
Private transactions still conform to the gas price requirement. If the gas price is too low, confirmation takes longer, or the transaction could even get lost.