<p>You basically got it.<br>
create 2-of-3 multisig addresses (meaning needing two out of three signatures)<br>
1 is for the buyer, 1 is for the seller, and 1 is for the mediator</p>

<ol>
<li><p>buyer sends money to the multisig address, commiting the funds to the transaction</p></li>
<li><p>if the transaction goes well, buyer sends a signed transaction
spending the multisig output to the seller and sends the transaction
to the seller, the seller signs the tx and broadcasts it</p></li>
<li><p>if buyer is unhappy he/she can try to work out the matter with the
seller till they agree on any split of the money, it would involve
same steps as in (2) except now the money is divided (any
percentage) between the buyer and the seller</p></li>
<li>if the buyer and seller can't work things out, the mediator steps in
and after a decision is made, the money is split between the three
addresses (buyer, seller, fee for mediator)</li>
</ol>

<p>So those are the conceptual steps to implement the scheme</p>

CC BY-SA 3.0
2017-02-04T08:30:44.093Z
At step #2, in detail, how can the buyer send the signed transaction to the seller?
anhldbk
CC BY-SA 3.0
2017-02-04T20:15:35.817Z
the buyer can send the transaction via email for example
Albert S
CC BY-SA 3.0
2017-02-05T05:47:36.500Z
So the receiver will have to check if the transaction is signed by the sender manually, right? And there's no support for collectively signing a transaction by Bitcoin network?
anhldbk
CC BY-SA 3.0
2017-02-05T23:41:19.263Z
@anhldbk I am not sure about that, perhaps post a question?
Albert S
CC BY-SA 3.0
2016-09-16T01:51:39.253Z
2016-09-16T01:51:39.253Z
Albert S
<p>I want to start a BTC market.  I understand all the ways to go about creating a site, it's just the payment implementation which confuses me.  I want multi-sig transactions capable between my users on site.  If I understand correctly, multi-sig addresses are just special wallets anyways which require a certain fulfillment (2 out of three keys, for example) to go through.  </p>

<p>How can I implement a system like this for my users on my server?  So I can allow users to trade without the middle man if possible, yet also have the opportunity for an escrow moderation in case something happens?  In the end a small percentage of market fees can be charged?</p>

<p>I'm new to Bitcoin programming but I'm assuming you simply have your web application interact with server daemons which dynamically create multi-sig addresses on demand for your users and somehow give them each a key, and leave a key for escrow moderation?  And that would probably be all you'd have to do? </p>

CC BY-SA 3.0
2016-05-23T00:55:14.880Z
If it's going to be a BTC market you control then you should just deem yourself as the escrow and let users transact through you just as silk road did. It's admirable that you want to remove trust from the equation but trying to create a system in which users send funds to each other with your permission is an unnecessary incumbent. If you went rogue and tried to spend the btc to yourself, my customer tries to send the cash to himself and I try to take the money back then the coins would just end up in limbo. A shady escrow admin is unlikely to reimburse users simply because the btc is wasted,
derrend
CC BY-SA 3.0
2016-05-23T03:21:02.470Z
That's a good point.  Are there any frameworks you'd recommend for taking and handling payments as such?
tacoma
CC BY-SA 3.0
2016-05-23T04:37:25.530Z
Depends on your choice of language, I use Django because python is easy. If you like python then checkout the pycoin library. blockchain.info have a good python library for accessing their api but if you'd prefer to access bitcoind locally then python-bitcoinlib is useful for that :)
derrend
<multi-signature><escrow>
Implementing Multi-Sig Escrow?
tacoma
# Implementing Multi-Sig Escrow?

(Asked by: username_0 on 2016-05-23)

I want to start a BTC market. I understand all the ways to go about creating a site, it's just the payment implementation which confuses me. I want multi-sig transactions capable between my users on site. If I understand correctly, multi-sig addresses are just special wallets anyways which require a certain fulfillment (2 out of three keys, for example) to go through.

How can I implement a system like this for my users on my server? So I can allow users to trade without the middle man if possible, yet also have the opportunity for an escrow moderation in case something happens? In the end a small percentage of market fees can be charged?

I'm new to Bitcoin programming but I'm assuming you simply have your web application interact with server daemons which dynamically create multi-sig addresses on demand for your users and somehow give them each a key, and leave a key for escrow moderation? And that would probably be all you'd have to do?

**Tags:** multi-signature, escrow

> **Comments:**
> **username_1**: If it's going to be a BTC market you control then you should just deem yourself as the escrow and let users transact through you just as silk road did. It's admirable that you want to remove trust from the equation but trying to create a system in which users send funds to each other with your permission is an unnecessary incumbent. If you went rogue and tried to spend the btc to yourself, my customer tries to send the cash to himself and I try to take the money back then the coins would just end up in limbo. A shady escrow admin is unlikely to reimburse users simply because the btc is wasted,  
> **username_0**: That's a good point.  Are there any frameworks you'd recommend for taking and handling payments as such?  
> **username_1**: Depends on your choice of language, I use Django because python is easy. If you like python then checkout the pycoin library. blockchain.info have a good python library for accessing their api but if you'd prefer to access bitcoind locally then python-bitcoinlib is useful for that :)  

---

## 1 answers

### Answer by username_2 on 2016-09-16. Score: 3

You basically got it.  
create 2-of-3 multisig addresses (meaning needing two out of three signatures)  
1 is for the buyer, 1 is for the seller, and 1 is for the mediator

1. buyer sends money to the multisig address, commiting the funds to the transaction
2. if the transaction goes well, buyer sends a signed transaction
   spending the multisig output to the seller and sends the transaction
   to the seller, the seller signs the tx and broadcasts it
3. if buyer is unhappy he/she can try to work out the matter with the
   seller till they agree on any split of the money, it would involve
   same steps as in (2) except now the money is divided (any
   percentage) between the buyer and the seller
4. if the buyer and seller can't work things out, the mediator steps in
   and after a decision is made, the money is split between the three
   addresses (buyer, seller, fee for mediator)

So those are the conceptual steps to implement the scheme

> **Comments:**
> **username_3**: At step #2, in detail, how can the buyer send the signed transaction to the seller?  
> **username_2**: the buyer can send the transaction via email for example  
> **username_3**: So the receiver will have to check if the transaction is signed by the sender manually, right? And there's no support for collectively signing a transaction by Bitcoin network?  
> **username_2**: @username_3 I am not sure about that, perhaps post a question?  

---

