R
R
Ref Finance
English
Search…
⌃K

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. 1.
    Query trading data (price, slippage, fee, etc.) on Aurora using the Aurora’s Software Development Kits (SDKs)
  2. 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. 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.
Liquidity Aggregation: High-level Abstract

Credit

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: https://defihub.pages.dev/

Start Using Swap Pro

First, make sure that you are connected to Ref Finance with your wallet.

Step 1: Turning on Swap Pro

Step 2: Choose the pair you want to swap first, for example, NEAR to stNEAR

Step 3: Check and adjust (if needed) your Transaction Settings

Step 4: Enter the amount you want to swap and Click on Request For Quote

Step 5: Verify the elements of the transaction and Confirm the swap