Legal Musings From My Cryptocurrency Coding Adventure.
Yep, the title says it all.
Recently, I spent three days in a self-isolation period coding a cryptocurrency. Why? Well, because I wanted to understand cryptocurrencies and blockchain technology better. Also, I kinda just felt like it.
Now, the code is really bad. My cryptocurrency wouldn’t survive in the harsh crypto market.
But I thought to do this post because, at some point in the coding journey, I got infatuated by the technology. It was surprisingly easy to implement, very elegant, and all in all, it just worked. I was quite close to being sucked into it. Then, I remembered my legal training—if something seems perfect in isolation, then it’s probably not in reality.
So I took a step back and thought about the news surrounding crypto, as well as some of the legal discussions I’ve had around it. Now, with my fresh perspective of how cryptocurrencies work from a programmer’s perspective, I thought to leave some reflections.
These reflections can be lumped into three categories:
The legal status of blockchains and cryptocurrencies;
The (generally strict) regulation of cryptocurrencies, and the policies behind that;
Some newer developments: Stablecoins and NFTs, among others.
It’s a little different from what I usually write about, but I hope it enriches your understanding in some way.
(If you’d like to see the actual code, feel free to play with my project folder here!)
First, terminology. There’s a few things to clear.
I’ve done a more technical, ground-up explainer of the intuition of cryptocurrencies separately (if you’d like, you can check it out here). But for the purposes of this post, I’ll just be clearing some of the key terms up.
And yes, there will be cartoons.
What’s a ‘blockchain’, and is it different from a ‘cryptocurrency’?
‘Blockchains’ and ‘cryptocurrencies’ are different but related things.
A ‘blockchain’ is a genius-level idea: it involves taking chunks of data (‘blocks’) and tying them together (or, it ‘chains’ them) in a way that makes it really hard to tamper with the data. When someone messes with the data in a blockchain, the entire make-up of the chain changes, making it really obvious that something has happened.
What’s a ‘cryptocurrency’, then? It’s a specific application of blockchain technology. It takes the blockchain idea and uses it as a form of money (that is, a currency).
Okay, so why do we say that blockchains are ‘distributed ledgers’?
Big words, but they’re actually pretty meaningful. I’ll take them one by one.
‘Distributed’ (or, more technically, ‘decentralised’) refers to the internet. I’m cutting corners, but that’s basically it. The internet isn’t some central room with loads of devices—it’s the result of all our computers and devices getting connected to each other, in an inter-connected network (an ‘inter-net’). When content goes on the internet, and we access it, the content gets ‘distributed’ to our devices.
A ‘ledger’ here refers to a record of transactions. This video (by the amazing 3Blue1Brown!) explains it way better than I ever could. I’ll explain this a bit more (and with cartoons, yay!) in the brief overview of how cryptocurrencies work below.
So a ‘distributed ledger’ refers to a record of transactions that is available on the internet. More specifically, it’s available to all the ‘users’ of the system; think bank account holders or the friends you split money with.
Okay… do I get a brief overview of how the things work?
Well, you weren’t the one who asked for it, but I’ll give you a quick overview with some cartoons anyway.
We begin with the ‘distributed ledger’ idea. Imagine the three of us again: you, me, and our friend. When we go out and get meals, we take turns to pay, and we promise to pay our share back to whoever paid. Each of us records how much we’ve paid and how much we’ve received in our own ledger.
After a few more meals, you suspect that I haven’t been paying. So we bring our ledgers together and compare them.
My ledger shows that I’ve paid, but you and our friend’s ledger shows that I have not. Because my version of the ledger only accounts for 33% of the various ledgers, and you and our friend’s accounts for 67%, my version is rejected. That’s called the ‘consensus mechanism’: whichever version of the ledger is shared by half of the users is taken to be the genuine one. Everything else is probably fake or tampered.
Now, imagine this on a massive scale, where the ‘distributed ledger’ is the record of crypto transactions and the ‘friends’ are all the crypto-holders. You can probably see how it works—this ‘distributed’ system makes it really hard for some random person to tamper with their copy of the ledger. If they want to, they must somehow seize control of more than 50% of the ledgers across the internet (there’s a cool name for this—they call it a ‘51% attack’).
Not to forget that, if anyone tampers with their ledger, the blockchain system changes the entire flavour of that ledger. It becomes stinkingly obvious.
Essentially, that’s the intuition of the ‘distributed ledger’. Blockchain technology makes any ledger-tampering extremely obvious. And any tampered ledger will stand out even more amidst the millions of users with their own copies of the ledger.
Of course, there’s some other mechanisms that make it even harder for a rogue crypto-holder to make ‘51% attacks’, namely the proof-of-work or proof-of-stake mechanisms. They’re very tech-y, and not absolutely necessary to understand. I’ll leave them out for now.
I was almost sucked into the technology. But in my defence…
From my experience in tinkering with a cryptocurrency, I came to appreciate how smart they were. Blockchain technology is surprisingly easy to implement, yet it is surprisingly secure. The ‘distributed ledger’ system does deliver on its promise of being a decentralized currency. Coupled with the proof-of-work mechanism, I genuinely believe that cryptocurrencies are impossible to tamper with.
In short, cryptocurrencies are extremely legit… when they are viewed in isolation.
But at this point, my legal training begged me to take a step back and look at cryptocurrencies in the real world. I recalled some of the musings that were going around. And now that I had a brush with getting sucked into the system, I had some things to reflect about.
First, some musings on legal technicalities:
Legally, what is a blockchain even?
This is the only easy-ish question to answer.
The ‘blockchain’ concept is exactly that: a really smart concept, but just a concept. There’s an interesting question regarding whether it could have been patented. But anyway, it was not, so anyone’s free to use the idea and deploy it however they like.
But usually, we’re not referring to the blockchain concept. We’re referring to ‘a blockchain’. That is, a specific implementation of blockchain technology. It’s like how ‘air conditioners’ are implementations of air conditioning technology.
In that case, the legal status of ‘a blockchain’ depends on where it’s implemented. If it’s implemented in a ‘smart contract’, it’s a contract. If it’s implemented in software, the software might be protected by copyright. So on and so forth.
It follows that the rules concerning blockchains would depend on the ways in which blockchains are implemented. The idea of ‘blockchain-specific rules’ is pretty wild, because the blockchain concept is extremely general. I think it’s pretty hard to dispute that point.
But cryptocurrencies are a pretty special implementation of blockchain technology. And with all the cryptocurrencies floating around our markets, I think it’s pretty important to seriously consider the question of their legal status.
Okay, so what is a cryptocurrency in the eyes of the law?
Singapore’s second-highest court said it was property, and Singapore’s highest court just rolled with it. But I think there’s a bit more to be explored. I’ve drawn a lot of these musings from a webinar conducted by the National University of Singapore, from an excellent presentation by Professor David Fox.
The big problem about cryptocurrency is that it’s just data. There are real problems with saying that data is property, because data doesn’t have the vibe of ‘property’. This sounds silly, but stay with me here.
The key idea of property (and even this is disputed, by the way) is that it can be controlled by people, usually in a way that excludes other people from its use. For example, if I own land, I can exclude you from stepping on my land. The same idea extends to ‘intangible’ forms of property, such as copyright—if I make a creative thing, I can probably exclude you from copying my creative thing.
But data is just… data. I’m not referring to data structures, or specific arrangements of data—that might be protected by intellectual property laws. Data, in general, refers to any information about the world: the weather today, my best friends, or the reason why you’re viewing this post. It’ll be quite difficult to say anyone ‘controls’ this data, or that you can ‘exclude’ others from using your data. Even if it’s data about you—known as ‘personal data’ or ‘personal information’. It’s actually really hard to justify protecting data as property.
So what in the world is a cryptocurrency? The short of it is, as Professor Fox makes a very preliminary (but brilliant) attempt at defining, ‘manifestations of data, of a composite nature, where the most significant power is the power to transact’.
I quite like his definition. My experience with programming a cryptocurrency aligns quite nicely to those three characteristics: I am just messing with data, but this data means something more than what it looks like (that is, it is a ‘composite thing’), and my messing with data certainly grants my imaginary users the power to transact.
I haven’t really thought about the challenges which could be made to Professor Fox’s definition. But I suppose that’ll be a debate for the property and technology legal scholars. Personally, if I was forced to give a view, I’d say I’m quite convinced that crypto is property.
Now, some musings on crypto regulation and the policy behind it…
Technical nitty-gritties aside, how are cryptocurrencies dealt with by the law?
It depends on whose law we’re looking at. El Salvador loves Bitcoin so much that it became legal tender. On the other side of the spectrum, China really doesn’t like crypto-mining (it’s outright banned), but it’s okay with NFTs, and it’s rolling out its own digital currency soon. Singapore’s an interesting example that’s kind-of in the middle, and our monetary authority has produced a pretty robust set of guidelines for the question.
But the general vibe I’m getting is that the world is quite hesitant about crypto. I think the main reason for that is that the world is still run by governments, and governments have no control over a ‘distributed ledger’. After all, that’s the draw of crypto in the first place: you don’t have to put your trust in any central authority.
To be clear, I’m not saying this in an anti-establishment way. I think there’s at least three real reasons for governments to be concerned about their lack of control over crypto. I’ll call them the anonymity problem, the environmental problem, and the economic problem.
The anonymity problem: Crypto is too good at being cryptic.
One big problem for governments is that crypto transactions are, for the most part, anonymous (due to the private and public key system, which I didn’t find it necessary to explain). While this makes crypto more secure than it already was, it also allows shady people from criminal organisations to do all their business in crypto without anyone asking questions.
The same anonymity also makes it really hard to undo fraudulent transactions—if you paid a scammer in crypto, and the scammer moves your payment across a bunch of accounts, it becomes basically impossible to get your money back. In this situation, you’d probably have to ask the authorities to find the scammer and open up his private record. If you could find the scammer at all.
The environmental problem: All that electricity getting wasted…
Crypto mining, under the prevailing proof-of-work mechanism, is such a stickler. In essence, crypto mining involves getting computers to brute-force-guess numbers until they hit a sweet spot—a process that expends loads of electricity and produces loads of heat.
In theory, it really does make the cryptocurrency secured on computational effort (I didn’t explain why in this post, because it’s very technical—you’ll have to take me on good faith on that). Personally, I was especially impressed by how easy it was to implement the proof-of-work mechanism and instantly block the cryptocurrency from ‘51% attacks’.
But there really is a lot of computational effort that goes into it. My computer was already working really hard and heating up over my significantly simpler proof-of-work mechanism, and I can only imagine how this looks like on a large scale. I mean, I won’t even need to imagine it, because a quick web search will reveal some shocking numbers.
It’s especially sad to me, because all this electricity is spent on the lamest thing ever: guessing numbers. Literally. The computer just soaks up electricity and heats up the earth to guess numbers. When we factor in electricity shortages around some parts of the world, and how climate change has disproportionate effects on some areas, it’s really quite sad to see electricity being spent on this.
That said, some cryptocurrencies are trying to make a shift towards less wasteful mechanisms, such as proof-of-stake. Ethereum seems to be the biggest major mover on this point. Hopefully the charge continues.
The economic problem: Fine, but what if I want to be selfish …?
For those who don’t care about criminal conduct or the environment, the economics of crypto might raise some red flags. As the news makes clear, crypto is dangerously volatile. So there’s usually pretty strict laws about advertising crypto products, and it seems like most stock exchanges are very wary about listing crypto-related products.
Personally, the biggest worry I have about crypto is that I just made one. Again, it’s not a good one. But it does check most of the boxes for being a cryptocurrency.
This crypto project took me slightly over 10 hours to explore the boundaries and reach a product—and I’m a relatively inexperienced programmer. The best part is, I was assisted by YouTube tutorials the entire way, and the only costs I incurred were my electricity bills. Compared to many other digital businesses (Amazon needs a network of warehouses, Google needs a huge index of search results, not to forget that all the big digital companies need huge server rooms), creating a cryptocurrency is a piece of cake.
In economic terms, the barriers to entry into the crypto market are very low. That probably explains why there are so many cryptocurrencies in the market. In theory, this means that they’re in competition with each other, and it’ll probably lead to market corrections until the equilibrium price is reached (which might explain the volatility).
In reality, the problems are not as pronounced because the major coins already have a pretty large user base (which, mind the technical language, tends to cause network effects that lock the users into their respective ecosystems). But as Elon Musk’s tweets show, this can change overnight. So I’m not sure. Seems like it’s way too easy for the market to get shaken.
Finally, on the more recent developments in cryptocurrencies:
What about the cryptocurrencies which are tied to real currencies? ‘Stablecoins’, as they’re called?
I haven’t done enough research into ‘stablecoins’, because until today, I haven’t really bothered about the crypto markets. I mean, the technical parts are interesting, but the markets are just… so risky.
In theory, it seems like tying cryptocurrencies to real currencies goes against the ‘distributed ledger’ philosophy. After all, the idea of that is to trust in the system, rather than a central authority. Now you’re just bringing the central authority back.
That said, it can also be seen as a classic diversified investment. If one part fails, you still have the other part. If too many people buy this, and it crashes, then all parts fail at the same time. The usual theories.
Ultimately, it seems like something for the experts to dabble with. I wouldn’t dare to try myself.
How about Central Bank Digital Currencies, or CBDCs?
They’re not really the same as crypto, though most of the upcoming CBDCs (namely, China’s) are looking to rely on the security of blockchain technologies. This raises macro-economic and socio-political considerations which my little programmer’s perspective misses entirely, so I don’t think I’m prepared to engage with the issues surrounding CBDCs.
Do NFTs change this?
Again, I’m not involved in the NFT (‘non-fungible token’) market. So on one hand, I’m objective, and on the other, I have no idea what I’m talking about.
But if you still want to read my view, here’s the theory: NFTs get their value because they’re either tied to other valuable things or blockchain transactions (or sometimes, both). The first type is easy, because you’re just mostly paying for the real thing. The second type is premised on the idea that blockchains are very, very secure—so it’ll be very hard to challenge someone’s ownership of an NFT.
To begin with, ‘owning’ digital content isn’t anything ground-breaking. Most of the digital content associated with NFTs gets protected by copyright, and copyright law has allowed you to own creative things since the 19th Century. So, sure, anyone can copy and save the Nyan Cat GIF that I just bought for half a million bucks. But I own it.
That said, NFTs go beyond traditional copyright ownership in one way: they serve as great proof of ownership. Traditionally, to prove ownership, you might have to show all the documents concerning who transferred the rights to who. Linking the transaction to the blockchain, which is really hard to mess with and deadly secure, is a great way to tell the whole world that you own that NFT.
I think that’s a pretty significant improvement. I just wonder if it’s worth half a million bucks. There were a few times in history where people went crazy over something, and the price shot up, before the realized they were crazy and the prices plummeted. I’m not sure if this is one of those times.
My gut feel is still that NFTs are risky. They build upon the already-volatile nature of cryptocurrencies, and there’s some risk that they’re just a bubble waiting to explode.
Conclusion: So… do I like crypto or not?
I must say again: I am absolutely enamoured by the technology behind blockchain and crypto. It’s really quite an experience to see it just work. And it really does just work.
But on a broader level, there are tough issues surrounding crypto that laws around the world are trying to address. Namely, they can hide criminal behaviour, they harm the environment for no good reason, and they’re notoriously volatile investments. ‘Stablecoins’ and NFTs seem like fun innovations in response to those issues, but I’m not sure if they’re just bubbles waiting to burst themselves.
Personally, I like to err on the side of caution, so you can bet I’ll be staying out of this space in the near future. But it’s certainly been quite a fun experience getting my hands dirty with the technology.
In summary: there’s good reasons for the hype. I just seriously wonder if it’s a bit too much.
Hope this has been meaningful to you as well! Happy to hear your thoughts, if you have any—feel free to leave a comment or drop me a DM on any of my social media accounts.