Bitcoin Forum
August 03, 2021, 09:41:42 PM *
News: Latest Bitcoin Core release: 0.21.1 [Torrent]
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Legal / How I plan to do my taxes (USA) on: April 16, 2014, 06:33:26 AM
-- Background --

I thought it might be interesting to document the process I'm following to figure out how to pay my bitcoin-related taxes as I finalize my taxes for the previous year.  I want to point out the obvious before I start: I'm neither a lawyer nor accountant, so bear in mind that I'm certainly not qualified to give tax advice! I'm just documenting how I myself plan to figure out my taxes. I strongly urge you to consult with a real accountant before trusting anything I say in here.

I do want feedback on this process, so please feel free to pitch in with any thoughts! I'm keeping this thread unmoderated, but I do have a request. If you believe that the IRS is evil, that taxes are evil, that we shouldn't pay the IRS, or anything along those lines, more power to you - but please don't post those comments in this thread.  This thread is specifically about how to comply with IRS regulations. There are lots of other threads for complaining; please use one of those to voice your opinion, or start your own thread.

Some background about me.  I first became involved in bitcoins around 2011, and I mined a couple of coins back then (worth all of twenty bucks at the time!) before more or less forgetting about the idea.  I started back up in 2013, and I've been a strong proponent ever since.  I'm a US citizen, and yes, I do pay my taxes scrupulously.  I have some programming experience, enough that I can code up a basic application without shooting myself in the foot, but I'm certainly not a professional programmer.  I also have extensive experience with Excel, which came in handy.

I don't have access to an accountant who is familiar with both IRS rules and bitcoins, so I decided to go it alone.  I'm using Turbotax to handle most of my taxes, and entering the bitcoin-related tax info manually into it. That said, I'm not sure I can trust Turbotax - I found, documented, and reported a bug in one module that would have had me pay a whopping five times my taxes to the IRS! I also have an extension for filing, so the April 15 deadline doesn't apply to me.

-- Preparation --

I started out by exporting all transactions from my primary wallet into a spreadsheet. Then, I went to each Web-based wallet or exchange site I used, got a data dump of all my transactions there, and added it to the spreadsheet.  As a side note, I'm glad I didn't use as a wallet in 2013.  Their exports are horrible! They contain almost none of the info I needed to categorize or even identify my transactions, and the export had full bitcoin transaction info (such as multiple source addresses, multiple outputs, no labels for addresses, etc.) -- almost all of which is irrelevant for tax purposes, or worse, misleading. I played around with my 2014 data a bit, just to see how it would work, and if they don't improve their export interface by next year, I'll have to resort to screen-scraping and copy/pasting the info into a spreadsheet.

Then I started perusing the transactions for patterns.  I would look for common ways in which I earned coins, or different transactions where I would spend coins for something.  The idea at this stage was just to get an overall feel for how I've been using bitcoins.  I started labeling the transactions and grouping them into several broad categories.

Next, I categorized each transaction as follows: buy coins, spend coins, mine coins, or other.  Buying coins is any transaction which resulted in me getting coins I didn't have before, except for mined coins.  Spending coins is any transaction which resulted in me getting something of value in exchange for coins. It doesn't matter what the "something" is for tax purposes - could be mining hardware, could be a book or a song, could be a pizza!  Mining includes both generated coins (solo mining and p2pool or similar) and pool mining (where the mined coins go into a common pool account, then get distributed to miners).  All other transactions, such as giving coins away as tips or transferring coins between wallets, are irrelevant for tax purposes.

After that, I gathered up my documentation. In particular, I got any receipts I could for cash-to-coin and coin-to-cash transactions, since that establishes my cost basis for those coins.

Then, I had to find a reliable price source for valuing my mined coins.  After mulling my options, I eventually decided to go with MtGox pricing up until the end of 2013, and Bitstamp for 2014 onwards.  Conveniently, has historical records of pricing, and even actual transaction volumes, posted at .  I downloaded the files for MtGox to USD and Bitstamp to USD, then tried to import them into Excel - and it failed miserably. The files had over 1M lines, which is the max Excel can handle. In addition, the date/time is in UNIX epoch format, which takes some effort to convert to usable form in Excel. (It's not hard, just another irritating step to handle.) So, I wrote a little gawk script to parse the files, calculate the daily weighted average, format it in human-readable form, and put that into a text file.  This got me a daily price for the coins. I'll post the gawk script in a follow-up post in this thread, if anyone would like to use it.  A little Excel vlookup() magic later, I had the exchange price for each non-cash transaction in my log.

-- Tax Puzzlers --

One of the first questions was whether to treat my bitcoin exploits as a hobby or a business. While I do have a desire to profit, the IRS requires a lot more than that before accepting it as a business.  For example, it requires an actual profit every once in a while ... And while classifying bitcoin stuff as a business would allow me to deduct my mining losses, it would also impose massive paperwork overhead on me. In the end, I decided that based on how I use bitcoin and how little it matters to me in terms of income (compared to my day job), I couldn't justify calling it a business. So, hobby it is!

I struggled a bit with trying to figure out when I should be looking at transactions for capital gains, when for income, and when it's irrelevant for both. Eventually, I hit upon a revelation (that may be obvious to others, but was news to me). Income tax should be considered only when a coin is received. Capital gains tax should be considered only when a coin is spent. However, in both cases, it only counts if the coin was spent or received in exchange for something of value.  (As per the IRS instructions, mining is considered something of value.) If I transfer coins between wallets, no tax of either type is due - just like no tax is due if I move money between two accounts at different banks, or move my stock holdings from broker A to broker B.  Similarly, if I give coins to someone as a gift or tip (and receive nothing in exchange for the tip), then no capital gains applies. From the very name, capital gains only matter if you gain something.

That said, to calculate capital gains, you have to know your cost basis. So, to get an accurate valuation of all my coins, I figured out that I have to include *every single coin-received transaction* in my capital gains calculations, even if they're not counted as taxable income. This information matters not just for this year, but for figuring out the cost basis for next year's taxes too. However, as noted, cap gains taxes are only due when something of value is received, so only coin-spend transactions that resulted in a taxable gain are included.

At some point in 2013, I gambled a few milliBTC at SatoshiDice. I was a bit puzzled by how to account for these, but ultimately decided to treat them roughly the same as RL gambling. Any wins would be totaled up, cost of gambling (the value of the bets) deducted, and any profits declared as income. As it turned out, I didn't win one single bet, so the issue was moot for me.  As the gambling total was a loss, I ignored it for tax purposes.  (Just like you generally can't deduct fiat gambling losses from your non-gambling income, I doubt you could deduct bitcoin gambling losses from bitcoin non-gambling income. An interesting question would be whether you could deduct your bitcoin gambling losses from fiat gambling wins.)

Another oddity I had to deal with was group buys and investments.  For example, I bought a few shares in a miner that was hosted by the group buy organizer. Periodically, I would receive my share of the coins that the miner earned.  So, what was the right way to account for this? Do I treat it identically to a hardware miner purchase, and the income I got as mined coins? Or do I treat it more like an annuity? Is it also a gamble, like the SatoshiDice games? Or is it more akin to a stock or mutual fund purchase that pays dividends? In the end, I settled on treating it the same as a hardware miner purchase. I figured that I effectively own a part of the miner, and the coins I receive are not substantially different (for tax purposes) from coins I'd mined myself.

The last puzzler is one that will hit me in 2014. I (perhaps foolishly) bought and traded some mining power on, and that very quickly turned into a painful loss. How will I account for the coins "mined" by Can I deduct the trading losses from my income? Luckily, I don't have to decide these questions now, as they are for next year's taxes, but I'm willing to hear some discussion on the topic of how to account for cloud mining and btc investment losses!

-- Tax on Income --

So, now that I had the info sorted out, I had to figure out my taxes.  There are two parts for this: income tax for mined coins, and capital gains for spent coins. As of now, I'm not aware of any tool that calculates taxes on mining directly. So for the mining part, I took a straightforward approach: I treated each mined coin as income at that day's BTC-to-USD rate (this is as per the IRS instructions), and counted that as general income.

However, you can't mine bitcoins with just air! Mining gear costs money, and as I understand IRS rules, you can deduct the cost of mining expenses up to the value of the mining income generated, if you're itemizing your deductions.  In my case, I have to itemize anyway, so this is perfect for me. (Side note: if you treat your bitcoin mining as a bona fide business, then things get complicated and you should talk to your accountant - but you can probably deduct the cost of mining expenses even if it's more than your mining income.)  When I purchased mining hardware with bitcoins, I again calculated the USD value of each transaction using that day's exchange rate.

I didn't deduct any hardware I used for general purposes because the IRS rules on how much you can deduct in such cases are arcane at best -- so for example, even though I bought an AMD video card over an nVidia one for my desktop PC just because I could mine a little with it, I didn't even attempt to figure out what portion of its cost is deductible.  I did deduct the cost of the dedicated mining hardware I'd purchased and the hubs, power supplies, etc. that are used exclusively to support mining.  Again, the rules get very complex for gear with an expected usable life of over one year, but in general, mining gear is considered obsolete after a year. So, I didn't have to worry about depreciating the cost of the hardware over multiple years.

It's also legit to deduct the cost of electricity and cooling required to run the mining hardware, but in my case, electricity is cheap. The value of my time in figuring out the deductible cost would actually be more than the deduction itself! So to keep my life simple, I treated that as zero.

So, all that said, it turns out that I paid way more for mining equipment than I earned by actually mining ... big surprise there, right? The upshot is that my hobby income was canceled out by my hobby expenses.

-- Capital Gains --

Next, I headed over to to look at my capital gains.  There are three sets of information I needed.  First, I needed my old source-of-coins history - I only had mined coins (not purchased) before 2013, but even if I had bought coins, I needed the date, amount, and valuation of the coins at time of acquisition.  Second, I needed my 2013 coin acquisitions.  This consists of any transaction that consisted of my coin total increasing, so it includes mined coins, purchased coins, and received coins (from any other source).  Last, I needed my taxable 2013 coin spends.

I gathered my old mining history (pre-2013), arranged it into the requisite format (arranged as follows: "Date,Source,Symbol,Volume,Price,Fee,Currency,Total"), saved it as a comma-delimited file, and uploaded it into their Opening Position section using the file import tool.

Next, I pulled together my 2013 acquisitions and spends into a new sheet, and arranged them as follows: "Date,Source,Action,Symbol,Volume,Price,Fee,Currency".  Any coin spending transactions were listed as a SELL, any coin acquisitions were a BUY.  If I traded the coins for actual cash, I used that as the value; otherwise, I used the day's coin price as the rate to figure out the value. I included the mined coins as a coin BUY at that day's rate.  This allows me to value them properly for capital gains purposes.  Again, I saved this as a comma delimited file and uploaded it into the Trades tab.

Finally, I let the site do the calculations by clicking on the Calculate Gains tab.  Just like magic, all the capital tax info was there! The default method of calculating taxes is FIFO, which makes sense for most cases. However, judging by how I used my bitcoins, it was almost always a case of "buy coins so I could spend them right away to get X item" -- that sounds a lot more like LIFO. In addition, LIFO also resulted in lower overall taxes, as there was a closer match to the value of the coins bought to the coins sold. One of the other methods actually resulted in somewhat lower taxes, but over the long term, I think LIFO is the closest to how I actually use coins.

On the final tab, there's even an option to export the capital gains info in a number of formats, including a TXF file that I could import directly into Turbotax (which alone made it worth the premium subscription cost), as well as coins-remaining info that will become the basis of next year's source-of-coins history.

-- Importing into Turbotax --

So, the hard work of calculating is done.  My next step was to figure out how to get these number properly loaded into Turbotax!  Turns out it's a lot easier than I thought.  (Sorry, I don't have Turbotax open in front of me, so the screen labels are approximate.)

Under the income section, near the bottom, there's a section for Miscellaneous Income; one of the screens in that section lets you enter Hobby Income and Hobby Expenses.  That's where I loaded my mining income and my cost of mining hardware, respectively.

After that, under the Stocks section, I added a new "account", then chose the option to import a TXF file.  I pointed it at the file generated by, followed the prompts, and that was that.

I figure it's still an easier chore than explaining bitcoin to an accountant ... but nevertheless, I do plan to review all this with an accountant at some point before I file.

-- Wrapping Up --

A few observations that helped me preserve my sanity as I worked through this process.  First, not every transaction has to be accounted for! For example, I had numerous transactions where I was shuffling money between wallets or addresses I controlled.  These were neither buys nor sells, so they can be ignored. Similarly, transactions where I gave coins away for no appreciable benefit (e.g., tips to strangers or gambling losses) likewise don't impact my taxes.  That said, random tips *received* from strangers do count as income.  Transaction fees paid to send coins somewhere are also not relevant for tax purposes (although, if you pay a substantial transaction fee on a coin spend transaction, I suppose you could legitimately deduct the fee from the value of the item you're buying, lowering your capital gains).

On the whole, the process was stressful, just because I was pretty much on my own. Once I'd figured out my strategy, though, it was fairly simple to actually run the numbers and come up with the rates.

I hope you found this entertaining, but I want to stress again what I said at the start -- I'm neither a lawyer nor an accountant, and this is NOT tax advice! What works for me may very well not work for you; or worse, my ideas above could be just plain wrong! So by all means, feel free to use this info as a starting point for discussion with your accountant or for your own research, but please don't rely on it for your tax decisions.
2  Bitcoin / Mining support / Need "reverse pool" software - automated distribution of bitcoin payouts on: July 08, 2013, 05:02:00 PM
Heya, folks.

I've tried doing some searching, but my search-fu is weak today, for I have turned up nothing.

I'm looking for software that can be configured to monitor a Bitcoin receiving address, and when any BTC are sent to that address, it automatically divides that amount up according to preset rules and forwards it on to other addresses.  Does anyone know of existing software that does this?

Here's the scenario I'm running through my head.  I'm seeing lots of new mining hardware come out that has the potential to create a lot of bitcoins -- hardware in the hundreds of Gh/s, even Th/s if you get multiples.  I'm considering doing a small group investment opportunity for friends and family, not a public deal.  We'd all pitch in to buy some of the mining hardware, then share in the revenues.  What I'm looking for is software to automate and manage this process.

Here's my first pass at writing the requirements for this idea.  I don't necessarily expect existing software to do all of this, but something pretty close would be awesome.

  • Receive bitcoins at one or more receiving addresses. 
  • When funds are received at a monitored address, apply the associated ruleset(s).
  • A ruleset is a set of instructions for distributing the received BTC. Ruleset actions can include one or more of the following:
    • Hold funds until a threshold is reached.
    • Hold funds for a set amount of time after it is received.
    • Hold funds until a set amount of confirmations are received.
    • Hold funds for a relative date (e.g., first Monday of the month, or last day of each month).
    • Hold funds for an absolute date (e.g, specifically on August 13).
    • Distribute a fixed amount of funds to one or more target addresses.  Each target address can be configured with its fixed amount.
    • Distribute a percentage of funds to one or more target addresses.  Each target address can be configured with its own percentage.
    • Send an email message to one or more fixed email addresses.
    • Send an email message to an email address associated with a target bitcoin address.
    • Stop processing instructions in this ruleset, but continue with the next ruleset (if any).
    • Stop processing instructions in all rulesets for this address. (Stop processing this ruleset, and skip any rulesets that have not yet run.)
  • Each address can have zero or more rulesets associated with it.  An address with no rulesets just holds coins, like a normal bitcoin address.
  • Each ruleset can apply to zero or more receiving addresses.  A ruleset can be created at any time and just be stored in the system until the administrator associates it with an address.
  • The order in which rulesets are applied to a particular address must be configurable. If multiple rulesets are associated with an address, all are applied sequentially, in the order specified.
  • Ruleset actions are applied sequentially within a ruleset, in the order specified.
  • If a ruleset contains a percent-based distribution instruction, it applies to the entire balance held at that receiving address at the time the instruction is applied.
  • Addresses must have human-readable and editable labels, so the user can tell what each address is for.
  • Rulesets must have human-readable and editable labels, so the user can describe what it does.
  • The program must have a user-friendly interface, either a GUI or Web-based front end.

So, here's how this might play out.  I collect funds from friends and family and buy some hardware. We agree that the proceeds will be distributed proportionally to each person's investment. I set up the hardware to mine, either solo or with a particular pool.  Either way, payouts are received at a particular address. When a payout is received, it is held until both a threshold is reached and the first of the month comes around.  At that point, a fixed amount is deducted to cover overhead and sent to me, and the remainder is distributed to the target addresses of the friends and family, as per the agreed proportions, along with a notice email.  If there aren't enough funds to distribute, send an email to the recipients and let them know. Funds not distributed (including leftover amounts due to rounding) are held until the next batch of bitcoins is received.

The reason I call this "reverse pool" software is that traditional pools are designed to combine multiple miners, with payouts back to the individual miners. What I need is a single miner, with payouts to many people who are not miners.  Come to think of it, a sufficiently flexible pool management program might be able to handle this scenario.

Does anyone know if software like this already exists?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!