How does a peg-in work?
1. You provide a Liquid address
This is the address where you want to receive your L-BTC.
2. We generate a Federation peg-in address
SideSwap creates a Liquid Federation multisig mainchain peg-in address along with the corresponding claim script.You send BTC to this Bitcoin mainchain address.
3. We monitor the deposit
Once your BTC transaction is detected, we determine whether it can be pre-funded from our hot wallet after 2 confirmations, or whether you must wait for the full confirmation period.
4. Confirmation requirements
In normal circumstances, eligible peg-ins may be pre-funded after 2 confirmations.
Otherwise, funds are released after 102 confirmations, when the peg-in can be formally claimed on Liquid.
5. Claim and settlement
After 102 confirmations, L-BTC are claimed using the peg-in claim script:
If you were pre-funded earlier, we replenish our hot wallet.
If you were not pre-funded, we forward the L-BTC to your Liquid address at that time.
How does a peg-out work?
- SideSwap requests that the user produces a Bitcoin address to which they wish to receive their peg-out balance and selects the network fee level.
- SideSwap proceeds to generate a Liquid address and presents this to the user as the peg-out address to which they should send L-BTC.
- On detection of the peg-out being made to the peg-out address, we wait two confirmations and then “burn” the L-BTC with our Peg-Out Activation key.
- The Liquid Federation is notified that SideSwap has requested a peg-out and proceeds to auto-select which BTC residing on peg-in multisig addresses should be released on Bitcoin’s mainchain. It forwards this transaction to the Federation watchmen for signing.
- SideSwap receives the peg-out balance to its pre-approved peg-out address, from where it will forward the balance to the user once the transaction has one confirmation.
- The whole process takes anywhere between 15 and 60 minutes.
Each peg-in/out URL is unique and can be re-entered to view your progress.
A peg-in/out address may be re-used.
Static peg-in address reuse
Reusing static peg-in addresses significantly increases the risk of failed claims, especially across a federation functionary update. An address generated before a functionary change may no longer be compatible with the current federation, which can result in an unclaimable peg-in.
For reliability and operational safety, always generate a fresh peg-in address for each BTC deposit.
Our hot-wallet
All peg-ins take 102 confirmations. As a convenience service, we try to forward the pegged-in balance after 2 confirmations from our hot-wallet (the hot-wallet will be replenished after the full 102 confirmations). Therefore, our ability to offer pre-payment will depend on the number of concurrent peg-ins we’ve pre-paid without being replenished.
As a rule of thumb, peg-ins below 0.1 BTC will commonly be pre-paid, but we cannot guarantee it.
Transaction limits
SideSwap utilizes the actual mechanisms for creating and destroying L-BTC through actual peg-in and peg-out processes, therefore, we can support peg-in/out transactions of any size.
Fungibility
Bitcoins are perfectly fungible. Any BTC sent to a Liquid Federation multisig peg-in address will result in an equal amount of L-BTC being created on the Liquid Network. Any L-BTC being pegged out from the Liquid Network will result in the Liquid Federation releasing an equal balance from its multsig address(es).
The UTXOs released in conjunction with a peg-out are done so non-deterministically and a user should not expect to receive the specific coins previously pegged to the Liquid sidechain.
7-Day peg-in address policy
Peg-in addresses less than 7 days old follow the standard process and may be pre-funded after 2 confirmations if liquidity allows, otherwise they are released after 102 confirmations.
Peg-in addresses older than 7 days are no longer pre-funded and are credited only after a successful 102 confirmation federation claim. If the claim fails, the peg-in cannot be credited.
This policy exists because Liquid federation functionaries can be rotated or updated. Peg-in addresses are generated against a specific federation configuration. If functionaries change, older claim scripts may no longer match the active federation keys, making the peg-in unclaimable even with sufficient Bitcoin confirmations.
Tracking your peg-in
Each peg-in and peg-out URL is unique and can be revisited to monitor confirmations and status. Hot wallet liquidity can be viewed directly in the SideSwap app, via our API, or on our webpage.
