Developers
Use cases
Knowledge hub
Background
LI.FI knowledge hub
the problem

Announcing LI.FI — Plug&Play Interoperability

Hello Omnichain World!

tl;dr we build a dapp-widget to buy, invest or deposit any asset from any chain, directly into your dapp. All bridges & DEXs aggregated + a nice UX for the whole process.

After being one of ETHGlobal’s HackMoney winners and KERNEL projects from June 2021, we’ve been working actively with bridge projects to improve the interoperability landscape. In this article, we’d like to describe a greater picture of what we aim to do.

The blockchain ecosystem is becoming multi-chain, liquidity is fragmenting, and even given any power law, we believe there will be plenty of relevant blockchains around.

Who we are

Our vision is to create a middle layer between DeFi infrastructure and the application layer. LI.FI aims to aggregate and abstract away the most important bridges and connects them to DEXs and DEX aggregators on each chain to facilitate cross-chain any-to-any swaps.

We believe that in the future, users shouldn’t care about which chain they are on when they arrive on a dapp. People new to crypto shouldn’t have to learn how to use DEXs and bridges to swap or move their funds. Thus, abstracting away these things and making it easy for developers to let users come from anywhere is our mission.

LI.FI allows users to swap any asset from any chain directly into the required asset on the dapp they are on. For that to happen, developers can implement our bridge & DEX abstraction solution either on the protocol level it in their frontend as a widget. We want to help the crypto ecosystem to grow up and we consider ourselves UX maxis.

Li /lɪˈ/ in LI.FI is an abbreviation for linked.

ArticleImg

Start using new dapps without having to leave them (bridge & swap on the spot)

Why and how to use bridges to go multi-chain?

As the space becomes more competitive and users and dapps start going multi-chain, implementing bridges becomes a clear competitive advantage as they allow for faster product adoption, enable innovation, and will soon become a necessity to grow.

There are three ways to go multi-chain:

  1. Deploying your dapp on another chain

    This makes sense for cases like DEX aggregators as they’d have to aggregate chain-specific DEXs or for lending protocols that want to support assets on different chains as collateral without having to move them cross-chain.

    Cons: * Fragments your liquidity * Creates communication overhead * Increased technical maintenance

  2. Implement a bridge on protocol level

    A contract could call a bridge in order to move funds on another chain or in order to trigger certain activities on another chain’s deployment. For example, Yearn could drive cross-chain vault strategies this way.

    Cons: * Assessment of bridges is hard * As of now, a single bridge provider is considered a risky dependency * Limited by the bridge’s capabilities

  3. Implementing a bridge aggregation protocol (LI.FI) This can happen either on-chain by using our generalized bridge protocol or on your dapp’s interface, by implementing our bridge&swap widget, which allows users to buy into your dapp with any asset on any other chain (think Paypal/Stripe). Instead of implementing a specific bridge, you can have them all by implementing a bridge aggregation solution like ours. That way, you’d gain ever-growing access to a multitude of bridges.

Which bridge to implement?

We’re counting >50 different bridging solutions (at the time of writing), and they’re all coming with different strengths and drawbacks. We’ll also write a lot about them in the future, so make sure to follow us!

The status quo for bridges is that:

This means that implementing a bridge by yourself results in a risky and maintenance-heavy dependency.

You need to implement more than one bridge

ArticleImg

Bridge & DEX aggregation out of the box

If we want to do this safely, we would conclude that we’d need to implement and thus abstract away multiple bridges. Only that way, you’d cover all relevant blockchains and have a fallback solution in place if a bridge’s liquidity pool is drained or if you have to rip out a bridge due to a hack.

Implementation and maintenance overhead quickly multiply as the number of bridges increases. On top, you’d have to make algorithmic decisions about which route to take for which swap — smart routing.

As every bridge will tell you that they are the fastest, cheapest, and most secure, the whole process requires a continuous and challenging assessment of all of them. To learn more about why it isn’t that simple, you can look into the interoperability trilemma by Arjun Bhuptani (Connext) or listen to James Prestwich (formerly Optics).

Bridges alone are not enough; you need DEXs as well

As bridges are fighting for liquidity, most widely-used bridges only support stable coins and native currencies. If your users want to swap their CAKE on Binance into your dapp on Arbitrum, you’d not only need to implement a bridge at most minuscule a DEX on top of it and combine both steps into a friendly UX.

Why you should implement LI.FI instead of any particular bridge

A quick summary of what we’ve discussed:

  • The integration of bridges could be an excellent gateway for users to instantly use any dapp, regardless of where the user is coming from.

  • Bridges bring plenty of problems and maintenance with them.

  • One bridge alone won’t be sufficient.

  • When considering implementing a bridge, I might also have to add DEXs & DEX aggregators to it.

UX is king — our widget(s) & SDK are paving the way

We haven’t yet spoken about the user experience when bridging. Bridging takes a lot of time which brings a lot of uncertainty. This has to be reflected in the UX and needs to continuously be iterated on. We’ll do that for you.

ArticleImg

Let your users buy into your dapp the way you want.

Our bridge & DEX aggregation will be made available as a Javascript SDK that connects to all kinds of wallets on each chain. This SDK will also provide a pleasant and customizable swapping widget for your dapp so that the long waiting time and transfer process are becoming trustworthy and transparent as possible. Our integration partners are also able to monetize the widget & SDK by adding a fee per bridge/swap. This might be important if the bridge/swap functionality is a crucial part of our integration partner’s business model.

Here is what happens behind the scenes in greater detail:

ArticleImg

Customizable functionality and look & feel

Aggregation and Abstraction

The bridge abstraction is based on an upgradable contract which only needs to get implemented once. It then gets extended as more bridges and optimizations become available. The contract also connects to all the DEXs & aggregators to allow more complex any-to-any swaps. We’ll thereby allow on-chain, cross-chain, and multi-hop/multi-bridge swaps.

Smart Routing (Finding The Best Route)

Our algorithm uses all available bridges, DEXs, and DEX aggregators and pairs, splits, and handles transactions as needed to save on as much gas and fees as possible. For very large transactions, you might want to use slower but more secure bridges. The steps involved in this process are finding data sources that are suitable and near to real-time; unifying, mapping, validating the data; and using an architecture that allows quick and effective path-finding. Smart routing is happening off-chain. We aim to decentralize this as much as possible, but for now, it would simply be too expensive and slow to do this on-chain.

Bridge Assessment

To decide which bridge to use, we assess and measure the degree of decentralization, trust assumptions, fees, gas efficiency, speed, and other qualitative and quantitative factors. Then, we use the thresholds and preferences of our integration partners and end-users to select the right path.

Preferred Routing

Li.Fi’s Smart Routing API also allows you to whitelist, blacklist, and prioritize certain DEXs, aggregators, or bridging solutions based on your own preferences and concerns.

Easy implementation

It’s going to be so easy to implement this into a dapp. Zero overhead maintenance is required. Our widget will be lazy-loaded and of course, optimized on all levels when it comes to caching and security. Our founders have years of experience in this and are ultimately prepared to bring this know-how to crypto.

ArticleImg

Installed within a few minutes, lazy-loaded — performant and low maintenance

Staying ahead of the curve

It takes an immense effort to keep track of protocol and SDK updates, manage dependencies, acknowledge and evaluate new bridges, and take into account many other factors to keep the system maintained, optimized, and secure. More than 50% of current bridge builders in the dApp ecosystem have invested in the LI.FI project to make that process even more seamless.

This is just the beginning

We’re not building yet another bridge. We’re an aggregator and we’re UX maximalists, aiming to push the ecosystem to a new level. We’ve partnered up with the brightest minds from different bridging solutions and aggregators to learn from the best. We aim to build the best abstraction and aggregation solution available on the market.

Thanks to Akshaya D N, Conner Drake, and Lasse Clausen

FAQ: Announcing LI.FI — Plug&Play Interoperability

Get Started With LI.FI Today

Enjoyed reading our research? To learn more about us:

Disclaimer: This article is only meant for informational purposes. The projects mentioned in the article are our partners, but we encourage you to do your due diligence before using or buying tokens of any protocol mentioned. This is not financial advice.

Compass Integrates LI.FI to Enable Seamless Swaps

Tails Integrates LI.FI's SDK