Search This Blog

Tuesday, 2 October 2018

My contribution to the Piano Guys' success


Don't listen too closely -- I haven't done any jazz improvisation in nearly 20 years. It kinda shows.

Sunday, 12 August 2018

Cryptocurrencies and the Australian Tax Office's asset tracking rules

While I'm on a roll getting quoted on the taxation and technology, the ATO has issued some guidelines around record keeping for cryptocurrencies which are onerous and unnecessary (and thus failing to comply with the taxpayers' charter).

Essentially, the tax office is asking taxpayers to record the Australian dollar value of any cryptocurrency transactions at the time that they occurred. This seems harmless enough because it is consistent with any other taxable asset.

But it is asking taxpayers to keep records that the tax office already has.

The tax office (perhaps in conjunction with Austrac) will of necessity be keeping copies of all the ledgers or all the major cryptocurrencies. This is not a particularly large dataset -- HPE or Dell could easily sell a single system capable of holding all this data and perform sophisticated analysis over it. If the tax office and/or Austrac weren't at least attempting to keep somewhat on top of the cryptocurrency transactions of criminal elements, then that's a major problem!

So, given that the tax office already has information about every transaction anyway (including when it happened, and the public wallet addresses involved in the transaction), why is it necessary for tax payers to do so as well?

Indeed, the missing piece of information that the tax office would really like is the association between TFNs (or SMSF ids) and public wallet addresses. So why not simply ask for this information? This would help the tax office in its investigations immensely, and creates a ready-made CGT record-keeping system for the taxpayer.

The simple way would be for the ATO to provide a web interface where tax payers could enter their public wallet addresses for each currency that they own together with the relevant TFN. A more sophisticated approach could be done by having the taxpayer complete a transaction on the blockchain to prove the association.

Having obtained this TFN-to-wallet address mapping, the tax office can automatically calculate the CGT applicable for the tax payer. In the same way that taxpayers can take advantage of a pre-filled tax declaration for the PAYG information provided by their employers, so too could all cryptocurrency transactions be handled the same way.

Note that this does not apply very well for Monero, but would be fine for Bitcoin in all its variants, ethereum, litecoin and all the other major currencies.

The advice the tax office is giving is simply archaic and utterly misses the opportunities of taxation paperwork simplification inherent in having a public blockchain.

Currency-to-currency transactions are even more problematic; the tax office can issue guidance here that would be quite straightforward and automatic, but instead relies on taxpayer estimation over matters which are ambiguous without guidance.

For example, how to handle a cryptocurrency fork? Consider the fork that created Bitcoin Cash. On August 1st 2017, suddenly every tax payer who previously had Bitcoin now also had bitcoin cash, and that bitcoin cash had a non-zero value. What cost base should be used for that? $0 because on September 30th Bitcoin Cash was just a concept, and worthless? Or should it be the value of bitcoin cash on its first transaction? Or should it be the value of bitcoin on the last common block? Or the cost base of the bitcoin when it was purchased?

All of these answers have serious accounting challenges, because in some sense they necessarily involve double dipping.

Associated with this is that there are low-profile forks that a taxpayer might only find out about much later: bitcoin gold for example. It's entirely possible that a cryptocurrency owner may discover that years after they have emptied a wallet -- and perhaps even trashed the original paperwork that they used -- that they may have significant quantities of wealth in a previously unknown fork of a wallet. The ethereum fork is almost old enough that this could be relevant soon.

Finally, since there is a real-time bidding system on many exchanges (e.g. bitcoin to ethereum was traditionally done this way) the actual price achieved or paid might be dramatically different to the published prices of that day. A taxpayer might have added a zero to an offer (and still had it accepted), or left one off (and sold very cheaply). This would not be reflected in any official price; but this is the kind of thing that the tax office could infer automatically from a system if TFNs were associated with wallet addresses.

So why isn't the tax office simply asking tax payers to match their wallet addresses with their TFNs and then telling the taxpayers how much to include on their tax returns? It is logically equivalent to having TFN matching with bank accounts and superannuation accounts (all of which already happens). This would be a much simpler system for both the ATO and tax payers.

Sunday, 5 August 2018

Software treated strangely by tax laws, part 1 ...

It's tax time, and small-medium enterprises are frantically evaluating what assets they can write off. Eligible assets include things like cars, vans, kitchens, machinery provided they cost less than $20,000. However, the exclusion of one particular asset from the instant deduction scheme is adding to the tax time blues. In-house software.
As it stands, in-house software is only deductible under the uniform capital allowances (UCA) rules or the simplified depreciation rules for small business entities. This lack of a tax break for SMEs means there is less of an incentive to invest in software and therefore innovate. By deliberately penalising low-tech companies, it is preventing them from delving into high-tech such as artificial intelligence which is set to have a hugely transformative effect on Australia’s economy. If we’re to establish ourselves as world-beaters in innovation then tax reforms are in order.

Thursday, 6 July 2017

Getting your fair share of AWS EC2, VMware, Hyper-V, etc.

One of the problems with virtualised infrastructure -- especially cloud servers -- is that your programs don't always get the CPU time that they need. The CPU time for your application is shared between CPU time given to other virtual machines on the same hardware. This is good for cost savings, but it would be nice to know how badly you are being affected by this.

I had a customer who had some really interesting VMware scheduling problems. They had a large number of multi-cpu virtual machines. VMware can't schedule a 4-cpu virtual machine unless there are 4 physical CPUs free. So even if you only have one tiny job to run on one CPU, VMware can't just schedule that one CPU -- it has to wait until at least 4 are available. (Incidentally, those other 3 CPUs that are scheduled but do nothing count towards co-stop% which is another interesting performance-and-tuning metric.)

As it turns out, almost all their virtual machines had some small tasks going on in the background (e.g. cluster heartbeats), so VMware tried very hard to schedule them all as best as it could, but the result wasn't pretty. How bad was it?

I wrote a little program that slept for a second, woke up, recorded the time, and then went back to sleep again. It kept statistics about how delayed it was. There were some horror stories --  there were virtual machines that received no CPU time for more than 90 seconds on occasions! No wonder their clusters kept crashing -- the cluster heartbeat time was only 30 seconds, so there was no way the cluster could stay up with VMware starving it of CPU time like that.

Anyway, I tidied up that program ("am-i-scheduled") and packaged it for RHEL7; the binary is so simple that it will also run on Ubuntu unchanged. I suspect it will run almost anywhere.

If you run AWS EC2 servers or other cloud-hosted servers, you really want to install this. This is the most convenient way you can find out how much CPU time you aren't getting: if your virtual machine is co-located with another virtual machine that is being used for Bitcoin mining, or password cracking, or a deep learning problem, you might want to terminate and try again. With am-i-scheduled, you can detect this easily, and measure the impact you are experiencing.

Here's the source: https://bitbucket.org/solresol/am-i-scheduled and the binaries (including RPMs) can be downloaded from here: https://bitbucket.org/solresol/am-i-scheduled/downloads/

Tuesday, 16 May 2017

Two happy stories about the Australian legal system

Too often we whinge and whine about problems in the legal system. Let me share two stories where the legal system did what it was supposed to.
The first: a customer of mine wasn’t paying for work that obviously had been done -- a joint marketing program of Google adwords which were visible in the Google analytics console, a class I taught and some other hard-to-deny activities. There were all sorts of excuses and promises to pay by a certain date that would come and then go without anything happening. Months went by.
I’ve run IFOST for just under 20 years and I’ve tried to avoid court at all costs, even when I’ve been in the right and could have done so. It’s better to live at peace, forgive and forget and so on.
I don’t know why I finally flipped and decided that enough was enough. I threatened legal action, and didn’t get a sensible response. So I went to lawlink and created an account. Actually, I had to create three accounts: the first one was in the name “Greg Baker” but my passport, driver’s license and Medicare card all say “Gregory Baker” so I couldn’t validate my identity. The second I choose the wrong category of company, but I got it right the third time. About an hour wasted from some bad UI design on lawlink, but I’ve done it now.
Then I walked through an online form for a statement of claim. It was less than $10,000 so I was able to file in small claims court. It was straightforward enough to do so, but I wish there had been a better UI for calculating what the incurred interest expense was. You have to go to another page to get the annual interest rates for each year, turn that into a monthly interest rate by hand, apply those interest rates (e.g. in a spreadsheet) and then add up it all up. It could have been easier.
The filing fee was just under $200 and I received all the paperwork by email. I then forwarded the most official looking PDF to my contacts and said “you are going to have to answer this case, including paying the filing fees and interest.” I had an apology that afternoon from the most senior management at my client. I posted the statement of claim, signed a stat dec that I had done so. The day that their legal team was served with it, stuff happened and I was paid.
It was such a positive experience. The rule of law was respected, it wasn’t difficult or expensive or time consuming for me to make the case and the matter was resolved far faster than if I’d tried to keep chasing up the debt the way I normally do.
The second story: I was talking to my lawyer about the experience (she wasn’t involved in the case at all, I just thought I would let her know afterwards) and noticed that she’d written a piece about changes to contract law in Australia.
I am not a lawyer but as a small business owner dealing with multinationals all the time, all I can say is: wow. I have stacks of absurd contracts that I’ve had to sign to win business that have exposed me to a lot of risk. I’ve just relied on the good nature of my customers most of the time, and been burned occasionally. Or, sometimes, I’ve just walked away from good productive work that would benefit everyone simply because I couldn’t afford this risk.
But now I have some sort of protection: I can (and will) point out clauses that a court would disallow and leave it up to the customer to decide whether they want to keep the pointless clause in place.
In Australia, where the vast majority of the economy consists of small businesses, there really was no reason that our legal system should have allowed lopsided contracts, ever. This one small change to contract law will have a ripple effect through the Australian economy. I look forward to seeing how this plays out.

So that’s two bits of good news in a week.