Step-by-Step

Magpie Protocol
4 min readAug 16, 2023

--

Your Guide to Fly with Magpie

With the recent launch of the Magpie Open Beta, there are lots of new birds in the flock out there and we thought it would be a good idea to give a bit of a step-by-step process on how to use the Magpie dApp and explain a bit on how each step of the cross-chain swap process is handled. If you’re new here, this will be a great starting point, and if you’d like some more in depth information, we’ll provide you with some links to our previous posts pertaining to each step as well. This will give you an excellent overview on how Magpie is taking the normal process of going cross-chain and simplifying it into just a few steps for you.

👉 Step 1

To start, to perform a cross-chain swap through Magpie you’ll need to select the blockchain you both want to swap from and to.

Next, you’ll want to choose the token you are swapping and the token you want. So far, so good as the saying goes.

On this step, you may not think much is going on but there is actually quite a bit happening, so let’s explore what’s going on here.

The Magpie aggregator microservice collects on-chain liquidity information of all of the supported liquidity pools we aggregate; any time a liquidity event occurs, such as an add, remove liquidity, or swap, Magpie is updated on every single change. Many of you have probably experienced waiting a few seconds for a DEX to update the price when you’re trying to swap, while it may not take long, it’s definitely noticeable and can be a bit annoying when in a hurry. Thanks to our tech, Magpie can calculate how much you’ll get with how much you’re paying without the need to wait for a response from the chain contracts, resulting in a faster response time when compared to pretty much anyone else. If you’d like to check out more on our aggregator and how Magpie provides the fastest response time with the best routing, be sure to check out our post on it here!

👉 Step 2

Click the Approve ‘Token’ button and your wallet app will prompt you to give the Magpie app permission to use the selected token. You can choose to approve the exact amount for the swap you’re going to initiate.

This one is pretty simple, here you’re giving Magpie permission to make a swap using your tokens. Keep in mind, Magpie is non-custodial, so we’re never in custody of your tokens, they remain in your control.

👉 Step 3

Once the token spend is approved, the purple button will now say “Swap,” and you can click the “Swap” button to start the swap process.

Your wallet will once again prompt you to confirm the transaction, but this time rather than token approval, it will provide you with estimated Gas, Bridge, and/or Relayer fees that are required for the swap, all-in-one. Magpie is currently not charging any fees on top of what is required to do the swap.

This step is where much of the magic happens, especially when going cross-chain. It combines many of our services in order to find the best price, the best route, and to send the swap signals cross-chain. The simplest way to describe how Magpie’s cross-chain process works is the following:

  1. You click swap, we generate a message to send cross-chain containing all the information needed for the swap on both chains.
  2. This message is verified and validated on both chains (which takes about 5 blocks to confirm)
  3. Magpie swaps your tokens into a stablecoin liquidity pool on the initial chain
  4. Magpie receives funds on the destination chain from the bridge liquidity pool that is swapped for the token you requested and deposited into your wallet.

If you’d like to read more in depth on how that all works, be sure to check out our blog on cross-chain messaging, how we aggregate and utilize bridge liquidity & DEX liquidity, or an even more detailed description of the steps in our litepaper.

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

--

--

Magpie Protocol

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