-
Notifications
You must be signed in to change notification settings - Fork 119
Running a Yield Generator
Yield generator is a JoinMarket bot which does market-making of CoinJoins to produce an income as a join "maker". The bot connects to the JoinMarket trading pit on an IRC channel, announces its offers and waits. Market "takers" will communicate with it to create a CoinJoin transaction.
First thing to understand is that this is not a bank account with a guaranteed interest rate. You are selling a product, namely coinjoins, and your customers can take it or leave it depending on your offered fee, range of available coinjoining, internet speed, latency and so on. Most of the actual decision-making is done by software bots rather than humans but the same principles apply. The algorithm for market takers remembers yield generators they previously dealt with and avoid those who did not offer a good experience. You have an incentive to be on your best behavior.
- A local Bitcoin full node running with JoinMarket. Using a method that queries a third-party server (like blockr.io or electrum servers) is slower, is more likely to hang or crash and generally makes the user experience worse. It also reveals your addresses to the server operator!
- A reliable, relatively fast, always-on internet connection. CoinJoins require multiple people to take part, if one yield generator times-out or is slow, the entire process is held up or must be restarted. People are looking for joins 24/7, so you'll need to run Joinmarket all the time to make joins as well. The entire point of a market maker is to offer a deal immediately, without any waiting or hold-ups.
- A significant enough Bitcoin balance in your joinmarket wallet to offer a wide range of coinjoin amounts. If you can only offer from zero to 10000 satoshi, you're unlikely to get many coinjoin deals. The bigger your balance, the better.
- Update often. This software is still in the very early stages. Keep an eye out of updates. Perhaps subscribe to the twitter or subreddit to get news about updates.
You will need to:
- Install JoinMarket.
- Configure a Bitcoin full node to use Joinmarket.
-
Create and name a Joinmarket wallet using the command:
python wallet-tool.py generate
-
List the addresses held in this newly created Joinmarket wallet using the command
python wallet-tool.py yournewwallet.json
where "yournewwallet" is the name of the wallet you just created. Note a bitcoin address in the 0th level. - Send some Bitcoins to the address you noted. The more the better, as larger wallets are more scarce and can command a higher fee.
- Edit the yield-generator-*.py variant of your choice for your desired fees, then run this variant yield-generator.py on a permanently-on computer with a stable internet connection. Eg: 'python yield-generator-basic.py yournewwallet.json'
- Wait and be patient. The volume of joins is always dependent on the number of takers. You should see a number of user names posting offers at least every few minutes in the IRC chat. A successful join may take a day or longer to appear.
Open one of the two built-in yield generators: joinmarket.cfg in a text editor and edit the configuration. Currently, these are the fields. Most of them can just be left at the default values.
txfee = 100
cjfee_a = 50
cjfee_r = 0.00002
ordertype = 'reloffer'
minsize = 100000 - [satoshis, any integer] / minimum size of your cj offer. Lower cj amounts will be disregarded
Meaning of fields:
- txfee. The yield generators contribution to the miner fee.
- ordertype. One of 'reloffer' or 'absoffer'.
- cjfee_r. Your offered coinjoin fee as a fraction of the coinjoin amount (for 'reloffer'). Takers pay this to you.
- cjfee_a. Your offered coinjoin fee as an absolute number of satoshis (for 'absoffer')
When you're ready simply run the yield-generate.py script with the wallet file as argument.
python yield-generator.py my-wallet-file.json
The balance of the wallet can be viewed to check how much money you've made
python wallet-tool.py my-wallet-file.json
Also, the history can be viewed
python wallet-tool.py my-wallet-file.json history
Short answer: privacy
Long answer: https://bitcointalk.org/index.php?topic=919116.msg11465848#msg11465848
You may wish to change the input merging policy in joinmarket.cfg
, see this page: https://github.com/JoinMarket-Org/joinmarket/wiki/Configuring-with-joinmarket.cfg#input-merging-policy
The value of gradual
or greedy
is usually good for keeping the number of inputs from getting too large.
If you are a programmer you could try creating your own algorithm for the yield generator.
Other yield-generator algorithms are in a separate github repository: https://github.com/JoinMarket-Org/custom-scripts Many more people can work on them without the possibility of putting the main JoinMarket code in danger.