Atomic Swaps
Atomic Swaps allow users to transfer BTC assets to liquidity providers in exchange for zBTC, enabling transactions of varying asset values.
Last updated
Atomic Swaps allow users to transfer BTC assets to liquidity providers in exchange for zBTC, enabling transactions of varying asset values.
Last updated
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.
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:
Ensure the atomicity of transactions, guaranteeing that transactions either succeed or fail simultaneously.
Implement an SPV Client to provide proof of transaction occurrence.
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:
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.
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.
Alice reviews and verifies the transaction, proceeding to transfer the assets from her account to the user.
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.
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.
In the role of a liquidity provider, Zulu will offer incentives in the form of native tokens.
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.