Rhea Finance
  • Introduction
  • RHEA Finance White Paper
  • Genesis
  • Tokenomics
  • Governance
  • Community
  • Team
  • Getting Started
    • Setup Wallet
    • Using the Rainbow Bridge
    • Using the Platform
    • Buy REF Token
    • Staying Safe
  • RHEA Finance
    • Overview
      • Auto Router
      • Multi-chain Router
      • Pooling
      • Staking
      • RHEA V2 & DCL Pools
      • Aggregator Bridge
    • Guides
      • Lending & Borrowing
        • Audits & Risks
        • Supplying
        • Borrowing
        • APY
        • Health Factor
        • LP as Collateral
        • How Lending & Borrowing works
          • Health Factor
          • Interest Rate Model
          • Liquidations
          • Oracle
        • Step by Step Guide
      • Trade
        • Swap
        • Limit Orders
      • Liquidity Management
        • Classic Pools
        • Stable & Rated Pools
        • RHEA v2 Pools
      • Farming
      • Staking
      • Aggregator Bridge
      • RHEA Point System
  • SECURITY
    • Contracts
    • Guardians
    • Oracles
    • Audits
    • Bug Bounty
  • DEVELOPERS
    • CLI Trading
    • CLI Farming
    • RHEA SDK
  • SUPPORT
    • FAQ
    • Help
Powered by GitBook
On this page
  • High-Level Design
  • Credit

Was this helpful?

  1. RHEA Finance
  2. Overview

Multi-chain Router

Swap Pro

PreviousAuto RouterNextPooling

Last updated 26 days ago

Was this helpful?

Also called the multi-chain aggregator, the multi-chain router is a built-in function on RHEA 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.

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/
Liquidity Aggregation: High-level Abstract