Chris Profile Pic

Christopher J. MacLellan
HCI Institute
Carnegie Mellon University
cmaclell@cs.cmu.edu

Curriculum Vitae
Research Statement
Teaching Statement

Find me online at:

This article is a continuation of my last one and focuses on the topic of Bitcoins. Instead of how to mine bitcoins on your computer I am going to discuss how you can use other people's computers to do all the hard work using Javascript and PHP.

Mining for Bitcoins with Javascript

A recent development in the bitcoin community is Javascript Bitcoin miners. These miners aren't particularly fast but they allow you to utilize the users viewing your website to do your mining. The miners I was able to find (such as Bitcoinplus) all appeared to charge a fee (I think it was 19% for bitcoinplus). I didn't want to pay a fee but I couldn't find any working javascript miners available online. To solve this problem I found the project closest to working and made the changes to the code necessary to make it operational. You can get the working code at github.

Mining for Bitcoins with Wordpress

I then took this one step further. See numbers at the top of this post reading total hashes and hashes per second? I took my code and created a Wordpress plugin that easily integrates Bitcoin mining into your wordpress site. Simply activate the plugin and presto your readers are mining Bitcoins. Those numbers at the top of the page are the stats for your computer as you view this page. Now that I've made the plugin I'll be releasing it on the wordpress plugin directory as soon as I can. You'll be able to configure the plugin with whatever bitcoin server or pool you are using and be generating in no time.

Converting traffic into money

The current exchange rate for Bitcoins is around $26 US per 1 BTC (bitcoin). I got this exchange rate at the biggest bitcoin exchanger Mt. Gox. Finding a hash results in a reward of 50 BTC or approx. $1300 US. Of course the chances of finding a hash are slim to none but the more traffic you have... the better your chances.

Efficiency

Currently the best javascript miners were about 10-20 times faster then mine but now that I have everything up and running I can work on efficiency. If anyone would be interested in contributing please let me know.

Conclusion

Mining for Bitcoins is an interesting and unique way to monetize your website which can possibly give you occasional big payouts. While the speed of hashing is lower with the javascript, large numbers of viewers may lead to a substantial number of hashes being tested. Keep and eye out for the plugin on wordpress.

Future Work

There may be interesting developments in this area with the release of GPU libraries for javascript enabling one to tap into the power of the video cards of their readers, though I don't think the technology is ready quite yet. I've also had discussions with a few of my friends about creating an email signature which loads the javascript files from your website. This would result in bitcoins being generated when people view your emails. I'm not sure if it would work but it is certainly an interesting idea.

© Christopher J. MacLellan