Atomic Swaps

Atomic Swaps allow users to transfer BTC assets to liquidity providers in exchange for zBTC, enabling transactions of varying asset values.

When Peg IN/OUT is not Enough

As mentioned earlier, PEG IN/OUT operations are constrained to assets of the same value. However, there are instances where users may wish to engage in transactions involving more or fewer assets, making PEG IN/OUT unsuitable for such scenarios.

TLDR here.

Atomic swaps offer a solution to this problem. The fundamental concept involves users transferring BTC assets to liquidity providers, who, in turn, transfer an equivalent value of zBTC to users on Zulu.

There are several requirements:

  1. Ensure the atomicity of transactions, guaranteeing that transactions either succeed or fail simultaneously.

  2. Implement an SPV Client to provide proof of transaction occurrence.

  3. Establish an Incentive Mechanism and penalty mechanism to safeguard the earnings of liquidity providers and deter any potential misconduct.

The flowchart illustrating the entire Atomic Swap process is depicted below:

Zulu Atomic Swap Process in Detail

  1. Alice acquired zBTC on Zulu through PEG IN/OUT and subsequently staked 100 BTC on Bitcoin, transitioning Alice's role into being a liquidity provider.

  2. Regular users aiming to switch between Bitcoin and Zulu or vice versa are required to furnish an SPV proof, validating that the trading user has transferred the corresponding assets to Alice.

  3. Alice reviews and verifies the transaction, proceeding to transfer the assets from her account to the user.

  4. When Alice decides to withdraw as a liquidity provider, she must substantiate her honesty, demonstrating that she has not engaged in any malicious activities. Subsequently, she attempts to trigger the PEG OUT transaction to reclaim the pledged BTC.

  5. The PEG OUT transaction is subject to a specific challenge time window. If a verifier identifies any malicious behavior by the Operator, they can consume the connector output, preventing Alice from retrieving the pledged assets.

  6. In the role of a liquidity provider, Zulu will offer incentives in the form of native tokens.

Atomic Swaps TLDR

Atomic Swaps in Zulu allow users to transfer BTC assets to liquidity providers, who then transfer an equivalent value of zBTC to users on Zulu, enabling transactions of varying asset values between the Bitcoin Network and Zulu Network​​.

Last updated