Multi-chain Router

Swap Pro

Also called the multi-chain aggregator, the multi-chain router is a built-in function on Ref Finance that aggregates data across Decentralised Exchanges on Aurora and NEAR protocols.

Designed for traders, the solution leverages liquidity accross both environments to deliver not only better prices, but also:

  • Deeper liquidity and improved price impact

  • Lower trading slippage

  • Improved token accessibility/visibility

High-Level Design

The solution goes through the following logic:

  1. Query trading data (price, slippage, fee, etc.) on Aurora using the Aurora’s Software Development Kits (SDKs)

  2. Find optimal route (best price) for a specified amount of Token A to Token B accross all liquidity pools on Near and Aurora

  3. Swap — Action that combines:

  • Transfer of tokens to a mapping address on Aurora via a cross-network contract call

  • Swap on Aurora using the user’s NEAR account keys

  • Transfer of tokens from the mapping address on Aurora to the user’s NEAR wallet

Note: a mapping address is a “proxy address” which maps one’s Near account onto Aurora with a corresponding ETH address. It is generated by the user’s Near account ID, and triggers/generates all the actions on the Aurora network on behalf of the user. In other words, the user signs all transactions on Aurora from the mapping address using their Near wallet, removing the need to set up a separate ETH wallet to use Aurora.


The Multi-chain Router is the result of a successful collaboration between the team and Evgeny & Vadim.

For more details, please check the following link:

Last updated