All you need to know 1inch Fusion

1inch crushed the competition by 16%

1inch Network-photo

by 1inch Network

• 4 min read

Recent tests show that 1inch products are up to 16% more gas efficient than competitors' products. 

When a user makes a token swap on a decentralized exchange (DEX), one of the key factors affecting the final price is gas consumption by protocols involved in the swap transaction - and the swap route could be very complex, involving multiple liquidity pools.

1inch has always been focused on reducing gas costs to make swapping experience more efficient, cost-effective and accessible.

To analyze the gas efficiency of our protocols’ latest versions against competitors’ offerings, the 1inch team created gas-measuring tests and published them in our public GitHub repository, which also enables users to run tests and draw their own conclusions.

Based on the test results, 1inch proved to be the most efficient, consuming up to 16% less gas than competitors. Overall, these findings demonstrate 1inch’s commitment to keeping gas costs low across all swap protocols, which is essential for offering the best swap prices on the market.

The test conditions were:

  • All tests were run on the same chain state to ensure the starting conditions are equal
  • For intent-based orders, we created a simple resolver that works with all protocols to ensure that we measure protocol efficiency rather than resolver efficiency.

Intent-based orders / 1inch Fusion

Major players in the area of intent-based swap orders include 1inch (1inch Fusion), Uniswap (UniswapX) and CoW Swap. Each of these projects employs its own technology, featuring varying degrees of centralization. All of these protocols offer protection from MEV attacks and price slippage.

  • 1inch Fusion. Orders are processed on-chain by conducting a Dutch Auction among competing resolvers, which ensures the best prices for users. The only centralized element is priority order filling.
  • UniswapX. Orders are processed on-chain by conducting a Dutch Auction among competing resolvers. It has a centralization component that allows resolvers to compete for priority order filling.
  • CoW Swap. A centralized solution* in which a batch auction starts off-chain[1][2] and the winning resolver subsequently fills the order on-chain.

Given that different scenarios can follow various execution paths, in our tests, we aimed to cover the most frequent scenarios. Our testing focused solely on the on-chain components of the protocol. The following types of swaps were used in the tests.

  • Without a callback by EOA - a simple swap in which a resolver initializes a transaction and transfers assets from its wallet (EOA), without the ability to intervene during the process.
  • Without a callback by contract - a simple swap in which a resolver initializes a transaction and transfers assets from its specially designated contract, without the ability to intervene during the process.
  • With a callback, a resolver uses its own funds - a swap initiated by a resolver from its contract. The resolver can, for example, exchange the maker’s assets on any DEX in the process of filling the order to return the maker the requested asset amount. The final transfer of assets to the maker is done from the resolver’s contract address.
  • With callback, a resolver uses taker funds - the same, as previously, but the final asset transfer to the maker is done from a third-party address.

The graphs below display the gas usage, based on recent tests conducted by the 1inch team. Each entry represents the amount of gas used for a swap under identical conditions.

Findings

Despite being a fully decentralized protocol, 1inch Fusion shows a 10%-16% gas economy in the first three scenarios and a 6-12% gas economy in the final one, compared to the competitors.

Limit orders

The next round of tests focused on ordinary limit orders in which a fixed amount is swapped for a fixed amount, without the use of extensions or other settings. Besides an ordinary swap, a 1inch limit order can be flexibly extended to fit almost any imaginable swap scenario. However, for accuracy of comparison, we only used the basic swap scenario.

In this case, we compared the 1inch Limit Order Protocol with limit orders protocols of Uniswap, 0x and Paraswap in two types of swaps:

  • A swap of the chain’s native currency to DAI (only Uniswap supports this type of swap)
  • A swap of the chain’s wrapped native currency to DAI

Findings

Swapping native currency with a Uniswap limit order will cost 25% more gas than with a 1inch limit order. For ERC-20 token swaps, the gas difference with the worst result is 50% in favor of 1inch.

1inch Router

The 1inch Router protocol is designated to execute pre-defined swap routes, on which the actual amount of consumed gas will depend. Therefore, we tested routes with up to 4 jumps on the most frequently used liquidity pool protocols:

  • Uniswap v2 pools
  • Uniswap v3 pools
  • Mixed pools (a comparison was done only with Uniswap)

Both ERC20 tokens and the chains’ native currency were used for the tests.

Findings

Once again, the 1inch router proved to be the most efficient, consuming up to 10% less gas than competitors.

Meanwhile, any user can make sure of that by inspecting and contributing: they can run tests by themselves on-chain running the simple terminal command “yarn && yarn test.” Detailed findings of the tests, as well as instructions enabling any user to run the tests, are available here.

Stay tuned for more 1inch analysis and insights!

* These are proofs of CoW Swap’s centralized nature. 1. Batch auctions. 2. Order flow

1inch Network-photo

1inch Network

Share the article

Copy done!
Copy done!