Bitcoin Forum
June 28, 2017, 07:33:11 AM *
News: Latest stable version of Bitcoin Core: 0.14.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »  All
  Print  
Author Topic: [ANN] Joinmarket - Coinjoin that people will actually use  (Read 75510 times)
belcher
Full Member
***
Offline Offline

Activity: 226


View Profile
January 09, 2015, 09:21:36 PM
 #1

JoinMarket is built for those who:
1. Want to use coinjoin to improve the privacy of their bitcoin transactions or reduce the miner fees they pay.
2. Want to earn an income from their investment bitcoins

Coinjoin is a kind of bitcoin transaction which combines multiple people's transactions together in an effort to improve privacy, especially as a way to regain privacy after it's been degraded by bad practices. It can also reduce the size of transactions and so require less miner fees. The concept has enormous potential, but it has not seen widespread usage so far despite the multiple projects that implement it. I believe this is because the incentive structure was not right.

A coinjoin transaction requires other people to take part. The right resources (coins) have to be in the right place, at the right time, in the right quantity. This isn't a software or tech problem, its an economic problem. I propose a new kind of market is created that would allocate these resources in the best way.

In practice this would work by allowing coinjoin transactions to be paid-for. On one side there will be time-rich coinjoiners who will wait around and be willing to coinjoin at any time. On the other side will be time-stressed coinjoiners who can coinjoin instantly for a price.

This will naturally attract investors, holders of bitcoin who don't want to transact but just want to earn the coinjoin fee. They would be taking on only a very small amount of risk; Their private keys would never leave their computer, the software would only sign transactions that are valid and pay the correct amount of coins. So it's safe to say that investors would pour in, resulting in the coinjoin fees being very low.

Elevator Pitch for Coinjoin Users / People who desire privacy.

With Joinmarket nobody can steal your coins, you would mix them on your own computer. The software will never sign a transaction unless your coins are going to exactly the right address in the right amount.

Other mixing services mix your coins with other users, resulting in you getting back coins possibly related to drugs, stolen money or other illegal or immoral practices. This is highly undesirable if you just don't want your employer knowing which non-profits you support from your salary. Because of the incentives of JoinMarket, you have access to a huge amount of clean, untainted bitcoins to mix with at a very low price. Many of the bitcoins you're mixing with will be bought from regulated exchanges, owned by legitimate holders of bitcoin.

Not to mention you'd likely be paying lower fees for mixing than other services, because of the competition between willing-to-wait coinjoiners. Indeed if you don't mind waiting, you can wait around with a low offer fee and maybe another impatient coinjoiner will join with you.

Elevator Pitch for Investors

Firstly I'd like to clarify what I mean by investing. I don't want you to give your bitcoins to me. I dont want you to give your bitcoins to anybody. The private keys would be safely held on your own computer, known only by you and your wallet.

Features:
1. Earn an income from your investment bitcoins.
2. Very low risk. Your coins have to be on an online computer, but the software would only sign transactions that are valid and pay you the correct amount.
3. No commitment, withdraw your bitcoins at any time.
4. Improves the privacy of the bitcoin transactions, which makes bitcoin as a currency more useful and thus increases its value.
5. Improves the fungibility of bitcoin, since the distinction between 'clean' and 'dirty' bitcoins will be meaningless. Eliminates this particular systemic risk to bitcoin.

Downside:
1. Your return is likely to be quite low. Low risk = low reward.
2. You don't get paid unless people who desire privacy actually use this. If you're an investor you have an incentive to tell people about JoinMarket and contribute to it.

The Software

I've been writing an implementation of the idea. Right now the coinjoiner bots meet in an IRC channel. The bots announce their orders in an open-outcry trading pit style. Transaction data is sent between users as IRC private messages. Authenticated encryption is used to stop the IRC server eavesdropping. I have plans one day to move away from IRC entirely and have the users meet in some kind of peer to peer network.

How to try
Download the repository from https://github.com/chris-belcher/joinmarket and read the README file
There is an internal HD wallet. It is generated from a wallet encrypted on your hard drive.

There's also plenty of information on the wiki https://github.com/chris-belcher/joinmarket/wiki

Code:
$python wallet-tool.py generate
   Generates a new wallet. Asks for your encryption passphrase and gives you a 12-word recover seed to write down on paper, a la Electrum or Mycelium.

$ python wallet-tool.py [wallet file name]
  This will print out addresses from the HD wallet, send some coins to the first receive address

$ python yield-generator.py [wallet file]
  Becomes an investor bot, being online indefinitely and doing coinjoin for the purpose of profit

$ python sendpayment.py -N 4 [wallet file] [amount-in-satoshi] [destination address]
  Chooses the cheapest offer to do a 5-party coinjoin to send money to a destination address

If you're a frugal user and don't feel like paying to coinjoin if you dont have to, use this command
$ python patientsendpayments.py -N 1 -w 2 [wallet file] [amount in satoshi] [destination address]
  Announces orders and waits to coinjoin for a maximum of 2 hours. Once that time it up cancels the
  orders and pays to do a 2-party coinjoin.

$ python ob-watcher.py
  Starts a local http server which you can connect to and will display the orderbook as well as some graphs

$ python wallet-tool.py recover
  Will prompt for the 12 word recover seed and create a new encrypted wallet file

$ python wallet-tool.py -p [wallet file]
  Will print out addresses along with private keys which can be used to sweep the coins away

Example coinjoins transactions made with JoinMarket:
14 parties, amount 0.01btc https://blockchain.info/tx/55eac9d4a4159d4ba355122c6c18f85293c19ae358306a3773ec3a5d053e2f1b
11 parties, amount 0.57960945btc https://blockchain.info/tx/402d3e1df685d1fdf82f36b220079c1bf44db227df2d676625ebcbee3f6cb22a
8 parties, amount 2.6btc https://blockchain.info/tx/722bb2662cb2ef9b4a2693e52ba82c44cea1042349f1aa6e71e28a3947aa4144
7 parties, amount 0.02btc https://blockchain.info/tx/e38e45d004ef913ee4e952d1f185dbea91cc8cc56e22aa7f767a3edec952a4a9
3 parties, amount 25btc https://blockchain.info/tx/da1a2259be752dd6b5162221989181b7334bd0acbbc1bca31596e5bc32375770
4 parties, amount 40btc https://blockchain.info/tx/3b97544488cac0271a80b20822597342648d19ed02ac25041bd8d35e624d8e6b
3 parties, amount 12btc https://blockchain.info/tx/d91278e125673f5b9201456b0c36efac3b2b6700fdd04fc2227352a63f941170
4 parties, amount 0.84btc (~$200 at contemporary exchange rate) https://blockchain.info/tx/7d588d52d1cece7a18d663c977d6143016b5b326404bbf286bc024d5d54fcecb
4 parties, amount 0.1btc https://blockchain.info/tx/b85a3b563474ca98ba1809460e61a50053899c21f9869afb6a3a6d4b4cb00b7c
3 parties, amount 0.19btc https://blockchain.info/tx/2e2cd9204f97a2260ba5b1fd446f394eeff79daa973e37dd29794a9ee667bf64

Further Development
Github: https://github.com/chris-belcher/joinmarket
IRC: irc.freenode.net #joinmarket
Twitter: https://www.twitter.com/joinmarket
Reddit: http://www.reddit.com/r/joinmarket

If you can program, contribute code. The project needs development works more than anything else right now. A list of suggested projects are here https://github.com/chris-belcher/joinmarket/wiki/What-can-I-do-for-JoinMarket%3F

If you require privacy, JoinMarket can be used right now on the mainnet, albeit with a command-line interface. Many people are already using it.

Bitcoin Core wallet could be integrated by using the -walletbroadcast=0. Integration on the command line using json-rpc calls is already done, use the --rpcwallet flag on sendpayment.py

I have plans to create an Electrum plugin which does this, it would be a simple checkbox and thereafter all transactions would be coinjoined.

If you run your own yield generator bot, you can earn an income from your bitcoin savings and increase the privacy and anonymous set of others.

People trust systems more if they think they know how it works. If you're good with graphics, you can help the project by creating an infographic for how it all works. For example how coinjoin transactions in the joinmarket software are communicated, created, checked and signed.

Snazzy websites are better for getting the word out than big walls of text on a forum.

Further Reading
gmaxwell's original coinjoin post. https://bitcointalk.org/index.php?topic=279249.0
my original Joinmarket suggestion / writeup. https://bitcointalk.org/index.php?topic=279249.msg9384411#msg9384411
Mike Hearn's blog post about privacy and coinjoin https://medium.com/@octskyward/merge-avoidance-7f95a386692f

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1498635191
Hero Member
*
Offline Offline

Posts: 1498635191

View Profile Personal Message (Offline)

Ignore
1498635191
Reply with quote  #2

1498635191
Report to moderator
1498635191
Hero Member
*
Offline Offline

Posts: 1498635191

View Profile Personal Message (Offline)

Ignore
1498635191
Reply with quote  #2

1498635191
Report to moderator
1498635191
Hero Member
*
Offline Offline

Posts: 1498635191

View Profile Personal Message (Offline)

Ignore
1498635191
Reply with quote  #2

1498635191
Report to moderator
belcher
Full Member
***
Offline Offline

Activity: 226


View Profile
January 09, 2015, 09:27:37 PM
 #2

Reserved

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
onemorebtc
Sr. Member
****
Offline Offline

Activity: 266


View Profile
January 09, 2015, 09:30:47 PM
 #3

aradesh@aradesh:~/src/joinmarket$ python yield-generator.py blahhh
downloading wallet history
no tx used
Traceback (most recent call last):
  File "yield-generator.py", line 95, in <module>
    main()
  File "yield-generator.py", line 90, in main
    maker = YieldGenerator(wallet)
  File "yield-generator.py", line 26, in __init__
    Maker.__init__(self, wallet)
  File "/home/aradesh/src/joinmarket/maker.py", line 129, in __init__
    self.orderlist = self.create_my_orders()
  File "yield-generator.py", line 42, in create_my_orders
    max_mix = max(mix_balance, key=mix_balance.get)
ValueError: max() arg is an empty sequence

i guess i should start mining Wink

transfer 3 onemorebtc.k1024.de 1
belcher
Full Member
***
Offline Offline

Activity: 226


View Profile
January 09, 2015, 09:35:04 PM
 #4

aradesh@aradesh:~/src/joinmarket$ python yield-generator.py blahhh
downloading wallet history
no tx used
Traceback (most recent call last):
  File "yield-generator.py", line 95, in <module>
    main()
  File "yield-generator.py", line 90, in main
    maker = YieldGenerator(wallet)
  File "yield-generator.py", line 26, in __init__
    Maker.__init__(self, wallet)
  File "/home/aradesh/src/joinmarket/maker.py", line 129, in __init__
    self.orderlist = self.create_my_orders()
  File "yield-generator.py", line 42, in create_my_orders
    max_mix = max(mix_balance, key=mix_balance.get)
ValueError: max() arg is an empty sequence

i guess i should start mining Wink

yield-generator's way of telling you you've got no money.

You can also get testnet coins from various faucets. Look at the links at the bottom of this. https://en.bitcoin.it/wiki/Testnet

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
onemorebtc
Sr. Member
****
Offline Offline

Activity: 266


View Profile
January 09, 2015, 09:36:40 PM
 #5


You can also get testnet coins from various faucets. Look at the links at the bottom of this. https://en.bitcoin.it/wiki/Testnet

already searching, but the only testnet-ewallet which gives me a seed instead of an address does not work currently.

transfer 3 onemorebtc.k1024.de 1
belcher
Full Member
***
Offline Offline

Activity: 226


View Profile
January 09, 2015, 09:43:30 PM
 #6


You can also get testnet coins from various faucets. Look at the links at the bottom of this. https://en.bitcoin.it/wiki/Testnet

already searching, but the only testnet-ewallet which gives me a seed instead of an address does not work currently.

You're misunderstanding.
The seed that you pass to scripts like wallet-tool.py and yield-generator.py are like brainwallets, they can be anything. For real bitcoins you would generate them from a 12-word mnemonic like Electrum does.

Come up with any seed and store it somewhere safe. Pass it as a command line argument to wallet-tool.py, which will print out a bunch of addresses. Copypaste the first of those addresses into a testnet faucet.

Aside: Because I'm a newbie the forum is rate limiting my posts to 5 minutes apart. It's quite annoying, any chance a mod can bump me up? given I've already demonstrated I'm not a spammer.

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
onemorebtc
Sr. Member
****
Offline Offline

Activity: 266


View Profile
January 09, 2015, 09:46:20 PM
 #7

thanks.

i've contacted mods through the report link... maybe they'll change it.

transfer 3 onemorebtc.k1024.de 1
jt byte
Hero Member
*****
Offline Offline

Activity: 672


View Profile
January 10, 2015, 03:00:06 AM
 #8

good luck with your project
molecular
Donator
Legendary
*
Offline Offline

Activity: 2310



View Profile
January 11, 2015, 12:22:21 PM
 #9

I think this is a great idea.

Question: is there usually a backend bot managing the orderbook on #joinmarket-pit-test? Is it dead or am I misunderstanding?

"!orderbook" doesn't return anything.

EDIT: ah, got it: it's sent via pm

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
belcher
Full Member
***
Offline Offline

Activity: 226


View Profile
January 12, 2015, 10:06:36 PM
 #10

I think this is a great idea.

Question: is there usually a backend bot managing the orderbook on #joinmarket-pit-test? Is it dead or am I misunderstanding?

The only central point of failure right now is the IRC server itself. It's not a centralized orderbook like gribble on #bitcoin-otc but more like an open-outcry trading pit. Bots announce their orders when they first join, and will repeat their orders in PM to whoever says !orderbook in channel.

By the way, I saw someone was doing coinjoins with a very small amount, like 666 or 3333 satoshi. Since my bot asks for a 1% fee, it earns not enough to cover the 1000 satoshi contribution to the miner fee. I didn't think of this attack, it's never good to look at your terminal and see "earned fee" being a negative number. Wink Fixed now

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
molecular
Donator
Legendary
*
Offline Offline

Activity: 2310



View Profile
January 13, 2015, 08:20:00 AM
 #11

I think this is a great idea.

Question: is there usually a backend bot managing the orderbook on #joinmarket-pit-test? Is it dead or am I misunderstanding?

The only central point of failure right now is the IRC server itself. It's not a centralized orderbook like gribble on #bitcoin-otc but more like an open-outcry trading pit. Bots announce their orders when they first join, and will repeat their orders in PM to whoever says !orderbook in channel.

I see.

By the way, I saw someone was doing coinjoins with a very small amount, like 666 or 3333 satoshi. Since my bot asks for a 1% fee, it earns not enough to cover the 1000 satoshi contribution to the miner fee. I didn't think of this attack, it's never good to look at your terminal and see "earned fee" being a negative number. Wink Fixed now

That was me Wink.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
melwinder
Sr. Member
****
Offline Offline

Activity: 252


View Profile
January 13, 2015, 08:30:52 AM
 #12

This sounds like a good idea, I am not much of a techy to be able to put together this kind of project, but I will be looking forward to see what other people will do with it Smiley
marcus_of_augustus
Legendary
*
Offline Offline

Activity: 2296



View Profile
January 13, 2015, 09:34:41 AM
 #13

promising

dserrano5
Legendary
*
Offline Offline

Activity: 1834



View Profile
January 13, 2015, 10:42:52 AM
 #14

I just set up a maker with 0.0999 btc. Let's see if someone bites!

belcher
Full Member
***
Offline Offline

Activity: 226


View Profile
January 13, 2015, 09:23:14 PM
 #15

Merged waxwing's encryption pull request.
Now a taker and maker(s) will send their output addresses through an encrypted channel so an eavesdropping IRC server cannot unmix the coinjoin.

Though that means the pre- and post-encryption bots cannot understand each other. Please pull the latest commits if you're trying it out. You also need to install libsodium cryptographic library.

Read about the protocol here: https://github.com/chris-belcher/joinmarket/blob/master/encryption_protocol.txt

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
dserrano5
Legendary
*
Offline Offline

Activity: 1834



View Profile
January 14, 2015, 09:33:15 AM
 #16

Quote
Though that means the pre- and post-encryption bots cannot understand each other. Please pull the latest commits if you're trying it out. You also need to install libsodium cryptographic library.

Done. My maker process disappeared somehow at some point, no clues about that. I just brought it up again using the new updates.

phelix
Legendary
*
Offline Offline

Activity: 1680


nmc:id/phelix


View Profile
January 16, 2015, 05:17:35 PM
 #17

Interesting!

blockchained.com ■ bitcointalk top posts
goregrind
Full Member
***
Offline Offline

Activity: 147


View Profile
January 20, 2015, 12:01:38 PM
 #18

If you're trying to run this on debian systems you might run into problems regarding nacl and libsodium
Since theres no pre-packaged libsodium you will have to install this manually as per:
http://askubuntu.com/questions/330589/how-to-compile-and-install-dnscrypt
and then run: pip install libnacl

woot?
waxwing
Sr. Member
****
Offline Offline

Activity: 469


View Profile
January 20, 2015, 06:47:37 PM
 #19

If you're trying to run this on debian systems you might run into problems regarding nacl and libsodium
Since theres no pre-packaged libsodium you will have to install this manually as per:
http://askubuntu.com/questions/330589/how-to-compile-and-install-dnscrypt
and then run: pip install libnacl

Thanks for this. Indeed, you have to install it manually; the latest version is 1.02 as at https://download.libsodium.org/libsodium/releases/. And follow the simple instructions at http://doc.libsodium.org/installation/README.html

Sorry that things are not at all well documented yet. Things are still very much in flux Smiley

As for packaging, it seems likely that binaries will be packaged with signatures at some point.

PGP fingerprint 4668 9728 A9F6 4B39 1FA8 71B7 B3AE 09F1 E9A3 197A (use email to contact)
belcher
Full Member
***
Offline Offline

Activity: 226


View Profile
January 21, 2015, 01:15:18 AM
 #20

I noticed tonight there were four yield-generators in the pit. So I went ahead and did a five-party coinjoin.

The command was
Code:
python sendpayment.py -N 4 [seed] 50000000 [dest addr]

Four times the bot sent out the fill command, four times it did the encryption handshake, four times it received a list of UTXOs and destination addresses. It made those into a transaction along with its own inputs and outputs. Then it sent the transaction out four times and waited for four signatures to return. Each of the signatures was valid so the bot added them to the transaction and pushed it to the network. All without crashing, I was amazed. The whole thing took barely any longer than a two-party coinjoin since it all runs in parallel.

https://tbtc.blockr.io/tx/info/095a75f189cb7bd95fc57fb309d5010e09771971243847b5d3ea232ac2518333

1HZBd22eQLgbwxjwbCtSjhoPFWxQg8rBd9
JoinMarket - CoinJoin that people will actually use.
PGP fingerprint: 0A8B 038F 5E10 CC27 89BF CFFF EF73 4EA6 77F3 1129
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!