Why we Chose to Build an AMM Style Bridge
One of the design choices we decided upon when we first began building Swim Protocol was to create an AMM style bridge instead of a 1-to-1 bridge. Although this may seem like a trivial design choice for many and now that many cross-chain bridges are adopting the AMM style design, combining a bridge with an AMM was not often considered when we started Swim.
What is a 1-to-1 bridge?
1-to-1 design refers to bridges where if you swap 1 unit of a token from one chain to another, you will receive 1 unit at the end. Most chain-specific bridges are 1-to-1 in nature, for instance, Polygon’s PoS bridge & Avalanche bridge, which allow for the transfer of assets from Ethereum to the respective chains. Furthermore, you might not think of them as bridges, but wBTC and renBTC are both examples of 1-to-1 bridges as they are representations of BTC outside of the Bitcoin network.
These bridges are very popular and user-friendly because they are often sponsored by the destination chain, ie the Avalanche foundation team is incentivized to have more users participating in the Avalanche ecosystem. This means that the layer protocol team is responsible for customer support and ensuring there is sufficient liquidity and technological infrastructure for the user.
They also present a unique benefit, which is to incentivize projects within their ecosystem to use the bridge-version of the token. This ensures that tokens that pass through the official bridge will be adopted by the destination blockchain. One example of this is the variations of USDC on Avalanche. There is a native version of USDC created by Circle that is native on Avalanche, however, it’s seldom used and its supply is at $220 mm; the more popular and widely used USDC is a bridged representation of the USDC ERC-20 token on Avalanche (USDC.e) which has $1.8 billion in supply.
How could we have created a 1-to-1 bridge?
Our initial idea for Swim boiled down to this: what if we utilize Wormhole’s bridge messaging technology and whenever someone wants to bridge a token, we will “create/mint” that token on the destination chain. The process would look like this:
- Bob wants to turn USDC on Ethereum to Solana, he would swap it via Swim Protocol
- We receive his USDC ERC-20 and then burn it through Circle (Circle is the Official Issuer of USDC), once the burn is complete and that message is passed through by the Wormhole Bridge
- We mint USDC SPL on Solana via Circle and send it to the user’s Solana Address
For other tokens, we could work with individual projects to ensure that we can “create” their token on the non-native chain. This might work with a select few coins, but it’s very unscalable and also against the DeFi ethos. For example, the creation and redemption of USDC will require a more manual process and entities will need to route funds through a bank.
Alternatively, another design we floated around was to create a pool of a certain token that allows anyone to interact with the pool and exchange tokens 1-to-1. What that would look like:
- Let’s say there is a pool that consists of different variants of USDC on Swim Protocol
- Someone who wants to swap $1M USDC from Solana to Ethereum would interact with the pool and receive their token 1–1. Now the pool will have $9M USDC ERC-20 and $11M USDC SPL.
This design sounds good in theory, however savvy DeFi users will know that in volatile periods or periods where there is a large demand on one chain, you’d often see the pool extremely imbalanced. Without a proper incentive for arbitrageurs to balance out the pool, we’d often be left with a bridge that no one would want to use.
AMM Style Bridge
Through these initial ideas, it’s clear how we arrived at an AMM-style bridge. Our team understood that for different versions of the same coin, users might be willing to pay a slight difference in fees for the token to be in a different network. Reasons for this could be large yield farming opportunities in a new protocol or making sure your open borrow lending positions aren’t getting liquidated (we’ve all been there).
Larger trading firms who have access to the creation and redemption of these tokens will rebalance the pools if it ever becomes too imbalanced and keep prices in line with each other. They frequently trade hundreds of millions in volume everyday on defi projects for a few bps of edge. This also creates cross-chain dynamic pricing of all assets supported by Swim based on fluid user demand, constantly relocating capital to the most desirable ecosystems.
We are excited about the decision we made back then, and even more glad to see other bridges have come to the same conclusion!
Written by Lan, Head of Product at Swim Protocol
About Swim
Swim is a multi-chain AMM for native assets, designed to make bridging as easy as possible. Our protocol eliminates the need for wrapped assets by allowing users to swap from a native asset on one chain to a native asset on any other supported chain. Swim’s solution reduces the barriers faced by users when performing cross-chain transactions, allowing for true interoperability between various blockchain networks. Through integrations, Swim aims to help other protocols enable multi-chain composability.