Difference between revisions of "Manual payout"
m (Changed torproject.org link to https) |
m (Note about deleting the temporary bisqWallet.txt file) |
||
Line 93: | Line 93: | ||
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”. | 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 which you created on step 1. |
Revision as of 12:51, 30 March 2020
Contents
Warnings
In this process you'll be copying and pasting your private keys from the Bisq software into a web browser. So it may be worth it to move all of your funds from this wallet before starting.
Precautions
This method will only be necessary in extreme occasions where one of the traders may not be available. It's therefore important to make sure that who constructs the transaction doesn't defraud the other signers.
What we'll need
In this document we will using open source tools (aside from Bisq) to create, sign and broadcast transactions of funds locked in multisigs. In order to spend out of a multisig two things are needed:
- redeem script
- enough private keys to meet the minimum multisig threshold. We'll be using the string in "priv WIF=" instead of "priv HEX=".
Bisq doesn't provide the Redeem Script for the multisig but we can recreate it with all the public keys involved in the multisig.
Tools we're going to use:
- Bisq software
- Blockstream's block explorer
- Coinbin web wallet
- Tor browser
1. Get the private keys
You can get access to your Bisq wallet's private key by pressing "Ctrl + j" or "alt +j" or "cmd + j".
Tick “Include private keys” and click COPY TO CLIPBOARD. Copy, paste and save that information in a bisqWallet.txt file.
2. Get the multisg public keys
Each trader involved can get their and the other trader's public key in their trade JSON contract. Find your trade under PORTFOLIO. Click the little 'i' icon next to the trade ID and at the bottom click on VIEW CONTRACT IN JSON FORMAT. At the end of it you'll find the following:
BuyerMultiSigPubKeyHex: SellerMultiSigPubKeyHex:
These are your and the other trader's public keys involved in the multisig.
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's 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 we can find the cluster of other trades that arbitrator was involved in. Then we 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 the payout addresses
At the end of the JSON contract file you can also find the intended payout address for each trader:
makerPayoutAddressString: takerPayoutAddressString:
4. Recreate the Redeem script
For all the web interaction will be using the Tor browser. Go to the Coinbin web wallet:
- at the top click “New” and from the dropdown menu choose “MultiSig Address”
- paste in the three public keys in the following order
- Arbitrator
- BuyerMultiSigPubKeyHex
- SellerMultiSigPubKeyHex
- click submit and you should 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.
- Copy and save the Redeem Script.
5. Create the transaction
Next click, once again, “New” at the top, but this time choose “Transaction” 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.
- 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
- click submit. You should now have an encoded transaction string. Copy and save it.
6. Verify the transactions
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 the 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 you got on step 1 on the “Private key” text field and the encoded transaction shared with you in the text field bellow. Then click “Submit”. You should get a new encoded transaction string. Copy and save it.
You can verify the transaction once again 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 which you created on step 1.