- ConsenSys teams MetaMask and Codefi collaborated to create MetaMask Swaps, a feature that draws information from multiple decentralized exchange aggregators, professional market makers, and individual DEXs—including Uniswap, AirSwap, 0x API, 1inch.exchange, Paraswap, and Totle—to ensure users have the best pricing information with the lowest network fees.
- MetaMask users also benefit from additional features which provide for fewer approvals, reduced gas costs, and user-interface tools such as slippage protection.
- The simple, streamlined experience reduces friction for new token users—bringing more people, greater transparency, and increased efficiency to DeFi on Ethereum.
A disjointed peer-to-peer trading experience involving various liquidity protocols, multiple approvals, and high gas costs
The year 2020 saw the largest scale adoption of decentralized exchanges (DEXs). Compared to centralized exchanges, DEXs offer more pairs when trading, provide access to a greater diversity of tokens, and enable non-custodial swaps that keep funds safer. However, DEX users often don’t receive the best price when there is insufficient liquidity, or if a particular DEX doesn’t offer the most attractive price.
Before MetaMask Swaps, users needed to navigate many DEXs to compare prices and swap tokens. However, using a single DEX or DEX aggregator did not always yield the best price for every trade, as each aggregator performs differently under different circumstances. Additionally, users needed to approve each token on each DEX, incurring expensive gas costs.
MetaMask collaborated with the Codefi team to solve these problems, remove friction for millions of users, increase the efficiency of these systems, and further democratizing access to Web3 and DeFi.
A Price Information Aggregation API to remove user frictions and increase trade flow efficiency
MetaMask and Codefi together built Swaps, a feature that enables any Web3 or DeFi user to easily access the tokens they need for the sites they use. This gives users the flexibility to shop for the best decentralized exchange rates before making their purchase, via:
- Real time pricing information from multiple sources
- A secure, reliable digital wallet
- The convenience of the MetaMask app or web browser extension
Empowering Users to Select the Best Prices
The pricing offered through decentralized protocols depends on factors such as the size of a swap and the tokens a user is attempting to swap. Certain decentralized exchange protocols appear to perform better for certain types of trades. For example, automated market makers appear to provide users the best quotes for smaller trades, while request-for-quote based protocols appear to perform better for larger trades. By drawing information from the largest decentralized exchanges in the ecosystem— including Uniswap, AirSwap, 0x API, 1inch.exchange, Paraswap, and Totle—MetaMask Swaps allows users to access real time pricing information from a variety of sources all from the safety of their wallet.
Improving MetaMask’s User Experience for Swapping Ethereum Tokens
In addition to solving the price inefficiency problem, the Codefi Markets team also sought to improve user experience across multiple protocols. Each protocol (and the user interface that comes along with it) involved different paths to complete a trade. The Codefi Markets team abstracted these flows for MetaMask customers and provided a user interface for previously unconnected decentralized protocols— simultaneously providing solutions for both price inefficiency and user experience.