Flow | Developers

Flow

Estimated reading time: 2 minutes

High level flow

High level flow

The Exchange Application is an application for Ledger’s devices (Nano S, Nano X and Nano S Plus) that has been developed specifically to manage and secure swap operations (crypto-to-crypto transfer).

The trade between the provider and the user is secured by going through Ledger Live back-end and the Exchange app installed on the Hardware Wallet. The provider signs the trade data, in order to let the Ledger’s device (Nano S, Nano X or Nano S Plus) display it to the user. Since the Ledger’s device (Nano S, Nano X or Nano S Plus) is the single source of truth, the user can trust and sign the transaction on the device, thus allowing the provider to complete the transaction. The provider is accredited by Ledger so that the Nano device can trust the provider data.

Detailed flow

Detailed flow

More info about the important steps of the detailed diagram:

  • Payload and Signature
    From the provider to Ledger Live. The payload is a protobuf message containing the trade data. It is generated by the provider and sent to Ledger Live. More details in the Protobuf message (payload) section.
    payload = { 
    in_currency,    // currency name (to provider)
    in _amout,    // amount (to provider)
    in_address,    // address (of provider)
    out_currency,    // currency name (to customer)
    out_amout,    // amount (to customer)
    out_address,    // address (of customer) 
    nonce,
    
    }
    R, S = Sign(payload, priv_key)
    
  • Validate
    Exchange app checks and validates payload (signature and content).
    Compare nonce in payload 
    Verify((R, S), payload, pub_key)
    
  • Display
    Exchange app request approval to user by displaying swap summary on screen.
    Validate?
    Send in_currency in_amount
    Receive out_currency out_amount
    

High level architecture

High level architecture


Did you find this page helpful?


How would you improve this page for developers?



Introduction
How to
Getting Started
Theme Features
Customization

Swap