Wallchain
Search…
⌃K
🚀

How it Works

A story of a Transaction

Wallchain Process Diagram

Step by step (see the diagram)

Initial part - DEX swap interface, Wallchain API and Wallet

  1. 1.
    A user picks a pair to swap. DEX creates a transaction to perform the swap.
  2. 2.
    Before sending a transaction to a wallet (e.g. Metamask) for confirmation, it's sent to Wallchain Service API [1].
  3. 3.
    Wallchain Transaction Upgrade Service simulates various backrunning strategies. The outcome is twofold.
    1. 1.
      The transaction does not create a profit opportunity (see step 4).
    2. 2.
      A profitable upgrade is possible (see steps 5-7).
    If the profitable strategy has been found, an upgraded Transaction is sent in response to the API request. Otherwise, the request transaction is sent back as a response.

Regular Router path

4. If no profitable strategy has been found the rest of the flow is left intact. The transaction is sent to the DEX router, and from the user’s perspective everything looks exactly the same as it was before with the regular flow. Most of the users will experience this flow and will feel no difference.
​
Upgraded Router path
6. Wallchain Router Proxy combines swap and profit capturing in a single transaction.This proxy router performs a swap through a regular DEX router. The same way as it is usually done.
7. Finally, the Router Proxy calls Wallchain Master. It captures the profit and shares it between DEX owners and the user.
​

Notes

  1. 1.
    Wallchain Service API is available at https://<CHAIN>.wallchains.com/upgrade_txn/?key=<KEY>