Gasless Swap Workflow

The gasless swap workflow in CentaurLabs involves three primary stages:

User Initiated Swap

  1. User Request: A user initiates a swap request through their wallet, specifying the tokens to be exchanged and the desired exchange rate.

  2. Order Creation: The wallet communicates with CentaurLabs smart contracts, creating an order on the order book.

Relayer Matching

  1. Order Matching: Relayers continuously monitor the order book for new orders. When a matching order is found, the relayer submits a transaction to execute the swap.

  2. Gas Fee Coverage: Relayers pay the transaction fees in ETH, ensuring users do not need to hold ETH for swaps.

Smart Contract Execution

  1. Trade Execution: The SwapExecution contract verifies the swap and executes token transfers, ensuring both parties receive their desired tokens.

  2. Transaction Confirmation: Transaction details and swap confirmation are provided to the user's wallet.

Last updated