Difference between revisions of "Trading L-BTC"

From Bisq Wiki
Jump to navigation Jump to search
m (→‎Trading L-BTC: wording)
m (Plebeian9000 moved page L-BTC to Trading L-BTC: to be consistent with other altcoin pages)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
===About L-BTC===
+
'''L-BTC''', or Liquid Bitcoin, is a Confidential Asset, fully verifiable, and 1:1 backed BTC token created by [https://liquid.net/ Liquid], a federated sidechain pegged to the Bitcoin blockchain. Liquid is implemented by Elements, an open source, sidechain-capable blockchain platform based on the Bitcoin codebase created by Blockstream.
  
L-BTC, or Liquid Bitcoin, is a Confidential Asset fully verifiable 1:1 backed BTC token created by [https://liquid.net/ Liquid], a federated sidechain pegged to the Bitcoin blockchain. Liquid is implemented by Elements, an open source, sidechain-capable blockchain platform based on the Bitcoin codebase created by Blockstream.
+
A sidechain is a mechanism that allows tokens from one blockchain to be used securely in an independent blockchain which runs in parallel and uses a different set of rules, performance requirements, and security mechanisms. On a sidechain, one can move tokens back to the original chain through a two-way peg. Sidechains enable new functionality that may have security trade-offs or as a way to test new features that may not be ready to use on the parent blockchain.  
  
A sidechan is a mechanism that allows tokens from one blockchain to be used securely in an independent blockchain which runs in parallel and uses a different set of rules, performance requirements, and security mechanisms. On a sidechain, one can move tokens back to the original chain through a two-way peg. Sidechains enable new functionality that may have security trade-offs or as a way to test new features that may not be ready for use on the parent blockchain. These are the new functionalities that Liquid enables:
+
These are some new functionalities that Liquid enables:
  
* Confidential Transactions: Hides the amount from the information displayed at the blockchain, it's the most important feature for Bisq users.
+
* Confidential Transactions: hides the amount from the information displayed at the blockchain -- the most important feature for most Bisq users
* Issued Assets: Allows issuing tokenized fiat, securities, altcoins or digital collectibles.
+
* Issued Assets: allows issuing tokenized fiat, securities, altcoins or digital collectibles
* Federated consensus mechanism: allows 2 or 3 minute settlement times in normal conditions.
+
* Federated consensus mechanism: allows 2- or 3-minute settlement times in normal conditions
* In development: Schnorr signatures, which will improve network privacy and capacity.
+
* In development: Schnorr signatures, which will improve network privacy and capacity
 
 
===P2P swaps===
 
  
 
All addresses in Liquid are blinded by default using Confidential Transactions. The asset and amount of a transaction is hidden to those watching the Liquid sidechain. Bisq users can mix their coins with all of Liquid federation BTC holdings just trading both assets.
 
All addresses in Liquid are blinded by default using Confidential Transactions. The asset and amount of a transaction is hidden to those watching the Liquid sidechain. Bisq users can mix their coins with all of Liquid federation BTC holdings just trading both assets.
  
===Trading L-BTC===
+
== Selling L-BTC ==
 
 
Buying L-BTC is very similar to buying other privacy coins. The L-BTC receiver needs to generate a proof of payment to be delivered in case of dispute. Otherwise, Confidential Transactions makes it impossible for a third party to verify if a payment was made. Next section provides detailed information on how to provide the blinding key to moderator or refund agent. L-BTC buyer should be familiar with this requirements, as failing to provide the blinding key will result in losing the mediation case.
 
  
Sell L-BTC is like selling any other [[altcoin]]. It just requires a wallet capable of receive L-BTC, like Greenwallet, and create a new Bisq account for this payment method.
+
Selling L-BTC is like selling any other [[altcoin]]. It just requires an [[Creating_a_payment_account#Creating_an_altcoin_account|L-BTC payment account]] in Bisq.
  
===Generate blinding key===
+
== Buying L-BTC ==
  
Greenwallet or custodial wallets can't generate blinding keys. To provide blinding keys, install Elements Core full node -it's not necessary to connect Elements node to a Bitcoin full node- and follow this steps:
+
The trader ''receiving'' L-BTC (L-BTC buyer) must be able to generate proof of payment in case of a dispute. Otherwise, Confidential Transactions make it impossible for a third party to verify if a payment was made—so L-BTC buyers must be able to generate a transaction's blinding key for mediators or arbitrators in case of disputes.
  
* Find the L-BTC address in the Bisq trade details.
+
{{Admonition_Warn|Failing to provide the blinding key to a dispute agent will likely result in losing the dispute case.}}
* Open the GUI console window of your Elements Core full node, or use 'elements-cli'.
 
* Type the following command: dumpblindingkey <address>
 
  
The elements node console will return the [https://elementsproject.org/elements-code-tutorial/confidential-transactions#blindingkey blinding key] in hex. This blinding key will be required and used in case of dispute to verify if a L-BTC payment was done.
+
=== Generate blinding key ===
  
===FAQ===
+
'''Green Wallet and other custodial wallets can't generate blinding keys, so you must use Elements Core to receive L-BTC for Bisq trades.''' 
  
======How is the price of L-BTC determined?====== <!---Wouldn't it be better if this heading did not produce a line under following text?--->
+
Install the [https://github.com/ElementsProject/elements Elements Core full node software] (note that this does ''not'' require running a Bitcoin Core full node) and follow these steps:
L-BTC is a 1:1 BTC pegged token to Bitcoin, so high volatility is not expected. Buyers and sellers make their fixed price orders close to parity. There's no price feed with market % based prices for this market.
+
# Get the receiving L-BTC address
 +
# Open the GUI console window of your Elements Core full node, or use <code>elements-cli</code>
 +
# Type the command <code>dumpblindingkey <address></code>, where <code><address></code> is the receiving L-BTC address from step 1
  
======Why not just use the peg-in and peg-out mechanism to exchange L-BTC and BTC?======
+
The Elements console will return the [https://elementsproject.org/elements-code-tutorial/confidential-transactions#blindingkey blinding key] in hex. This blinding key is what dispute agents will ask for in case an L-BTC trade ends up in dispute.
  
A peg-in -block BTC to create L-BTC- transaction requires 102 confirmations on the Bitcoin network (17 hours) before the funds can be claimed on the Liquid Network. Peg-out requires 2/3 Liquid functionaries approval and it takes about 17-35 minutes to complete. Bisq offers private, easy and secure L-BTC on and off-ramp.
+
== FAQ ==
  
===How to verify the details of a confidential L-BTC transaction===
+
'''How is the price of L-BTC determined?'''
  
======Instructions for L-BTC receiver======
+
L-BTC is a 1:1 BTC pegged token to Bitcoin, so high volatility is not expected. Buyers and sellers make their fixed price orders close to parity. There's no price feed with market % based prices for this market.
 
 
Find the L-BTC address in the Bisq trade details
 
Open the GUI console window of your Elements Core full node, or use `elements-cli`
 
Type the following command: <code>dumpblindingkey <address></code>
 
 
 
The elements node console will return the blinding key in hex. For this example, our blinding key is <code>3611d1e254c6f5182763b667ced45799a294837c9b1950ff3982d009e6a1c8f7</code>
 
 
 
======Prerequisites for Bisq Mediator======
 
 
 
Install the Elements Core full node on your computer from https://github.com/ElementsProject/elements/releases
 
Set the <code>txindex=1'' option must in ''elements.conf</code> (the L-BTC sender and receiver do not need the `txindex=1` setting)
 
Wait until fully synced to the Liquid blockchain
 
Obtain the Blinding Key for the receiving L-BTC address from the L-BTC receiver
 
 
 
For this example, the L-BTC receiver’s address is <code>VJLAuukJX2WPzdiGJz4RKFFK49aZcSeDgHagGnfTib3bg22G4HMKfWNonPezPdCisdspf7bHMkoDGVTB</code>
 
 
 
Either trade party can disclose the TXID for the L-BTC payment
 
 
 
For this example, the L-BTC payment TXID is <code>842719feb92914a553fc8e8fccec27a4d0e4833ac3fb363f882ba1dc9bff9078</code>
 
 
 
Verify both the L-BTC address and TXID are visible on https://blockstream.info/liquid
 
 
 
======Instructions for Bisq Mediator======
 
 
 
Open the GUI console window of your Elements Core full node, or use <code>elements-cli</code>
 
Type the following command: <code>importaddress <address></code> using the L-BTC address from the Bisq trade details
 
 
 
This will add the address to your wallet as “watch only” and rescan the entire liquid blockchain, it might take an hour or longer to complete depending on your computer.
 
  
After scanning is complete, fetch the details for the L-BTC payment TXID
+
'''Why not just use the peg-in and peg-out mechanism to exchange L-BTC and BTC?'''
  
<code>gettransaction 842719feb92914a553fc8e8fccec27a4d0e4833ac3fb363f882ba1dc9bff9078 true</code>
+
A peg-in transaction (BTC to L-BTC) requires 102 confirmations on the Bitcoin network (17 hours) before funds can be claimed on the Liquid Network. Peg-out requires approval from two-thirds 2/3 Liquid functionaries approval and it takes about 17-35 minutes to complete. Bisq offers private, easy and secure L-BTC on and off-ramp.
  
You should see the transaction object, but with an empty “details”, since you have not yet imported the blinding key to reveal the confidential transaction details.
+
== Guidance for dispute agents ==
  
Import the blinding key with the following command
+
In order to verify L-BTC trades, install the Elements Core software on your computer from https://github.com/ElementsProject/elements/releases, and then:
 +
* Set <code>txindex=1</code> in <code>elements.conf</code> (neither L-BTC sender nor receiver need this setting)
 +
* Wait until Elements fully syncs to the Liquid blockchain
  
<code>importblindingkey VJLAuukJX2WPzdiGJz4RKFFK49aZcSeDgHagGnfTib3bg22G4HMKfWNonPezPdCisdspf7bHMkoDGVTB 3611d1e254c6f5182763b667ced45799a294837c9b1950ff3982d009e6a1c8f7</code>
+
=== Verifying a transaction ===
  
Request the TX details again, and this time they will be visible
+
Obtain information from trading peers:
 +
# Obtain the TXID for the L-BTC transaction (either trading peer can provide this information)
 +
# Obtain the Blinding Key for the receiving L-BTC address from the L-BTC buyer/receiver
 +
# Verify that both the L-BTC address and TXID are visible on https://blockstream.info/liquid
  
<code>gettransaction 842719feb92914a553fc8e8fccec27a4d0e4833ac3fb363f882ba1dc9bff9078 true</code>
+
Verify the transaction:
 +
# Open the GUI console window of your Elements Core full node, or use <code>elements-cli</code>
 +
# Type <code>importaddress <address></code>, where <code><address></code> is the L-BTC address of the L-BTC buyer/receiver. This will add the address to your wallet as “watch only” and rescan the entire Liquid blockchain. It might take an hour or longer to complete depending on your computer's power.
 +
# After scanning is complete, get details for the L-BTC transaction with <code>gettransaction <TXID> true</code>, where <code><TXID></code> is the L-BTC transaction ID. You should see a transaction object, but "details" will be empty since the blinding key is needed to reveal that information.
 +
# Import the blinding key with <code>importblindingkey <address> <blinding key></code>
 +
# Request transaction details again, and this time they should be visible: <code>gettransaction <TXID> true</code>

Latest revision as of 20:31, 16 April 2021

L-BTC, or Liquid Bitcoin, is a Confidential Asset, fully verifiable, and 1:1 backed BTC token created by Liquid, a federated sidechain pegged to the Bitcoin blockchain. Liquid is implemented by Elements, an open source, sidechain-capable blockchain platform based on the Bitcoin codebase created by Blockstream.

A sidechain is a mechanism that allows tokens from one blockchain to be used securely in an independent blockchain which runs in parallel and uses a different set of rules, performance requirements, and security mechanisms. On a sidechain, one can move tokens back to the original chain through a two-way peg. Sidechains enable new functionality that may have security trade-offs or as a way to test new features that may not be ready to use on the parent blockchain.

These are some new functionalities that Liquid enables:

  • Confidential Transactions: hides the amount from the information displayed at the blockchain -- the most important feature for most Bisq users
  • Issued Assets: allows issuing tokenized fiat, securities, altcoins or digital collectibles
  • Federated consensus mechanism: allows 2- or 3-minute settlement times in normal conditions
  • In development: Schnorr signatures, which will improve network privacy and capacity

All addresses in Liquid are blinded by default using Confidential Transactions. The asset and amount of a transaction is hidden to those watching the Liquid sidechain. Bisq users can mix their coins with all of Liquid federation BTC holdings just trading both assets.

Selling L-BTC

Selling L-BTC is like selling any other altcoin. It just requires an L-BTC payment account in Bisq.

Buying L-BTC

The trader receiving L-BTC (L-BTC buyer) must be able to generate proof of payment in case of a dispute. Otherwise, Confidential Transactions make it impossible for a third party to verify if a payment was made—so L-BTC buyers must be able to generate a transaction's blinding key for mediators or arbitrators in case of disputes.

Warn
Failing to provide the blinding key to a dispute agent will likely result in losing the dispute case.

Generate blinding key

Green Wallet and other custodial wallets can't generate blinding keys, so you must use Elements Core to receive L-BTC for Bisq trades.

Install the Elements Core full node software (note that this does not require running a Bitcoin Core full node) and follow these steps:

  1. Get the receiving L-BTC address
  2. Open the GUI console window of your Elements Core full node, or use elements-cli
  3. Type the command dumpblindingkey <address>, where <address> is the receiving L-BTC address from step 1

The Elements console will return the blinding key in hex. This blinding key is what dispute agents will ask for in case an L-BTC trade ends up in dispute.

FAQ

How is the price of L-BTC determined?

L-BTC is a 1:1 BTC pegged token to Bitcoin, so high volatility is not expected. Buyers and sellers make their fixed price orders close to parity. There's no price feed with market % based prices for this market.

Why not just use the peg-in and peg-out mechanism to exchange L-BTC and BTC?

A peg-in transaction (BTC to L-BTC) requires 102 confirmations on the Bitcoin network (17 hours) before funds can be claimed on the Liquid Network. Peg-out requires approval from two-thirds 2/3 Liquid functionaries approval and it takes about 17-35 minutes to complete. Bisq offers private, easy and secure L-BTC on and off-ramp.

Guidance for dispute agents

In order to verify L-BTC trades, install the Elements Core software on your computer from https://github.com/ElementsProject/elements/releases, and then:

  • Set txindex=1 in elements.conf (neither L-BTC sender nor receiver need this setting)
  • Wait until Elements fully syncs to the Liquid blockchain

Verifying a transaction

Obtain information from trading peers:

  1. Obtain the TXID for the L-BTC transaction (either trading peer can provide this information)
  2. Obtain the Blinding Key for the receiving L-BTC address from the L-BTC buyer/receiver
  3. Verify that both the L-BTC address and TXID are visible on https://blockstream.info/liquid

Verify the transaction:

  1. Open the GUI console window of your Elements Core full node, or use elements-cli
  2. Type importaddress <address>, where <address> is the L-BTC address of the L-BTC buyer/receiver. This will add the address to your wallet as “watch only” and rescan the entire Liquid blockchain. It might take an hour or longer to complete depending on your computer's power.
  3. After scanning is complete, get details for the L-BTC transaction with gettransaction <TXID> true, where <TXID> is the L-BTC transaction ID. You should see a transaction object, but "details" will be empty since the blinding key is needed to reveal that information.
  4. Import the blinding key with importblindingkey <address> <blinding key>
  5. Request transaction details again, and this time they should be visible: gettransaction <TXID> true