Is that altcoin you're considering more profitable than what you're currently mining?
http://dustcoin.com/mining and
http://www.coinchoose.com/ have some altcoins listed, but not all of them. (For instance, neither of them have Yacoin listed.) This little app I knocked together will tell you how much to expect:
https://dl.dropboxusercontent.com/u/57535575/CoinProfitability.zipIt needs these to do its calculation:
- interval over which to calculate (in seconds...86400 to calculate for a day)
- your expected hashrate
- the chain's current block reward
- the current difficulty
- (optional) exchange rate to get BTC for your altcoin
You most likely know your hashrate for SHA-256 and scrypt coins. Difficulty is available from most block explorers. Pools usually have the block reward available. Get the exchange rate from your favorite exchange; if you're calculating Bitcoin profitability, you can leave it blank or set it to 1.
You can now add configuration information to the registry for your favorite coins. Example configs for several coins are included. Adding others as you need them should be easy. You can pull exchange rates from either Bter or Cryptsy (depending on whether they support the coin you want to exchange). Difficulty and reward information can be pulled from blockchain.info (for Bitcoin), most Abe implementations (for other coins), or from CoinChoose (for the coins it supports).
I built this in Visual Studio 2012 Express against .NET Framework 4.0 (needed that version because it's the first that includes BigInteger support). I've also tested it under Mono; its implementation of Decimal.ToString() is a bit different and needed some adjustment. Source code is also available...there really isn't much to it:
https://github.com/salfter/CoinProfitability/Gnu.Getopt is needed to compile the CLI version:
http://getopt.codeplex.com/Note: Exchange rates might not get looked up properly when running under Mono on Linux. I might need to switch to a different JSON parsing library to make this work. I got rid of the dependency on JSON.NET that kept the calculator from running on Linux; it now uses .NET's JavaScriptSerializer class.
Update: (6 May 2014) Since scraping coin explorers is getting somewhat iffy, you can now use CoinChoose to get difficulty and reward information for the coins that are listed there. Also, the library buffers data received from CoinChoose and Cryptsy for reuse, which speeds things up when you're (for instance) using the CLI to list all coins.
Update: (1 April 2014) Not an April Fools' joke: the CLI client has a new option to dump info on all coins. Maybe this will run faster on the Raspberry Pi and similar resource-starved environments.
Update: (28 March 2014) Lots of changes. First, Cryptsy changed the API URL a while back, but I hadn't updated this program. Also, the Litecoin explorer now returns block difficulty in the table on its homepage, simplifying data retrieval for that coin. I've also improved exchange lookup at Cryptsy...instead of downloading the entire orderbook on each call, it can download just the orderbook data for the currency in question. Finally, proof-of-stake coins are handled properly: with Abe-compatible block explorers, we make sure we're pulling reward and difficulty information from the most recent proof-of-work block.
Update: (31 May 2013) A CLI version is now available for use in your scripts, as well as a DLL you can include in your own .NET (or Mono) projects.
Update: (4 June 2013) Cryptsy decided to start polluting its JSON with HTML...workaround applied.
Update: (4 June 2013, the second) Turns out that Cryptsy has an API now...that allows me to get rid of a bunch of cruft.
Update: (11 June 2013) Updated default config for more reliable operation, and added a Feathercoin config.
Update: (12 June 2013) Fixed a bug in which non-integer rewards caused an incorrect calculation, and added a Bitbar config.