The Power of Uniqueness

Magpie’s Innovative Approach to Order Routing

Magpie Protocol
4 min readApr 26, 2023

While DeFi protocols have made it possible for users to trade, lend, and borrow cryptocurrencies without the need for intermediaries, one of the most exciting developments in DeFi are protocols, such as ya birds over here at Magpie, which allows them to swap assets both on and over to a different blockchain without the need to visit a bridge, quickly, securely, and getting you the best price.

It’s getting easier to visit other chains. The downside of all this flying around is that it is time-consuming, frustrating, and pricey. It also comes with all the issues from bridging or finding a better price on what you want.

That’s why Magpie is here, to help fix all that, and specifically, it’s where our unique order routing algorithm comes into play!

What’s the flight route?

To give you a quick rundown, order routing is a key component of any decentralized swap protocol, as it determines how and where trades are executed, and if you want to read a bit more about how we do it, check out this blog post.

Most order routing algorithms used in DeFi protocols focus on finding the quickest route for the user’s trade by routing through popular tokens.

On Uniswap for example, no matter which tokens you’re trading, trades will generally route through ETH/WETH or USDT pools. Swaps on Polygon and BNB Chain on Uniswap will usually route through pools containing the native token MATIC or BNB as well as WETH pools on their respective chains.

While this makes for a quick route, it’s not always the best route, as it doesn’t use the approach of finding the user the best deal on the asset. While it can pull from multiple pools, Magpie takes this feature to the next level.

One in a million bird

Magpie’s unique order routing algorithm takes into account both the price of the asset being traded and the network fees associated with executing the trade. The algorithm analyzes multiple liquidity sources across multiple DEXs and their liquidity pools, even when cross-chain swapping, to find the most cost-effective route for the trade.

What this means for you, is that we will find the best route for pricing that we can to get you the best deal in DeFi.

That can mean routing through multiple liquidity pools, or routing through blue-chip tokens, midsize caps, and even small market cap tokens to find that price.

Our order router is updated in real-time with all available price data, liquidity pool sizes, new tokens, and more, across all of the DEXs and bridges we aggregate so users don’t need to search for the best options, we will provide it.

Our internal and alpha testing shows that Magpie Protocol’s pricing is better or very similar to the competition when dealing with high-volume trades, scaling exponentially in our favor the higher the trade size.

Seeing into the distance

A feature being added to the Magpie app will be a transparent view of the trade execution process. Users will be able to choose from a selection of routing options and paths for swaps if they are looking to go through an asset pool for any specific reason.

Frequently requested, and a future update, Magpie’s order routing algorithm will be implementing measures to prevent sandwich attacks, or price slippage losses by integrating Hashflow and an off-chain liquidity network with RFQ (Request-for-Quote).

If we look a bit further into Magpie’s future, you can see that we’re planning to add some amazing web3 features where users will be able to directly join liquidity farms cross-chain from within the Magpie app.

See a pool you want to join on a supported DEX on another chain? Skip all the normal steps and deposit directly into it.

The same will go for borrowing and lending on some particular well-known protocols, direct from the Magpie interface.

We’ve got big plans for Magpie and this is just a taste of what’s to come.

As the DeFi ecosystem continues to grow, efficient and cost-effective order routing algorithms will be essential to facilitate the movement of assets across different blockchain networks, and Magpie’s order router is here to help see it happen.

For more news and updates about Magpie, join our Discord, Twitter, and Telegram.

--

--

Magpie Protocol
Magpie Protocol

Written by Magpie Protocol

Future of cross-chain exchange infrastructure. Chain-Agnostic & Non-custodial liquidity aggregation protocol.

No responses yet