What Was My Mt.Gox Balance Again?

As you might remember, Mt.Gox, one of the first Bitcoin trading platforms, was hacked in February 2014 (or before that), and subsequently closed down, with the users’ funds lost. A long process started where users could apply to reclaim their funds, but nothing came of it so far. Now on June 22, Mt.Gox sent out another email to its former users, and actually I’m not entirely sure what it says, but it seems like a new system will be set up for filing claims.

But I was wondering, because I forgot – how much BTC did I have on Mt.Gox anyway? How can I find out my former Mt.Gox balance?

So, it turns out there was a leak of Mt.Gox data in 2014, and you can download the whole thing from archive.org here. The zip file contains a dump of all account balances and a BTC transfer log with all transactions since 2011. The transfer log and account balance dump do not contain user’s names or email addresses – they only contain user and transaction IDs.

Bitcoin transfer log from Mt.Gox leak

I found a transaction reference in one of my old emails from Mt.Gox. With this transaction reference, I was able to look up my wallet ID and so I found my balance in the other file.

Account balances from Mt.Gox leak

The balances in the dump are shown in Satoshis, i.e. you have to multiply by 0.00000001 in order to get the amount in BTC. Note that the topmost entry in the dump had a balance of 44547.67562508 BTC, which is worth about 285 million Euro or 331 million US Dollars at the time of writing.

I’m not going to reveal my own balance here, I’ll just say that, while it is not a negligible amount at today’s prices, other people were much more unlucky than me 🙂

Update: there is this post on reddit which sums up what’s going on with Mt.Gox claims refiling right now.

Update 2: the new claims system is online, read about it in my new post: Mt.Gox Claim Filing System Online

(Fine) Dining in Tokyo

Just recently I returned from my first trip to Tokyo, Japan. Having heard about Japanese culture, part of which often seems quirky to the average central European, I was curious of what we would encounter.

And I was not disappointed at all. We saw grown up men in business suits cheering for Japanese Idol groups – dancing, waving with banners and glow sticks. We saw gigantic pagodas, Buddhist temples, Shinto shrines and neat gardens. And we saw ASIMOPachinko parlors and Maid Cafés.

But what I liked most was the food. We had Michelin-starred Ramen at Tsuta, a small noodle restaurant hidden between residential buildings – a waiting queue of people was tucked away in an entrance around the corner. We ate Sushi at Uobei Shibuya Dogenzaka, a fully automated Sushi restaurant – well, the food is still prepared by human cooks, but you order on a touchscreen and the food is delivered within minutes on two small rail systems which pass by your table in front of you.

One of the highlights was eating Sushi at Yasuda – a small restaurant and bit on the expensive end (we spent about 16’000 ¥ per person, that’s roughly 130 €). The restaurant can seat about 10 people at the counter surrounding the chef, Naomichi Yasuda. There, we ordered “Omakase” which basically means the chef is going to select the food for you. The chef would then prepare each individual piece of Sushi, while engaging in conversation with the guests. It was entertaining and the Sushi was great.

On the last evening of our stay, we visited Omoide Yokocho, also known as Piss Alley, a narrow alley in Nishi-Shinjuku crammed with bars and small restaurants. A very unique spot to enjoy a whole evening of eating and drinking.

At the open-air rooftop of one of the bars, we met two Lufthansa airplane crews – apparently this specific bar is a favorite hangout for them when they spend a night or two in Tokyo between flights. We chatted with 747 pilots and stewardesses.

 

Atlantropa

At the beginning of the 20th century, people inspired by the big progress made by mankind through industrialization and science weren’t shy to think big. Like, really big.

German architect Herman Sörgel came up with the idea to build a hydroelectric dam across the Strait of Gibraltar and some additional dams, thereby lowering the surface of the whole Mediterranean Sea by 200 meters. The dam would provide electric power, and the lowering of the surface would open up formerly submerged lands for settlement and agriculture.

The utopian goal was to bring Europe together as a whole, and unite Europe with Africa into Atlantropa, or Eurafrica, thereby staying competetive with the Americas and emerging Pan-Asia.

Atlantropa – artist’s impression by Wikipedia user Ittiz, license CC BY 3.0

The perils of this venture though were barely assessable. The dam would be  prone to tsunamis. It would have had a vast impact on the environment. The change in pressure on the plates may have caused shifts, volcanic eruptions and earthquakes. The surface of the other oceans might have raised for one meter. The impact on the economy of the surrounding countries due to change of borders and new trade routes was likely to be severe.

Digital Dementia

I just came across this article on Psychology Today on “Digital Dementia”, a term to describe overuse of digital technology which results in a breakdown of cognitive abilities. Apparently this is really a thing, not only perceived, but observed in studies.

For instance, the article hints that action video gaming has an impact on the volume of different parts of the brain, which in turn are linked to an increased risk of various mental disorders, such as depression and schizophrenia.

Moving to Thailand

Well, I didn’t add any posts for a couple months. That was because I didn’t feel right and had to change something. So, I quit my job and moved to Thailand. Sounds easy, right? Well, I put together what I did – and I will update this as I go.

Find out where you want to go

Buddhist monks

First you need to know where you want to go. Thailand has many different places. Meaning different in style and culture. I recommend you travel to Thailand a couple times and actually go beyond the “touristy” places before you make a move. You need to know that Thailand is not all beaches, hookers and Indian guys selling suits. It is a proud country with rich culture looking back at thousand years of history. For me, the decision was easy, because I have friends in Chiang Mai. And everything is easier with friends.

Learn Thai

You absolutely should learn at least some basic Thai language. As a tourist, you will get by with English – but be aware that most people who have no higher education and are not involved with tourism usually do not speak English at any useful level. I use thaipod101.com, also there are many YouTube videos with basic language training. I learned many words but I’m still far from actually speaking Thai. However, it helps to understand the concept of the language and to know most of the basic words when you’re communicating with people who do not speak English well.

Get rid of all your shit

Because come on, you know that you don’t need it. I wanted to start with a clean slate. I sold, gave away or trashed almost everything I owned. This is a straight forward process. For every item you own, you decide: keep – sell – give away or trash. I ended up with two suitcases which I took to Thailand, and a couple things which I stored at or lend to family members. When I left, all I owned fit into two suitcases… one check-in and one cabin luggage.

Visa

There are many approaches to staying in Thailand long term. I will go with Single Entry visas for now. These are valid for 60 days and can be extended once by 30 days at the immigration office (I will write an update when I do this for the first time). After that time, you have to leave the country and get a new visa, which I will do. You need to apply for a visa at your local Thai consulate or embassy. Acceptance criteria vary by country, but generally you will need to prove that you have some (relatively small) amount of money and that you have a job. I will not go into more detail here as the details apparently change a lot and depend on your country of residence or the local consulate. Most important is that you definitely do not want to overstay as you might be restricted from entering the country again. Also be aware that you are not allowed to work in Thailand on a tourist visa.

Renting a house or apartment

My house in Chiang Mai

If you google for rental apartments or houses in Thailand, you will mostly find offers targeted at wealthy foreigners, and end up paying two times as much as a Thai would. You’re better off if you know Thai people who can help you find something. Fortunately my friends in Chiang Mai had me covered and found a really nice little house for me. I signed a standard lease agreement at the terrific price of 10’000 THB per month.

Residence Certificate and TM30 Form

If you want to open a bank account or register a vehicle to your name, you will need proof of residence in Thailand. For this purpose there is the so-called residence certificate, which can be applied for at the office of the immigration police (this may vary depending on you location).

But first you will need a TM30 form – this is proof that your landlord (or your hotel?) registered you at the immigration office. Your landlord (or hotel) is responsible to register your stay within 24 hours at the office of the immigration police, and they will get this form in return. I got a copy of my TM30 form from my landlord.

Now you can apply for the residence certificate with the following documents:

  • Photocopy of your lease agreement
  • Photocopy of the TM30 form signed by your landlord
  • Photocopies of the following passport pages, all pages signed:
    • Main/picture page
    • Visa page
    • TM6 (Departure card)
  • Two passport photos (I’ve seen claims it must be with blue background, but they accepted my white background ones)
  • Your original passport

At the immigration office, they will let you fill in the registration form. Along with your personal data, you will need to know your address and phone number. Be aware that most immigration offices have different counters for different purposes – when I went to the immigration office in Chiang Mai, there was a huge waiting area with queue numbers for the TM30 form counter (which I got from my landlord) and, besides others, a specific counter for the residence certificate which had no queue at all, I was served immediately.

In Chiang Mai, you can apply for the residence certificate at Promenada Mall, at the office of the immigration police on the second floor of building A, every day between 9am and 11am. Be aware that the mall only opens at 11am so you will find closed main doors – however there is a small door at ground level between the two buildings. Immediately behind the door is the ground level immigration office which is not what you are looking for (this one is for visa-related stuff), you go up the escalators to the top floor and then to the right.

After I handed in all my documents, I got a small piece of paper with my pickup date – which was three weeks later. The office is open for certificate pickup only in the afternoon, from 2pm. I walked in 1:50 and I was second in queue. They handed me my certificate.

Buying and registering a vehicle

I bought a pre-owned motorbike, a Suzuki V-Strom 650cc. The previous owner of the bike had paid taxes and insurance for the bike until May (two months from now), so I didn’t have to care about that for now. Also, the number plate was already on the bike and as it was registered in Chiang Mai, I won’t need to get a new one. With the bike I received a green booklet where the official owners of the bike are noted, also an insurance form (proof of insurance) and an empty form for change of ownership. With these documents, a copy of my Passport (including all visa pages), and my residence certificate, I went to the Chiang Mai Provincial Land Transportation Office. After a short inspection of my motorcycle, I was sent back to the counter, where I had to pay about 1350 Baht – this is calculated based on the buying price of the bike – and got a piece of paper with a number and was asked to come back Monday next week to pick up my booklet.

Internet Connection

Of course I want a proper broadband connection in my house. My house apparently had existing cable TV lines and a phone line which I don’t use, but I wanted fiber. So I went to a mall and checked out some of the ISP stores there. I found that 3bb offers 100/30 Mbps fiber connections for 749 Baht per month (that’s the lowest speed available at this time). Unfortunately, I absolutely had to buy their combined Wifi router and modem for another 2000 Baht (I’d prefer a simple media converter providing me with an Ethernet port). Also they made a copy of my passport, and I had to pay six months in advance, because as a foreigner I might otherwise flee the country and never pay, I guess. They asked me to pick a Wifi SSID and password which they would preconfigure on the router, and agreed to run a fiber to my house in less than a week.

And, lo and behold, one week later they called me in the afternoon to announce that a technician would show up in thirty minutes. And they did. I showed them where I’d want the router to be installed, they agreed and got to work – by pulling a cable from the next crossroads up to my house. They came with a pickup and bamboo ladders. Starting from the next crossroads, they climbed up every utility pole and fixed the fiber there, until they reached my house after about 20 minutes.

Once there, they climbed under my roof to get from the cable entry point to my office (which is on the other side of the house) and drilled a hole through the ceiling; then they installed the router on the wall. All this work of five people was included in the router price and monthly rate. When done, they asked me to check the Wifi and promised that internet access would work within 30 minutes. Actually it already worked when I checked, and a speed test showed that it was 100/30 as advertised.

Opening a bank account

Right after I got my residence certificate at the immigration office at Promenada mall, I went straight to the Bangkok Bank office across the floor and asked to open a bank account. They asked me for my passport, the residence certificate, and had me fill in a couple forms where I had to put my foreign residence address and some information like source of funds, net worth, monthly income etc.

They took a copy of my passport, and initially, they wanted to keep the original residence certificate – however I’ll need that to register my motorcycle. After I asked, they agreed to keep just a signed copy of the certificate. I received a small savings booklet and a debit card right on the spot, so now I had a Thai bank account.

I hope this was helpful and I wish you a great time. If you have any suggestions or corrections please tell me!

Coinhive Javascript Monero Miner

Today I want to tell you about a neat thing: Coinhive implemented a Monero miner in JavaScript. It allows you to integrate it in your websites and also to create short links and captchas which take a bit of the user’s CPU power to calculate some hashes.

To test this out a little, I created an account on Coinhive and shamelessly installed the Simple Monero Miner WordPress plugin in this blog. I might remove it again though because I don’t want to annoy my visitors too much 🙂

(Update: I’ve disabled the plugin – site visitors have calculated a whopping 9 379 840 hashes, worth 0.00136453 XMR – that’s about $0.12 at the time of writing!)

There are various way to run the miner. For instance, it can simply be run “headless” by calling a JavaScript function like this:

<script src="https://authedmine.com/lib/authedmine.min.js"></script>
<script>
var miner = new CoinHive.Anonymous('YOUR_SITE_KEY');
miner.start();
</script>

Simple as that. The miner can be throttled so it doesn’t hog 100% of the user’s CPU power.

If you want to mine some Monero for me now, you can also follow this link to a dedicated miner page on authedmine.com. Thanks in advance!

But isn’t it too slow?

Looking at how other cryptocurrencies like Bitcoin, Litecoin or Ethereum are mined today, you might wonder how mining on a CPU with JavaScript might be effective at all. Those currencies are mined using GPUs or specially made ASICs.

Monero, however, uses the Cryptonight algorithm. It is very compute heavy and is designed to run well on consumer CPUs. Of course, running this in JavaScript isn’t exactly efficient, but thanks to modern JS engines it reaches about 65% of the speed of a native miner according to Coinhive’s claims.

I hope you found this remotely interesting and wish you a nice day!

How to claim and sell your Bitcoin Cash

On Tuesday August 1st, Bitcoin Cash forked from Bitcoin, and every Bitcoin holder is eager to claim their free BCH. So here is the short and painless way to do it.

In short, what we’re going to do is:

  1. Secure your Bitcoin by transferring it away to a new (paper-) wallet
  2. Sweep your private keys in Electron Cash to a new BCH address
  3. Sell your BCH

Secure your Bitcoin

So, the first thing you want to do is to secure your existing Bitcoin – in case anything goes wrong while handling your private keys, your existing Bitcoin will be safe.

I did this by creating a paper wallet on bitaddress.org as described in my earlier article; then I transferred all my BTC to that wallet. Store it in a safe place.

Obtain your private keys

Next, you need your private keys in order to sweep them on the BCH chain. I run a bitcoind, the way to do this is to unlock your wallet and then dump it:

$  bitcoin-cli walletpassphrase "xxx" 60
$ bitcoin-cli dumpwallet wallet.txt

Note the extra space before the walletpassphrase command; this will tell your bash to not write the command to the command history, thereby keeping your passphrase a secret.

This will dump all your private keys in wallet.txt. You can reduce this to just the keys like this:

$ cut -f1 -d' ' <wallet.txt >keys.txt

Now you got your keys.

Sweep your private keys

Next, install Electron Cash. You are going to enter your private keys there, so be sure you got the right version.. apparently there were scams, that’s your own responsibility.

On startup, it prompts you to create a new wallet. Save the passphrases in a secure location. Once Electron Cash is up and running, go to Wallet -> Private Keys -> Sweep and paste all your private keys from your keys.txt file there.

Potentially you have many more keys. Press “sweep”. If you have many keys, this will now take some time, maybe one or two minutes, while the GUI appears to do nothing. Then, a transaction window pops up. Here, you click “broadcast” in order to broadcast your transaction. This will transfer all your BCH to your new Electron Cash wallet.

Now you have to wait until the transaction is confirmed.

Sell your BCH

You can now transfer and sell your BCH on any exchange that supports it. I use shapeshift.io.

Hope that was helpful.

How to Send and Check Balance of ERC20 Tokens Using geth

So, you got some standard ERC20 token from wherever, be it a popular one like Golem (GNT) or a more obscure one like the infamous yet entirely unknown Kekel, and you want to check your balance. How do you do that? Mist offers a simple UI for that, but when you are a real crack, you are of course using only geth console. Here’s what you need.

Checking Token Balance – Basic Way

You’re going to need three things:

  1. The token contract address
  2. Your account address
  3. The token contract’s ABI

You need to figure out the first two yourself. You can use a generic ABI to check token balance. We instantiate the contract ABI as follows:

> var tokenContract = eth.contract([{
     "type":"function",
     "name":"balanceOf",
     "constant":true,
     "payable":false,
     "inputs":[{"name":"","type":"address"}],
     "outputs":[{"name":"","type":"uint256","value":"0"}]
}]);

Now we have the contract’s interface. Next we use it to check our balance. The following example will show my account’s Golem balance:

> var golemContractAddress = "0xa74476443119A942dE498590Fe1f2454d7D4aC0d";
> var account = "0x27f8a692b3c8279fce29f2629b8d87ac717300f8";
> tokenContract.at(golemContractAddress).balanceOf(account);
678633655750000000000

This outputs the token balance in plain tokens, i.e. without showing a decimal point.



 

Human Standard Token ABI

For a more thorough solution, I found the Human Standard Token ABI by Dan Finley on github. It is a node.js module which provides an API to standard tokens. I changed it a little so I can run it from the geth console. Install token.js in a local folder on the machine where you run geth, such as /home/user/geth/token.js, and run the geth console with

geth console --preload /home/user/geth/token.js

Now you have the full functionality of a token contracts in the variable “tokenContract”:

> var golemContractAddress = "0xa74476443119A942dE498590Fe1f2454d7D4aC0d";
> var account = "0x27f8a692b3c8279fce29f2629b8d87ac717300f8";
> var golem = tokenContract.at(golemContractAddress);
> golem.symbol();
"GNT"
> golem.name();
"Golem Network Token"
> golem.balanceOf(account);
678633655750000000000
> golem.decimals()
18

The ABI also supports sending tokens as follows:

var value = '100' // Base 10, accounts for decimals.
golem.transfer(toAddress, value, { from: addr }, function (err, txHash) {
  if (err) console.error(err)

  if (txHash) {
    console.log('Transaction sent')
    console.dir(txHash)
  }
})

Please refer to the readme on github.

I hope this was helpful and wish you a nice day 🙂



Paper Wallets and Cold Storage for Bitcoin and Ethereum

An Ethereum Paper Wallet

You made a fortune trading crypto currencies, but don’t like the general idea of actual money being stored on the hard disk of your worm-infested PC? Then cold storage and paper wallets are for you.

In this post, I am going to explain what cold storage and paper wallets are, and how you can create one, the really safe way.

Offline Accounts

Due to the nature of how blockchain-based currencies such as Bitcoin, Litecoin and Ethereum work, it is possible to generate a wallet or an account and send money to it, without the account ever having seen the network – you can generate and store it entirely offline, so no one could possibly steal it over the network.

When coins are being sent to an address, the blockchain merely stores the information “address X owns N coins”. Only in order to spend those coins again, one needs the private key associated with the address; the private key is used to sign a transaction which moves coins from the address to another one.

So all we need to do is use a software to generate our address and private key pairs.

Generating Wallets

We are going to use the tools provided by MyEtherWallet, BitAddress.org and LiteAddress.org for the respective currencies. You can just go there and do the generating on those websites – all generation happens client side, in the browser, and not on their servers.

However, we want to be really safe and sure that our keys never touch the net, so we go one step further. We are going to create our wallets on an air-gapped computer. An air-gapped computer is a computer which is not connected to the network.

Prerequisites

You need mainly two things – a computer which is not connected to the internet, and a means of safely and securely storing your generated keys. If you don’t have an extra computer around (which you totally should have, you can never have enough), you can use the one you are using right now, you just have to go offline for a while.

I will set up the key generation software on an extra RaspberryPi 3 I have lying around, and store my new wallet on a USB drive, and print it as a paper wallet. The USB drive will also be used to transfer the required software to the air-gapped computer.

Download the Software

For Ethereum, go to https://github.com/kvhnuke/etherwallet/releases/latest and download the distribution zip file (dist-vx.x.x.zip).

For Bitcoin, go to https://github.com/pointbiz/bitaddress.org/releases/latest and download the latest release source code archive (zip or tar.gz). (It is the same software for Bitcoin and Litecoin).

Store the archives you downloaded on a USB stick if you are going to transfer it to your air-gapped computer.

Working Offline

Setup an offline computer. All you need is a working browser, such as Chrome or Firefox. Transfer the software from the USB stick to your computer and unpack it.

For Ethereum, go to the unpacked archive and open index.html in your browser (by double-clicking it). You now have the same environment as on the websites mentioned before. Create your wallet as instructed.

Safe the encrypted JSON “UTC” key file. Then print your paper wallet – either generate a PDF or print it directly (obviously that requires a printer).

For Bitcoin, open bitcoinaddress.org.html in your browser. You need to generate some randomness by moving your mouse around. When done (counters go to 100%) you now have multiple options – generate a single wallet, a number of fancy looking paper walled, or just bulk wallets as a text file. Download the result and store or print it as needed.

You can now start to send money to your wallets.

Checking your wallet’s balance

You can check your wallet balance online. For Ethereum, you can enter your public address at etherscan.io. For Bitcoin, enter it at blockchain.info. No need to have your wallet online, as all the information needed is on the chain.

Secure Storage

You now have PDFs or pieces of paper with your *unencrypted* private key. No password is needed to spend money from your wallet with this key, so you have to keep it safe. And be sure to make a backup and store it in multiple locations (what happens if your house burns down?).

I hope you found this post helpful. If so, you can throw me a couple Satoshis via my donation address. Thank you 🙂