Despite challenges associated with each solution and business model, all FinTech companies face the same basic problem – trust. People confide with these organizations to multiply, keep safe or simply loan money. Their money. That’s why an image is so valuable. There’s a way to build trust and ensure a high level of technical proficiency; all at the same time. It’s called blockchain.
Before we answer how blockchain works…
… we must start from the beginning and tell what it is. Interestingly enough, the idea behind blockchain takes us back to ancient Sumeria, where the history of the medium of exchange started. In the city of Uruk (now Irak), 3000 B.C., Sumerians invented cuneiform. A form of writing which allowed to take notes about financial and barter transactions. That was the beginning of the economy as we know it.
Over the years, forms of notes changed, sometimes even radically. Technology and its advancements (papyrus, paper, computer data, FinTech) evolved but the basic need behind having proof of a transaction stayed the same. In (fairly) modern times, we established banks. The oldest bank in the world, still operating, by the way, is Italian Banca Monte dei Paschi di Siena, established in 1472.
What does that have to do with blockchain? Well, banks had to figure out the way to write down things. What was previously known as tablets (what goes around, comes around, right?) were suddenly named ledgers. A ledger was a notebook full of data. Who came and deposited what. When was it. Who borrowed what. Who took a loan. Who exchanged currency, etc.
That was a modern form of registry, which is actively used to this day. It operated on trust. Without registering events, clients would may though banks steal their money. Without widespread trust, the economy could not exist. Today is not a ledger but a database. The rule stays the same – what comes in, or goes out, is meticulously written down and stored for future reference.
The idea behind banking evolved to the point where there was a system of public institutions that controlled these establishments. Bank A, B, or C could not operate without the supervision of a central bank, as well as a national prosecutor’s office, etc. Centralization and control did the trick – peoples’ trust became solid. A ledger, no matter the form it takes, is a way to control financial flows by the person who is trusted by all sides of the transaction. And that’s the key for everything else.
How blockchain works? It’s about an idea
There is no blockchain without a Bitcoin; probably the most famous cryptocurrency in the world. It all started in 2008 when Satoshi Nakamoto a mysterious persona, has published an article called Bitcoin: A Peer-to-Peer Electronic Cash System. In it, Nakamoto postulated an invention of Bitcoin – a digital currency that could have even a greater level of trust than traditional banks. Nobody knows who Satoshi Nakamoto really is. Some claim it’s an alias for a real person. Some think it’s a pseudonym for a group of people. No matter what really happened in 2008, it’s clear that the idea for a decentralized cryptocurrency changed the world.
The ideas for this new digital currency were simple. Bitcoin should be:
- Public and global. Anybody who wants to use it could use it, no matter what country are you in, what currency you have, and what local law governs the monetary system.
- Decentralized. No institution, public or private, should control its birth, usage, and future.
- Trustworthy and secure. Despite not having an institutional overseer or any kind of individual jurisdiction over it, transactions should be transparent, verifiable, and technologically safe. Anything bought or sold really happens – the currency works.
It’s an interesting aspect of creating a currency. How to establish a set of rules that are friendly yet powerful? How to convince people of its value? How to tell them that this is how it’s going to work from now on? Gold did exactly that, and for centuries, I might add. It was the first widely accepted item that was exchangeable to anything. The problem is that gold was heavy, extremely precious, and impractical. Nobody would want to cross town with even one gold bar in a pocket. It doesn’t make sense.
To be successful, a cryptocurrency needs to be backed up. By few factors:
- People. Will they accept new currency? Will they trust FinTech applications that are used to generate, store and exchange it?
- Economy. Everyone that is involved in mining (we will come to that), exchanging and doing anything with Bitcoin (or any other cryptocurrency) has to benefit at some point.
- Technology. Without technological innovations all those revolutionary ideas behind cryptocurrencies would not be possible. Open banking thrives on a solid software background. It all boils down to one thing – can we create a ledger in which we will store all transactions?
The nature of a ledger
This is where things get really interesting. How does blockchain work depend on a ledger and all aspects that are connected to its existence and performance? Features of this ledger are derivative in nature; they are all offspring of the idea for Bitcoin.
Bitcoin’s ledger needs to be:
- Public. Anyone who has internet access should be able to use it.
- Decentralized. No organization should control transactions. This is the most difficult part to achieve in the whole process, we will touch on this later.
- Trusted. All transactions are public but nobody on the planet can just have access to a ledger and change the data.
What is blockchain?
To talk about how does blockchain work technically, we have to highlight the structure of the data it uses to store information. As the name implies, the data is stored in blocks. To simplify things, we can say that every block consists of two elements: data and header. This header is written down as a string of characters. It can look like this (of course, it’s only an example):
This is exactly 64 characters. It’s very important. For now, let’s just say that every string, or hash, as it’s called, must have 64 digits. Always. To understand what’s it for, let’s talk about a .jpg file, a transaction for buying items in 100 containers from China, and a song. Totally different data, right? How to process information about all of them?
With something called Secure Hash Algorithm or SHA-256. It allows identifying any amounts of data in a form understood by machines and limited to exactly 64 digits, every time. What is hidden behind the hash (input data) can’t be guessed. The probability of making it happen is around 10^77. For those incapable of understanding the amount (that includes me): it’s a lot and can’t be achieved in one human lifetime or even thousands.
One can try guessing blocks with a supercomputer but it’s highly unlikely this person would succeed. Due to a very high number of members in a network, it’s almost impossible to guess two or a few blocks in a row. Every person on a planet that is a miner (more on that later) competes with everyone else. The real threat to the system would emerge if someone could control more than 50% of the computing power needed to create new blocks. Unfortunately, there is such a case, more on that later as well.
Once you add the second (and every other) block to the first one, the header of each block is calculated based on the header of the previous block. The thing is, that if something is changed or added to the first block, the entire hash structure, is changed. No matter how small is the change in the first block, the entire structure of headers will be different.
That leads us to the conclusion, that if there were copied blockchains and we had to compare them, we could use their headers to verify the integration of the data. That will be important in the next material when we will discuss blockchain in the context of FinTech.
Is this enough to make blockchain a good ledger for financial transactions? Unfortunately, no. Nothing really happens in terms of direct benefits. On the other hand, if we would disperse these blocks into many nodes in the web. If we could put the blockchain upon these nodes and have one node change some part of the blockchain, other nodes would say “no”. They would compare their data with this “rebel” node and come up with a process that overwrites this request. It’s called a “consensus protocol” and this is a true value.
Because everything is dispersed, no one can control the data and virtually anything that has to do with the blockchain itself. If someone would want to change anything, he or she would have to take over the entire network of nodes, which is very hard due to its scale and number of entities controlling different nodes. This makes it a good ledger. It’s public (accessible to everyone who has internet access), decentralized (due to its nature) and trustworthy (because it’s constant and easily verifiable).
There are, of course, different cryptocurrencies in the world. Besides Bitcoin, we have Ethereum, Tether, Litecoin, Monero, Terra, Neo, Helium, and many, many more. Although there are differences in the structure and algorithms driving their blockchains, the idea behind them stays the same. We simply talk about Bitcoin, because it’s the biggest crypto in the world (in terms of capitalization), plus it started it all.
How blockchain works for transactions?
To make things really, really short: there is something called a Bitcoin address. We can compare it to a bank account number. The whole transaction looks like this. One address has a number of Bitcoins. From one address (input) to another (output) we simply transfer the funds. To be exact: funds are dispersed into two outputs. The first one consists transferred amount, the second is information on how much it’s left on the input. In other words, your account.
A Bitcoin address identifies your cryptocurrency wallet. You can generate it yourself, on this website, for example. It’s the only element that identifies you as a member of the bitcoin network. There are two parts to the address. One is public, the other one is secret. The public part serves as a “face” of your address. With that, you get Bitcoins from others. The secret part identifies you as the owner of the “account”, and you should guard it with your life.
Where do the blocks come from?
When people authorize their transactions with their private (secret) keys, they are put in a pool of opened transactions. They wait to be put into the blockchain. People the world refer to as “miners” (cryptocurrency miners or in some similar way) are the ones who keep the blockchain going. At the same time, they want to add new blocks to the blockchain. Mining is simply a way to add a new block as the first person in the line of miners who want to do the same, at the same time.
Adding a new block is not easy, though. The miner’s job is to generate a header with a hash in a way that will have an exact number of zeroes at the beginning. This is Bitcoin’s way; other cryptocurrencies can work in a different manner. Wait – we told you earlier that the hash can’t be changed, right? It’s true.
Because of that, miners are trying to guess what random numbers can be added to the blocks that will generate a value proper enough to be “hashed” in a certain way. A way that will generate the correct number of zeroes at the beginning of the block. This is a very, very hard thing to do. The operation itself is trivial but you need serious computing power to achieve this goal. That’s why miners are buying powerful chips and graphic cards.
When your equipment adds a block to the pool, you are rewarded with exactly 6.25 BTC (Bitcoins) which are worth a small fortune – in any currency in the world.
Not so trivial trivia
Since previous paragraphs did the heavy lifting, it’s a good time to talk about fun stuff.
- Bitcoin itself runs since 2008.
- Currently, we have 674 000 blocks, they weigh around 320 GB.
- There are 18.650.631 BTC on the market (and counting)
- Current market capitalization is $1.032.888,920,635 (over a trillion dollars)
- In recent months, there were 324.575 transactions a day.
Here were the fun part stops. Bitcoin and other cryptocurrencies are very interesting alternatives for traditional forms of money. As we have said earlier, the system is dispersed… or is it? As a manner of fact, China has around 65% of all Bitcoin mining pools out there. There are special fields where Bitcoin is mined and transferred. Not only in China, though. Mongolia has 8% of the entire mining market. In comparison, the USA has 7,2%. Why? Mongolia has cheap energy.
There are ways to mitigate the energy challenge. The model in which computers are creating blocks is called Proof-of-Work (PoW). There are also models like Proof-of-Stake (PoS) that do not require huge amounts of electricity. Because of that, they are scalable and available to more users.
Proof-of-Work is a type of consensus algorithm. Most major blockchain solutions use it as their way to prevent double-spends. A double-spend occurs when the same funds are spent more than once. The term is widely used when it comes to digital money. Corruption of a file, a stealing incident… it can happen, that’s why this mechanism was invented. This blockchain technology makes sure that nobody can’t spend money they don’t have rights to.
Proof-of-Stake is another beast. It randomly chooses a node to act as the validator of the block next to it. The process is made based on a number of factors. Randomization, node’s wealth, and staking age being the most popular ones. Because of this process, nodes are considered “forged”, not mined. They are being built by making sure everything is correct with each block, at any time.
There are also different threats and hazards to the system. For example, you can steal bitcoins. All you need to know is both parts of the key. It’s not easy but it’s possible. So far, the worth of stolen Bitcoins has exceeded $50B. Few dozen are also lost because someone forgot their private keys.
Another problem comes from anonymity. We don’t know who is on the other side of the transaction. That speculation and opportunity open flood gates for illegal trade. Plus, if someone stole Bitcoins, it’s very hard to find him, her, or they.
Transactions are anonymous but are they private? Not necessarily. All transactions are public. Because of that, we can’t know who is on the other side of it but we know that the currency changes the owner. Plus, the fact of the transaction can’t be removed from the registry, which spikes concerns in line with the General Data Protection Regulation and other, similar laws.
There is also a “trivial” problem of practicality. You can mine and sell Bitcoins and other blockchain-based cryptocurrencies but they are not easily exchanged for goods and services. Public knowledge about currencies that heavily run on math is not great, and adoption is not wide. Sure, there are shops here and there that accept Bitcoins for coffee and such but not that many. Some companies pay their employees in cryptocurrencies, some people demand that. But that’s not a fully-fledged system yet.
Benefits of blockchain
OK, but are there some perks of this technology? Surely there should be some; people all over the world who invest in cryptocurrencies all the time.
It’s true, there are some important benefits:
- Nobody can hold your assets hostage or limit your access to them. You are the sole owner and guardian of the wealth you have.
- The cost of transferring value between accounts is very low and involves micropayments. Small sums that you can barely feel. Especially when so many cryptocurrencies are worth so much.
- The transfer can be completed in minutes and verified and secured in hours. It’s safe and very convenient.
- Because every transaction is public, anyone at any given moment can verify it.
- Blockchain can be used to create decentralized applications that can serve the audience, move wealth in a secure way, or do both these things at the same time.
The last point is interesting. Many people think blockchain is the remedy for all their problems. Or want to use it for their application, because they consider it fancy and secure. In most cases, these reasons alone are not enough to use this technology.
Does your business need blockchain?
It depends. How does Bitcoin blockchain work is different than Ethereum. How does blockchain as service work is different than a standard model. How does blockchain work technically is not that important. What really matters is the nature of your business and implications that go with it.
Matt Taylor, a Senior Solutions Architect for Amazon Web Services (AWS) says, that the usage of blockchain makes sense in three situations:
- When your application requires a database that is shared among many subjects that signs into it
- When these subjects don’t trust each other and are in a natural state of clashing interests
- When these subjects need the right to write down something in a shared database that runs without oversight from the central institution that is trusted by all
In a nutshell – no, you don’t need a blockchain for your business.
At Code & Pepper, we support our clients by using cloud technologies from AWS. They also have products for blockchain. One is called Amazon Quantum Ledger Database, the other – Amazon Managed Blockchain. In most cases, your business will not need them at all. However, if you need that the project you are in can be better when running on blockchain technology, then contact us and ask: how blockchain works? We are happy to help: with team augmentation or end-to-end development.