Difference between revisions of "Manual payout"

From Bisq Wiki
Jump to navigation Jump to search
Line 65: Line 65:
 
# Copy and save the Redeem Script.
 
# Copy and save the Redeem Script.
  
== 5. Create transaction ==
+
== 5. Creating transaction ==
  
Next click, once again, “New” at the top, but this time choose “Transaction” from the dropdown menu.
+
Again click <code>New</code> at the top, but this time choose <code>Transaction</code> from the dropdown menu.
* Paste the Redeem Script in the text field at the top and click “Load”. It should take a few seconds and then return the value locked in the multisig.
+
# Paste the Redeem Script in the text field at the top and click <code>Load</code>. It should take a few seconds and then return the value locked in the multisig.
* For the first input fill in an address from **makerPayoutAddressString** and the respective trade amount
+
# For the first input fill in an address from **makerPayoutAddressString** and the respective trade amount.
* Add a new output by clicking the +sign next to the amount field. For this second output paste the address that belongs to takerPayoutAddressString and the respective trade amount
+
# Add a new output by clicking the <code>+</code> sign next to the <code>amount</code> field. For this second output paste the address that belongs to <code>takerPayoutAddressString</code> and the respective trade amount.
* Click submit. You should now have an encoded transaction string. Copy and save it.
+
# Click <code>submit</code>. You should now have an encoded transaction string.  
 +
# Copy and save the transaction.
  
 
== 6. Verify transaction ==
 
== 6. Verify transaction ==

Revision as of 04:35, 6 April 2020

Warning

In this process you copy and paste your private keys from the Bisq software into a web browser. As a precaution it is advised you remove all of your funds from this wallet before starting this procedure.

Precautions

This method is only necessary in extreme occasions where one of the traders may not be available. Therefore it is important to make sure that the person who constructs the transaction does not defraud the other signers.

What you need

This document uses open source tools (other than Bisq) to create, sign and broadcast transactions of funds locked in multisig transactions. To spend out of a multisig, two things are needed:

  • A redeem script
  • Enough private keys to meet the minimum multisig threshold. Use the string in priv WIF= instead of priv HEX=.


Bisq does not provide the Redeem Script for the multisig, but we can recreate it with all the public keys involved in the multisig.

Tools you need:

1. Get private keys

To get access to your Bisq wallet's private key press Ctrl + j or alt +j or cmd + j.

Check Include private keys and click COPY TO CLIPBOARD. Copy, paste and save that information in a bisqWallet.txt file.

2. Get multisg public keys

Each trader involved can get their public keys and the other trader's public keys in their trade JSON contract. Find your trade under PORTFOLIO. Click the i icon next to the trade ID, and at the bottom click VIEW CONTRACT IN JSON FORMAT. At the end, you see the Buyer and Seller public keys:

BuyerMultiSigPubKeyHex:
SellerMultiSigPubKeyHex:


Legacy protocol

If resolving a trade with the old protocol that involved a 2 out of 3 multisig, a third public key belonging to the arbitrator is necessary. The arbitrator can get this public key by following the steps above and search in their own bisqWallet.txt file for it. They can find it by looking for the public key for their Arbitrator address. It is the one in the line with context=ARBITRATOR.

An alternative way to get the arbitrator's public key is to look for it in the blockchain. This can be done if at least one of the traders paid the trading fees in BTC.

By tracking the BTC trading fee you can find the cluster of other trades that arbitrator was involved in. Then you need to find to Payout transactions - spending from a 2 out of 3 multisig. In these transactions will be able to find 3 revealed public keys for each trade. The one that is present in both trades is the arbitrator's.

3. Get payout addresses

At the end of the JSON contract file you can also find the intended payout address for each trader:

makerPayoutAddressString:
takerPayoutAddressString:

4. Recreating Redeem script

For all the web interactions use the Tor browser.

  1. Go to the Coinbin web wallet:
  2. At the top click New and from the dropdown menu choose MultiSig Address
  3. Paste the three public keys in the following order
    1. Arbitrator
    2. BuyerMultiSigPubKeyHex
    3. SellerMultiSigPubKeyHex
  4. Click submit to see an address and a Redeem Script. Make sure the address matches the multisig address for the trade. If not, try to change the order of the public keys.
  5. Copy and save the Redeem Script.

5. Creating transaction

Again click New at the top, but this time choose Transaction from the dropdown menu.

  1. Paste the Redeem Script in the text field at the top and click Load. It should take a few seconds and then return the value locked in the multisig.
  2. For the first input fill in an address from **makerPayoutAddressString** and the respective trade amount.
  3. Add a new output by clicking the + sign next to the amount field. For this second output paste the address that belongs to takerPayoutAddressString and the respective trade amount.
  4. Click submit. You should now have an encoded transaction string.
  5. Copy and save the transaction.

6. Verify transaction

Click “Verify” at the top and paste the encoded string you got from the previous step. Verify all is correct before moving to the next step.

7. Sign transaction

Next click “Sign” at the top of the page and paste your WIF private key you got on step 1 on the “Private key” text field and the encoded transaction in the text field bellow.

To find the private key, search your bisqWallet.txt file for the value of the BuyerMultiSigPubKeyHex (or SellerMultiSigPubKeyHex if you're the seller), which you got on step 2. The private key beginning with "priv WIF=" is written just after the search result. Ensure that the pasted private key is just the part after the "priv WIF=".

Then click “Submit”. You should get a new encoded transaction string. Copy and save it and share it with the other parties of the multisig so they can sign and broadcast it.

8. Second signature and broadcast

The second signer should click “Verify” at the top of the Coinbin website and paste the encoded string the previous signer shared with you. If you're ok with it, click “Sign” at the top of the page and paste your WIF private key from step 1 on the “Private key” text field and the encoded transaction shared with you in the text field below. Then, click “Submit”. You should get a new encoded transaction string. Copy and save it.

You can verify the transaction before broadcasting.

If everything is correct, click “Broadcast” at the top of the page, paste the encoded transaction string you got after you signed the transaction and click “Submit”.

After all is done, delete the bisqWallet.txt file you created on step 1.