Swapping is a fundamental activity on the Cilistia Protocol, it involves the exchange of a token held in a user's wallet for another token (liquidity) provided by a market.

A user typically initiates a swap to acquire another token from a market in exchange for a token they hold in their wallet. For example, in an ETH/USDT market, users can swap USDT held in their wallet for ETH. Users who perform swaps are referred to as takers or swappers.

Types of Swaps

On the Cilistia Protocol, there are two types of swaps that a user can perform:

  • Instant Swap: This type of swap involves the exchange of two on-chain tokens (e.g. BTC for ETH).
  • Synthetic Swap: This type of swap involves the exchange of an on-chain token for an off-chain asset, such as a local currency (e.g. USD, JPY, EUR).

A synthetic swap is often referred to as a P2P swap on centralized exchanges.

Synthetic Swap

A synthetic swap involves swapping an on-chain token for an off-chain asset. In this type of swap, the synthetic asset can be anything that is transferred through an off-chain channel, such as a fiat currency, stocks, etc. Unlike instant swaps, a synthetic swap is not instantaneous, and requires the swap participant to go through a time-sensitive trade flow that includes securely sharing payment information, announcements, acknowledgments, releasing tokens to the taker, and optionally dispute resolution if a conflict arises.

Synthetic Swap Phases

Creation: The swap transaction is initiated in this phase. Payment: In this phase, payment is expected to be made off-chain and announced. Grace: This phase is entered only when off-chain payment is not announced within the liquidity provider