Cointime

Download App
iOS & Android

1inch Unveils RabbitHole Feature to Protect MetaMask Users From "Sandwich Attacks"

Validated Project

The 1inch RabbitHole feature will protect MetaMask users from sandwich attacks, one of the most common ways of extracting MEV in DeFi.

The 1inch Network is thrilled to introduce the 1inch RabbitHole, a brand new feature that aims to protect MetaMask users swapping on 1inch from sandwich attacks — the most common type of front-running.

Sandwich attacks explained

When making swaps on decentralized exchanges, users can potentially become victims of a so-called “sandwich attack,” a way of getting maximal extractable value (MEV). Although technically not illegal, sandwich attacks are still a type of manipulating crypto prices by taking advantage of decentralized exchanges’ underlying tech. And a sandwich attack could lead to significant losses for a user.

To run sandwich attacks, specifically created bots are used that scan decentralized exchanges’ memory pools (mempools) where transactions are waiting to be processed. If a bot detects a large pending swap trade, it initiates two transactions: one before the trade and the other one after the trade, basically “sandwiching” the victim’s trade. To get the first transaction directly before the victim’s trade, extra gas fees are paid.

Say, a user wants to buy 1,000 X tokens for 20 Y tokens with a 1% slippage tolerance — meaning that the minimum amount of X tokens they agree to receive is 1,000–1% = 990.

A sandwich bot detects the trade and places a buy transaction for Y directly before the victim’s trade and a sell transaction for Y directly after the victim’s trade. Subsequently, three transactions are executed.

  • Transaction 1: the bot executes the buy transaction, and the high purchase of asset Y pumps its price.
  • Transaction 2: the victim buys Y at a higher price than originally expected, and the large trade pumps Y’s price even higher.
  • Transaction 3: the bot sells Y, pocketing the price difference.

As a result, the user loses their 1% entirely.

The very first sandwich attack is believed to be carried out on Bancor on February 27, 2018:

Since then, users have lost substantial funds due to sandwich attacks, which hit roughly 4% of all swap transactions. In 2022 so far, estimated losses have amounted to the equivalent of at least $800 mln.

The 1inch RabbitHole: a shield from sandwich attacks

The 1inch RabitHole is a feature that solves the problem of sandwich attacks by sending swap transactions on 1inch directly to validators and avoiding putting them to the mempool where sandwich bots can attack them.

To achieve that, the RabbitHole aggregates providers, such as Flashbots, BloXroute, Eden and Manifold, that enable sending swap transactions directly to validators.

The RabbitHole will specifically benefit MetaMask users, as, while some crypto wallets (including the 1inch Wallet, Ledger and Trezor) are capable of creating and signing a transaction, but not broadcasting it immediately, MetaMask is not.

The RabbitHole is designed as a proxy, connecting 1inch users’ MetaMask wallets and Ethereum validators. Its unique algorithm will check swap transactions on 1inch for the threat of a sandwich attack, and, if such a threat is detected, the transaction will be sent directly to validators, using one of the aggregated providers.

For a testing period, the RabbitHole will be free to use. Upon receiving feedback from the community, a decision will be made regarding payment options for the RabbitHole. One possible option could be staking a certain amount of 1INCH tokens.

A step-by-step guide on using the 1inch RabbitHole is available in the Help Center.

Comments

All Comments

Recommended for you

  • BTC breaks through $69,000

     the market shows BTC breaking through $69,000, currently at $69,021.49, with a 24-hour increase of 1.15%. The market is highly volatile, please manage your risk accordingly.

  • Spanish Foreign Minister: Not worried about any consequences of refusing US access to military bases

     on March 3 local time, Spanish Foreign Minister Alvarez defended the Spanish government's refusal to provide the Rota and Moron military bases to the United States for participation in attacks on Iran. Alvarez stated that the operation initiated by the United States and Israel is not supported by the United Nations and is not part of the bilateral agreements allowing the use of the aforementioned Spanish sovereign military bases. Alvarez also said that the Spanish government is not concerned that this stance will have any consequences. Alvarez stated: "The position of the Spanish government represents the will of the vast majority of the Spanish people as well as the vast majority of people worldwide, which is to defend the UN Charter, respect international law, and believe that cooperation is always more powerful than confrontation."

  • Spot gold plunges nearly $100 in the short term.

     spot gold plunged nearly 100 dollars in a short time, spot gold fell below 5170 dollars/ounce, with a daily decline of 2.94%. 

  • BTC falls below $67,000

    the market shows BTC fell below $67,000, currently at $66,996.93, with a 24-hour increase of 1.18%. The market is highly volatile, please manage your risk accordingly.

  • ETH breaks $2,000

    the market shows ETH breaking through $2000, currently at $2001.64, with a 24-hour increase of 2.89%. The market is highly volatile, please manage your risks accordingly.

  • The US spot Bitcoin ETF saw a net inflow of $962.48 million yesterday.

    according to Trader T's monitoring, the US spot Bitcoin ETF had a net inflow of 962.48 million USD yesterday.

  • BTC falls below $66,000

     the market shows BTC fell below 66,000 USD, currently at 65,986.66 USD, with a 24-hour decline of 1.31%. The market is highly volatile, please manage your risks accordingly.

  • BTC falls below $66,000

     the market shows BTC fell below $66,000, currently at $65,973.16, a 24-hour drop of 2.66%. The market is highly volatile, please manage your risks accordingly.

  • ETH breaks $2,000

    market shows ETH breaking through $2000, currently at $2000.29, with a 24-hour increase of 3.73%. The market is volatile, please manage your risk accordingly.

  • The United States uses Anthropic's artificial intelligence technology in its airstrikes in the Middle East.

     United States used Anthropic's artificial intelligence technology in airstrikes in the Middle East, and just hours before the attack, Trump had just issued a ban against Anthropic.