2010-10-10
A Short Introduction to Bitcoin - A Peer to Peer Cryptocurrency
I recently added the ability to donate to TinyVid using bitcoins. The bitcoin website describes bitcoin as 'a peer-to-peer network based digital currency'.
Bitcoins are a 'virtual' currency. There are no physical coins involved. It's very similar to virtual currency in online games where people outside the game trade it for physical money.
The endpoints of a bitcoin transaction are known as an 'address'. When you want to send bitcoins to another person you ask them for an address and instruct your bitcoin client to send a number of coins there. When you want to receive bitcoins you generate an address using the client and pass the address on to the other party.
The process by which transactions are handled via the peer-to-peer network are described at the bitcoin website. There is also a good high level overview in this Bitcoin Electronic Currency article.
To get started with bitcoins, download the client or build from the source, available at the bitcoin website. Once running it will connect to the bitcoin network and proceed to download the existing blocks. This can take a few minutes as there's about 84,000 of them. Once that's done you can send and receive bitcoins.
You can receive some free bitcoins for testing from the bitcoin faucet. You'll need to create an address to receive the coins. From the bitcoin client choose 'New' to create an new receiving address. You can optionally give it a label so you can refer to it by name. Copy that new address to the clipboard and paste it into the facet website. When you click 'Get Some' you will receive a small number of coins.
The received coins will appear in the bitcoin client GUI almost immediately. The initial state will display as 'unconfirmed/0'. As more bitcoin nodes pick up the transaction the number will increase until eventually it says 'confirmed'. At this point you can use the coins with confidence. You can actually transfer and spend the coins while they are 'unconfirmed' but all transactions using them will also stay unconfirmed until the original one is confirmed.
If you want to send those coins elsewhere all you need to do is click 'Send Coins' in the client. Paste in a receiving address and an amount and click 'Send'.
How do you get coins in the first place? You need to find a merchant that's willing to trade you coins for something. Here are some merchants that will trade coins for cash or credit card payments:
- bitcoinexchange.com (service no longer active). Buy and sell bitcoins using Euros via SMS/Phonepayment or bank transfer.
- bitcoin4cash.com (service no longer active). This service offers bitcoins for cash sent through the mail. They also offer a service to pay for bitcoins via bank wire (iservice no longer active).
- bitcoin2cash.com (service no longer active). Another service offering bitcoins for cash sent through the mail.
Online markets exist for trading bitcoins to and from various currencies. The most popular of these is probably mtgox.com (service no longer active). You deposit bitcoins or USD and can then buy and sell coins. You can withdraw USD or bitcoins. Currently bitcoins are trading at about 11 bitcoins per USD.
Bitcoin Watch has a list of the markets and the current exchange rates. It also has information on the state of the bitcoin network.
Bitcoins can be used in a number of places. Some I know about are listed below and the bitcoin trade (iservice no longer active) page lists more:
- Cashcow Online Roulette (service no longer active). A roulette game written in Flash that uses bitcoins. Sign on with any credentials, deposit some coins, and once they're confirmed you can play roulette with them. This is a good example of how the sending and receiving of bitcoins can work.
- Bidding Pond (service no longer active). An online auction site that uses bitcoins.
- Minesweeper (service no longer active). A facebook app that uses bitcoins.
- Bitcoin Sportsbook (service no longer active). Bet on sports events.
- Qugelmatic Bookstore (service no longer active). Buy books through the 13th largest bookstore on eBay using bitcoins.
- Auckland Bitcoin ATM - a bitcoin ATM available in Auckland, New Zealand.
Adding the ability to a website to send and receive payments using bitcoin is easy. The bitcoin client can run a JSON-RPC server that provides a full featured API. There are bindings for a number of different languages. I wrote and contributed a Factor bitcoin API recently. This is what I use on the tinyvid donation page to display the payment address and the current donation balance.
To receive via bitcoin you don't need to have the client running all the time. You can run the client, generate an address, publish that address to receive money and then close the client. At a later date you can run the client and it will catch up with the current state of the network and any money sent to your address will then be available.
You can even avoid running a bitcoin client completely. MyBitcoin (service no longer active) is a service that essentially runs one for you. You can create receiving addresses, send money, etc all from the website. They also provide a shopping cart interface to integrate payments into a website.
I'm interested in the approach of using bitcoin as a way to do micro-transactions and ease online payments and donations. I'll see how it works out on TinyVid and follow up at a future time with results.