The Power of Intent-Based Aggregation

Magpie Protocol
8 min readApr 22, 2024

In the rapidly evolving landscape of DeFi, innovations continue to reshape how users interact with blockchains. One such innovation is an Intent-based aggregation architecture, which is being explored by protocols such as Uniswap X and Cowswap, where Solver networks are being experimented with in order to provide users with better pricing and MEV protection. These systems, once implemented, will mark a paradigm shift that introduces efficiency, security, and flexibility into decentralized trading.

This article will dive into what exactly Intent-based swaps are, and then go into some of the key features and advantages of this architecture, exploring how it transforms the way users execute trades and access liquidity.

What are Intents?

First things first, we need to explain what exactly intents are, before going into their benefits and how Magpie plans to make use of them. Intents are signed sets of declarative constraints where the user outsources the transaction to a third party to be filled, without giving up control of their assets. As well, Intents introduce Solvers, and rather than swaps being tied to a specific liquidity pool, users sign a message with trade details, similar to a limit order. This message is then relayed to a Solver network, which, in turn, formulates it into a transaction, ensuring its addition to the blockchain. It’s sort of, but not exactly, like using Doordash or any sort of food delivery service around you: a user creates a list of what they want to eat from where, set a reward (tip), and then on the backend, Dashers race or compete to see who can claim it first in order to fill your order and be rewarded with the fees from the service itself plus the tip.

Magpie Intents work similarly, allowing users to initiate transactions by stating their desired outcomes, such as asset swapping or providing liquidity. The process starts when a user places a reward on the source chain, demonstrating the seriousness of their intent, which will act as an incentive for Solvers, creating a fair compensation system for their work. It can all be done with intents.

Understanding How Intents Work

Now that we’ve given a brief overview of what it means to create an intent, let’s explore how they work. First up…

-Solvers and the Solver network

Solver Engagement is a crucial element of Magpie Intents. They use advanced algorithms and strategic thinking to understand the user Intents in order to develop the best strategies for achieving the desired results on the destination chain, be that completing a swap or adding liquidity. But in order for Solvers to want to work, you need a Locking and Reward Mechanism.

-Locking and Reward Mechanism

A reward commitment on the source chain serves as a binding contract that reinforces user intent, ensuring the ecosystem is fueled by authentic, significant transactions. This reward is similar to a tip on your food delivery service. If you’ve ever worked in the service industry in a country with tipping, you know that those that tip, or give the best rewards, receive the best service. Locking in a reward will make sure that the Solvers want to complete your transaction, as they do want to lose money on it. So how does everything above fit together?

-Workflow in Action

Users define their intent and lock a reward on the source chain. Solvers retrieve these intents, strategize optimal solutions on the destination chain, and execute them. Magpie Protocol seamlessly translates intent into action through this well-defined workflow.

How about an example? For this intent, the user is stating that they’d like to sell $350 worth of ETH on the Ethereum chain at a price of $2900 to $2950 and receive an equivalent amount of MATIC on Polyon PoS.” Abstracted away from the user, the Solver network competes to fill the order where ETH is valued at $2950 moving down towards $2900, and as soon as it would be profitable for them to do so, they execute the transaction and are awarded the fees from it.

The proof of settlement on the destination chain provides a transparent validation of the completed transaction. The protocol also introduces time dynamics, allowing users flexibility in setting lock times, and solvers can strategically manage time through fine payments for extensions.

Why are they Needed?

While many are familiar with the current bridging process or wanting to swap for a token cross-chain is like, allow us to briefly go over the current process

1. Choose asset A on Chain A you’d like to swap for asset B on Chain B

2. Search for DEX on Chain A with ample liquidity of asset A

3. Find Bridge that supports Chain A to Chain B

4. Check which assets the bridge supports

5. Swap asset A for a bridge supported asset on DEX from Step 2

6. Bridge asset

a. Repeat Steps 2–6 if you need gas token on Chain B as well

b. Bridge gas token

7. Search for and find DEX on Chain B that supports Asset B

8. Swap for Asset B on Chain B

This current system requires a lot of manual swapping, and no less than three individual swaps that each have to be approved and have gas paid for. Each and every step has to be done every single time a user wants to move cross-chain. This can be burdensome for many users, and a process some will just not do at all from the inconvenience of it all

As a way to help alleviate these issues, intents can provide ways:

  • For users to post limit-style orders so that they can buy an asset at a set price point without having to constantly pay attention to the market
  • For users to limit their swaps to only authorized protocols or particular protocols either for safety purposes or if they want to make sure their volume is going through a particular liquidity pool
  • For Protocols to offer gas sponsorship as an incentive to test out or use their protocol, paying for up to $X amount in fees per day/week/month
  • To batch transactions together in order to get users better prices on a token and lower gas fees

What Intents Offer

-Diversified Liquidity Access

Unlike traditional exchanges limited to specific liquidity sources, such as Uniswap, Sushiswap, or other such DEX pools, in which users can only make swaps from the one pool that the DEX is tied to, Solvers in the Intent-based system have the flexibility to route orders through various on-chain and off-chain liquidity sources, as well as centralized exchanges, aggregators, and even other blockchains. This diversification ensures users receive the most favorable trade prices as having access to as many sources of liquidity as possible means that the Solvers can pull from whichever one currently has the best price.

-Competitive Order Fulfillment

Within an Intent-based architecture, Solvers compete to fill user orders at the optimal price so that they may be rewarded with the fees generated or provided for the swap. Users input their intent to sell or buy a specific asset at a desired price range, and Solvers strategically execute the trade, ensuring the best possible price for users. So how does this result in better user pricing? Solvers are encouraged to fill the order as quickly as possible, and as close to the target price the user set as possible, while still being rewarding or profitable for the Solver to do so. The Solver searches their network of liquidity, pulling from multiple sources if necessary

-Gas Fee Elimination

Users are relieved from paying gas fees directly. Instead of initiating a swap, users only sign an intent, and Solvers handle the transaction execution. This approach mirrors the model of food delivery services like Doordash, where users don’t pay delivery fees directly. Gas fees are covered by Solvers, who factor these fees into the executed transaction price. This means that users don’t necessarily have to have the native gas token as they are not the ones paying for gas fees, and could state within their Intent that the Solver accepts USDC as the asset paying for the swap.

-Price Improvement and Slippage Mitigation

Positive slippage is returned to users in the form of price improvement. This means that if the actual execution price is better than the specified price range, users benefit from the improved rate. Additionally, users are safeguarded against MEV strategies like sandwich attacks and frontrunning.

-Seamless Cross-Chain Swaps

Intent-based architecture extends its capabilities to cross-chain trading. Users can sign intents to execute swaps across different blockchain networks without waiting for bridges, which eliminates the need for complex cross-chain infrastructure, streamlining the process and making it much more user-friendly.

How is this faster?

With an Efficient Settlement Mechanism.

With intents, a user can lock their reward on the source blockchain stating their intent to swap ETH on Ethereum for MATIC on Polygon PoS. Rather than the normal process of using a bridge, the Solver can swap for the requested asset on the Polygon chain and mark the intent as filled on the source chain. Once settlement is verified on the destination chain, the Solver receives the user’s funds on the originating chain. This settlement process reduces waiting times for users engaging in cross-chain transactions.

Magpie Intents beta starts in Q2 of this year!

Intent-based aggregation architecture represents a significant leap forward in the evolution of decentralized trading. By abstracting away liquidity pools and hundreds of DEXs as well as dozens of bridges, diversifying liquidity access, and providing an extremely user-friendly process for both on and cross-chain swap experiences, Intent-based swaps empower users with greater control and security in their DeFi activities. As the cryptocurrency landscape continues to evolve, Intent-based trading will soar above the rest to address the challenges and limitations of existing DeFi exchange protocols.

Be sure to check out the Magpie Roadmap article, or click here for the short and sweet version. Come and join us on Telegram, Discord, & Twitter so that you can stay up to date on all of the latest campaigns and dApp updates!

--

--

Magpie Protocol

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