NEAR Intents
  • Overview
  • Integration
    • Distribution Channels
      • 1Click API
  • Market Makers
    • Message Bus
      • API
      • Usage
    • PoA bridge API
    • Verifier
      • Introduction
      • Deposits and withdrawals
        • NEAR Token treatment
        • Deposits
        • Balances, and identifying your token
        • Withdrawals
      • Account Abstraction
      • Intent types and execution
      • Signing Intents
      • Events
      • Example Transactions
      • Simulating intents
    • Examples
  • FAQs
  • Security
  • Chain and Address Type Support
Powered by GitBook
On this page
  1. Architecture

Intent flow

Deposited assets

Last updated 1 month ago

  1. Initial state: user has an account with FT1 token deposited; user wants to swap 1 FT1 to FT2

  2. FE sends an RFQ to message bus

  3. router receives the RFQ request and starts to search for the most optimal path for such swap by sending RFQ requests to “trader” solvers.

  4. “Trader” solvers reply with signed messages “I’m ok to swap X of token A to Y of token B” (along with nonce, deadline, etc…)

  5. As soon as the path FT1 -> FT2 has been found, router sends a response to the user with the final price: “Are you ok to swap 1 FT1 -> 2 FT2”?

  6. user signs “I’m ok to swap 1 FT1 to 2 FT2” and replies back to router

  7. router aggregates all these signed messages into a transaction and sends it to Verifier Contract

  8. Verifier Contract verifies all signed state changes and commits them on-chain.

Intent flow for deposited assets