July 12, 2017

Comments on the Mark Karpelès trial

July 11 was the first day of proceedings for the anticipated trial of Mark Karpelès, CEO of the bankrupt MtGox bitcoin exchange. Karpelès was charged with creation and manipulation of private electronic records, as well as embezzlement of customer funds, or embezzlement of company funds, or breach of trust, in that order.

I was present in the courtroom for the entire first day, and I expect there will be a lot of interpretations and extrapolations based on the limited early information that will no doubt circulate online and in the media, so I will attempt to flesh out and explain what is actually going on through some brief commentary.

The proceedings

While the trial is technically open to the public, the actual courtroom was very small with a very limited number of seats, for which court clerks arranged a lottery. While this is common practice for any court cases deemed likely to attract a lot of interest, it means most people who made the trip to the courthouse never got to attend; over 100 people showed up (largely journalists) to try their luck for a mere 21 seats up for grabs, for a small 39 seat court room. Yours truly had no luck in the lottery, but the good people from local exchange bitFlyer who had also showed up to attend graciously gave up some of their won seats so both me and Kolin Burges could get in. Thank you!

Japanese court cases are usually done via recurring court hearings, often scheduled weeks or months apart, between which the court is in recess and each side is considering and preparing their next round of arguments (which are all prepared in advance and merely read out loud in court). The number of hearings required to reach a ruling varies depending on the complexity of the case. In the case of Karpelès' trial, the initial hearing has unusually been split into two days in this same week, suggesting there is a large volume of material to go through.

Today's first day of proceedings included a presentation of the charges and opening arguments from both the prosecution and the defense, as well as a statement from Mark Karpelès (in Japanese), followed by formalities and an initial reading of the prosecution's evidence. The latter amounted to hours of painstakingly reciting mundane details of every occasion where Karpelès is accused of wrongdoing. The proceedings are held in Japanese, with French interpretation service for Karpelès.

What is Karpelès being charged with?

There are two semi-distinct parts to the prosecution's case against Karpelès:
  1. Embezzlement of funds, either by sending money from MtGox to Karpelès' other companies or his private account, or making payments for private purposes.
  2. Manipulating the balance of Karpelès' personal MtGox account for the purposes of buying bitcoins, which were then wiped from the account balance.
The former is a charge of some contention; originally stated as embezzlement of customer funds, it also lists preliminary charges of embezzlement of company funds and misappropriation / breach of trust (a weaker, more vague charge), to be used as fallbacks if the stronger charges fail.

If the latter talk about manipulation of account balances sounds familiar, that's because it should; this is the Willy bot activity, or to be more precise, it's specifically "Markus", the manual activity before Willy was automated in September 2013. We'll get back to this in a bit.

The prosecution did not at this time make any specific argument to establish motive or purpose; they merely listed specific instances of transactions and manipulations, possibly implying them to be illegal prima facie. I assume the defense will question this, so we may see more specific claims later.

What is Karpelès not being charged with?

This is a trial of Mark Karpelès and what he did, in fact the prosecution seems to have gone to some length to avoid any other part of the case that might involve other actors. As far as anyone can tell, none of the following has been mentioned or will be part of the trial:
  • Stolen bitcoins: by ignoring other avenues of theft and losses, the prosecution seems to be suggesting that "Markus" is responsible for hundreds of thousands of missing bitcoins and is implied to be a primary cause for the bankruptcy. (Note: such a suggestion is nonsense.)
  • Willy itself: the proper automated Willy bot that was actually noticed by people as it was operating in late 2013 is not included; only earlier cases where Karpelès used his personal account to perform the same manipulations manually are.
  • The full history of manipulation: the older cases of manipulation appear to be excluded as well, possibly to give a stronger impression that the manipulation was more focused and purposeful than it really was.
Side note: if you're thinking it's a farce for the trial over MtGox, a case three years in the making, to focus exclusively on Karpelès and not provide any satisfactory explanation for the collapse that ended up with half a billion dollars missing, you're not alone.

What is Karpelès arguing?

Karpelès does not deny operating Willy/Markus, referring to it by its actual internal name, the "obligation exchange", and claims it was established as a means of managing losses from early thefts, being operated to try to save the company from insolvency rather than for any personal enrichment purposes. I believe this is the first public admission that Willy was run by MtGox, something which many people have long suspected.

Karpelès' statement at the start of the trial mentions, among other things, that:
"I am innocent of all charges. I absolutely did not manipulate any data for personal gain, or fraudulently use any customer funds."
"What is being called 'fraudulent creation of private electronic records' was in reality a business function called 'obligation exchange', by which MtGox's BTC and USD liabilities towards its customers could be exchanged at market value for the purposes of keeping MtGox's debt portfolio reasonably balanced."
"As I inherited MtGox [from Jed McCaleb], I became aware of problems that made it necessary to manage its debt portfolio, lest it fall into bankruptcy and cause significant damage to customers. Regarding these problems, Jed McCaleb directed me to implement this 'obligation exchange', and as a result, part of operating MtGox came to include dutifully running the 'obligation exchange' to protect customers. Any investigation will readily show that it was not for my or MtGox's own benefit."
"As for embezzlement or misappropriation, the money in question which was transferred from bank accounts to either my personal account or the account of associated companies was not secret, and was accounted for as 'loans' by our certified accountant. Given that in 2013, MtGox had over 2.5 billion JPY of revenue on the fiat side only, and at least 3.5 billion JPY if you include BTC revenue, I did not see expenses in this range as a problem and had our accountant properly record them as loans. These were not customer funds."
"Regarding this prosecution, I swear to God that I am innocent. Nevertheless, I would like to say something to everyone. [...] Through the collapse of MtGox, I have caused enormous trouble for the many customers, and as the representative I would like to offer my apologies from the bottom of my heart."
"It is regrettable that this trial is concerning matters entirely unrelated to the cause of the MtGox collapse. The entire world is observing, and this trial is not about revealing the cause of the bankruptcy. At the same time, through the efforts of a handful of talented experts around the world, the principal cause for MtGox's collapse is already being made clear as a bitcoin theft by outside hackers. The Bitcoin blockchain carries a large amount of tracking records, and fraudulent activity can to a degree be identified through analysis with modern techniques. As for me, in this trial which has no relation to the MtGox collapse, I want to prove my innocence."
"I am deeply aware of my unavoidable responsibility for the collapse, and for the sake of all the harmed customers, I am determined to continue to work together with various law enforcement agencies and investigation groups to further the investigation into clarifying the cause of the collapse and attempting to recover any bitcoins."
In short, Karpelès is not denying that the events in question took place, but is arguing that none of it was illegal or done with malicious intent, thereby questioning the prosecution's narrative and execution rather than any factual claims.

Who is telling the truth?

While no one outside the proceedings has any particular insights into the matters of payments and possible embezzlement, we do know quite a lot about Willy (I'll keep using "Willy" as shorthand for all related obligation exchange activity), and it may be useful to line up and compare each side's claims to what's already known.

In addition to published reports, there has been additional research done into Willy, including what happened in the last month, when Willy was running in reverse. As it happens, Willy's trades were left conveniently identifiable in MtGox's trade logs, making it possible to reconstruct its entire history with enough access to data. I mention this because as mentioned before, the prosecution is not including all Willy activity, but merely select portions of it, in which case it may be prudent to also have a look at what they're leaving out.

First, a quick refresher course on how Willy generally worked (as outlined by the prosecution):
  1. Inflate the USD balance of an account — in the case of Markus, this was Karpelès' personal "MagicalTux" account, whereas later with the automated Willy it was a randomly created account ID.
  2. Issue buy orders on the exchange to purchase BTC with the fake funds — later this was done in an automated way to spread out the buy orders over time, possibly to avoid drawing attention and/or minimize market impact.
  3. Wipe the BTC balance of the account afterwards — the prosecution confirmed this part too, which is important since without this step it would be just plainly stealing funds.
The net result of such a procedure would indeed be an "exchange of obligations"; creating fake currency and trading it on the exchange increased MtGox's total liabilities for that currency, whereas "buying" BTC and wiping out the balance effectively took those coins out of circulation, lowering MtGox's BTC liabilities. In the end, one debt was traded for another, at market value.

While we only have data for the trades and not the balance manipulations themselves, we can reasonably approximate the times and amounts of those manipulations by adding up how much was actually traded, and when. The prosecution has likely done the same analysis to arrive at the specific instances of data manipulation they're charging Karpelès with. Plotting out the entire history of Willy and comparing with some of the dates listed in the prosecution paints the following picture:

From this we can tell a couple of noteworthy things:
  • Regardless of whatever intentions Karpelès had for running Willy, the end result was a net loss for MtGox, ending up with greater liabilities than when he started, possibly due to unfavorable price developments. The exact final balances are:
    • BTC: -22,748.34115
    • USD: -51,602,050.63
    • EUR: +404.27
    • JPY: +973,581.57
    • PLN: +5,608.36
    • RUB: -93,371.90
    • Total USD value: -64,930,083.44 (as of February 28, 2014)
  • While Willy can't explain the missing bitcoins (a subject we will revisit some day), it does provide a plausible explanation at least in part for why there was so much fiat currency missing at the time of the collapse.
  • At its peak, Willy had acquired and taken out of circulation over 400,000 BTC, while at its low point it was 250,000 BTC in debt, a staggeringly wide range. Note however that while this happens to add up to a ~650,000 BTC difference, it has nothing to do with the missing bitcoins, as Willy's BTC balance largely canceled itself out in the end. (The missing bitcoins were real, and have been identified leaving MtGox on the blockchain.)
  • As Karpelès has stated MtGox had about 3.5 billion JPY (around $30M USD) in revenue in 2013, we can compare this to the peak of Willy, at which point MtGox was juggling over $200M in additional USD liabilities. Even if the actual MtGox bitcoins hadn't already been stolen at this point (MtGox was basically empty by mid-2013), Karpelès was gambling with extraordinarily high stakes, and indeed MtGox suffered notable losses from the price bubble bursting, with Willy being so heavily "invested" in BTC.
  • Open questions:
    • Why did Willy keep buying so many bitcoins? Karpelès has claimed he was unaware of the main theft until the actual collapse happened, so in 2013 there should only have been the initial missing 80,000 BTC from the handover from Jed McCaleb on his mind to worry about. There would have been no need to accumulate that many additional bitcoins, so was he straight up engaging in price speculation, or had he become aware of the full amount of missing bitcoins earlier than stated?
    • Similarly, if the obligation exchange was started in response to those missing 80,000 BTC, why does it start out running in the opposite direction, increasing MtGox's BTC liabilities during 2011 and early 2012? Were there other financial concerns that made it even more pressing to free up USD instead of BTC?
    • Why did Karpelès suddenly slam Willy into reverse in late January 2014? We he already aware of the unavoidable bankruptcy, and were trying to clean up the numbers by shutting down and cancelling out Willy, or was it for the purpose of freeing up as much fiat currency as possible?
  • The prosecution appears to be choosing its evidence quite selectively; why is not the automated Willy included, or other early manipulations in the opposite direction? Taken out of context, this slice of Willy activity makes it look like the manipulations were done consistently in a single direction and had a significant impact to the tune of "hundreds of thousands of BTC". Is that the intent, to cherry-pick the evidence to exaggerate the role Karpelès played in the collapse?
  • The prosecution is possibly being sloppy with the evidence in other ways too; Karpelès' defense lawyers in court today raised an issue regarding the integrity of prosecution evidence #64, saying that the version of this document presented to court had been altered to be less favorable to Karpelès compared to another copy of the same document seen by the defense. The judge suspended this evidence and ordered a review; we'll presumably hear more on this later, whether it was an administrative gaffe or something more sinister.

Next steps

On Thursday, July 13, the second day of the initial court proceedings is scheduled to occur, during which we will presumably hear the initial presentation of evidence from the defense. I'm not sure if I will be able to attend, but regardless I may return to update this post with additional commentary if I hear of any new interesting developments.