Cover photo

The Intricacies of Cross-Chain Transfers and Router Nitro

Burn and Mint Flow & The USDC Flow

Our last blog unpacked the part one of the Architectural flow explaining forwarder flow for the cross-chain bridging world. Building on that knowledge, we now turn our attention to the other two flows the Burn and Mint Flow and the USDC flow, key mechanisms shaping a more interconnected and efficient blockchain ecosystem.

Mint and Burn Flow

Essentially, as this mechanism sounds, it allows users to “burn” or destroy tokens on one blockchain and “mint” an equivalent number of tokens on another blockchain. This process not only maintains the integrity and value of the assets being transferred but also ensures the consistency of the total supply and guards against potential issues like double-spending.

For this approach, it is important to note that the bridge has permission to mint/burn the token on the source and destination chain.

In this blog, we aim to explore the nuances of how the Burn and Mint Flow operate, particularly in the context of the Router Nitro.

The high-level workflow of the flow -

If we have to break down this diagram and put it in a simpler way, we can say -

  1. Starting the Transfer: A user decides to move funds from one blockchain (Chain A) to another (Chain B). They initiate this process by invoking a contract on the source chain (Nitro contract).

  2. Validating and Burning Tokens: The Nitro contract checks if the user’s request is valid. If it is, the contract takes the tokens from the user’s account on Chain A and “burns” them.

  3. Burning tokens means they are effectively destroyed or removed from circulation. At the same time, the contract (via the iSend() function) signals another contract (Router Gateway contract) about this action.

  4. Communicating Across Chains: The Router Gateway contract on Chain A announces (emits an event) that tokens have been burned. This announcement is listened to by the Orchestrators on the Router chain. Upon receiving such an event, they confirm (attest) that the tokens on Chain A have indeed been burnt.

  5. Processing the Transfer Request: After 2/3+1 validation, the Router chain forwards the burn event to the middleware Nitro contract. This middleware contract prepares a request to send new tokens to the user on Chain B and deducts fees from the funds being transferred to the user.

  6. The Final Steps: The Nitro bridge contract, upon validation by the orchestrators, prompts a Nitro relayer to inform (forward) the Router Gateway contract on Chain B about the transfer. The Router Gateway contract on Chain B then tells the Nitro contract on Chain B about the incoming tokens.

Finally, the Nitro contract on Chain B creates (mints) new tokens and adds them to the user’s account on Chain B. This minting is like creating new tokens to replace the ones that were burned on Chain A.

As mentioned above, the following also ensures a high level of security by eliminating risks of double-spending, as tokens are irrevocably burned on the source chain before equivalent tokens are minted on the destination chain. It upholds asset integrity, as the total supply of the tokens remains constant across different networks, preventing inflation or devaluation of assets during transfers.

The flow also addresses the critical challenge of asset portability across various blockchains and aligns perfectly with blockchain technology’s core tenets of decentralisation and security.

Lastly, no forwarder fee is incurred via this flow as they are not fronting the liquidity, its just a message transfer from source to destination.

The USDC Flow

Cross-chain Bridges commonly offer the transfer of stablecoins between blockchains through “wrapping,” a method prone to security breaches.

Circle, the company behind USDC — the crypto market’s second-largest stablecoin — introduced a safer alternative for moving stablecoins across chains. The method involves a process where USDC is burned on the source chain and minted on the destination, bypassing the need for traditional wrapping-based bridges.

This is how it works with Router Nitro -

  1. A user invokes the Nitro contract to transfer USDC from Chain A (source) to Chain B (destination). The nitro contract calls the USDC contract on the source chain, and the USDC contract burns the USDC.

  2. Then, the USDC contract emits an event, and the forwarder listens to it and starts polling the circle API (in intervals until it gets the attestation).

  3. Once the Circle API gives the attestation to the forwarder, the forwarder calls the USDC contract on the destination chain.

  4. The USDC contract then proceeds to mint the USDC for the user (on the destination chain)

When USDC is burned on the source chain, the Nitro contract shares the user’s address details with the source chain’s USDC contract. Therefore, when the forwarder calls the destination chain’s USDC contract to mint new tokens, it doesn’t specify the recipient’s address. This ensures secure and accurate token minting.

We have completed all our flows; for a better understanding of the forwarder flow, you can explore our Medium article: https://medium.com/@routerprotocol/router-nitros-architecture-d5f354bbe43c

Website | Twitter | Telegram | Discord | Reddit | Youtube | Instagram

Router Protocol logo
Subscribe to Router Protocol and never miss a post.
#defi#web3#cryptocurrency#cross-chain