Home Crypto How Does Cryptocurrency Work?

How Does Cryptocurrency Work?

0
How Does Cryptocurrency Work?

[ad_1]

You need an explanation of how cryptocurrency works? Simple.

Image by macrovector on Freepik

Don’t be confused by the name: Virtual money is NOT the only use case for cryptocurrency, but using cryptocurrency as virtual money is a popular use case.

What is Currency?

Whenever you want something of value, you trade something (of value) to get it. There are many types of value (monetary, social, sexual, etc) that humans use in order to trade. In the modern day, fiat cash (fake cash) is the most popular form of value used to exchange goods and services. This money is a type of currency (i.e U.S Dollar, Eurodollar).

What is Cryptography?

Cryptography is a practice that uses math to encode and decode messages for a variety of purposes including secure communication and password protection.

The Combination

When you combine cryptographic technology (used for encryption) and currency (used to provide value) the result is cryptocurrency.

Cryptocurrency itself is a concept: In the modern day, cryptocurrencies are implemented via software. As a result, it’s important to understand what software is and how it’s created.

What is Software?

Software represents a virtual set of instructions used to execute operations using hardware. In other words, software (list of tasks) uses hardware (computers, phones, etc) in order to run applications (i.e calculator). As an example, your web browser is a software that runs on your computer (hardware) in order to load web pages (operation). When the web browser is started, it loads websites by — executing a set of instructions such as — creating a Graphical User Interface, sending network requests to other computers, processing that information, and so on and so forth.

What is Object Oriented Programming?

Software developers tend to use programming paradigms to conceptualize their programs in an easy manner. Object Oriented Programming is a programming paradigm which organizes code (sets of instructions) using “objects”. In the context of this article, Object Oriented Programming is important as it highlights how programmers model virtual objects (in software programs) using physical objects (in the real world).

Let’s say that you want to create a virtual representation of a Dog (in my software). In order to do this, you can create a Dog data type and give that type properties that a real-world dog has.

// Data Type
type Dog struct {
// Type Properties
Name string
Breed string
Weight string
Eyes int
Limbs int

}

You can also give this dog actions using functions.

func (d Dog) bark() {
fmt.Println("arf")
}

Why Does It Matter?

While there is no guarantee for a program to use Object Oriented Programming, it’s typical for a program to maintain the name of its physical representation. The usage of words such as “portfolio” within stock market trading applications, “mail” within email programs, and files (paper) within computer file systems (storage) are no exception. Keep this in mind as you learn about the technologies that power cryptocurrencies (such as Bitcoin and Ethereum).

A transaction is an exchange of goods or services between multiple people. When you purchase bread at the store in exchange for money, this is a transaction. In real life, you store information about a transaction on a receipt. On the internet, you store it in a database (base of data).

What is the Blockchain?

Traditionally, you use a relational database to store transactional data — which contains information about your transaction (i.e bread, cost, etc) — using tables (which relate to other tables). A relational database itself is a program — that runs on a computer — in a similar manner to any other program that computers run. For more information about databases, read When to Use a Database as a Spreadsheet.

Storing transactional data in tables is beneficial because it allows you to retrieve that data back in an efficient manner… as long as the computer running the database (program) is available. If the computer — which many refer to as a server — becomes inaccessible or gets hacked, the database may become unavailable or unusable. Of course, this is a major problem.

New to trading? Try crypto trading bots or copy trading on best crypto exchanges

A blockchain decentralizes or spreads out the functionality of a database using multiple computers. Data is stored in a chain of blocks as opposed to tables, which is why it’s called a blockchain. The blockchain is stored on multiple computers (servers), which are connected to each other via network (internet, lan, etc). These computers will communicate over the network in order to ensure the blockchain is valid. If a computer on the network becomes inaccessible or gets hacked, the information you need is still accessible from other computers on the network… unless the entire network goes down.

A cryptocurrency uses a blockchain because being unable to use a currency when a single (centralized) server goes down would be catastrophic. The downside of using a blockchain is that it requires communication among multiple servers, whose latency slows down the speed of each transaction. Furthermore, the use of cryptographic operations (encryption) in order to secure a network can be relatively time-consuming. Such that a decentralized blockchain may be slower than a centralized database by hundreds of nanoseconds (which adds up over millions of transactions).

A typical transaction on a blockchain works like this.

The Transaction

John has a (free) virtual wallet that allows him to store a specific cryptocurrency coin and ONLY that coin. In this case, Bitcoin. John’s wallet has 2 keys: One that the public uses and one (private key) that is used to access his currency. The private key is randomly generated by encrypting a 24-word password known as a seed phrase. If John loses or deletes his wallet from his device(s), he can recover it using the wallet’s seed phrase.

John wants to send a birthday gift to Sarah; who also owns a Bitcoin wallet. Sarah gives John the public key to her Bitcoin wallet so that John can send Bitcoin to her (using his wallet). John carefully copies and pastes Sarah’s public key into a function that initiates an action to send Bitcoin to Sarah’s wallet: This action is only performed if John’s private key is valid.

In the case of Bitcoin, time is needed for other computers in the network to verify this transaction using a proof of work verification algorithm. When the transaction is verified, it will be stored (publicly) on the blockchain (of every computer). Once the transaction is verified, Sarah will receive the Bitcoin John sent; and instantly be able to use it. It doesn’t matter if John and Sarah are across the world from each other: There’s not a single entity that can stop them from exchanging the currency (in a technical manner).

It should be noted that various cryptocurrencies work in different ways. You can learn how a specific cryptocurrency coin works by reading its White Paper, which states the problem the cryptocurrency coin aims to solve along with its technical details. See Bitcoin’s White Paper for an example.

A cryptocurrency exchange is an abstraction of the basic features wallets have. As a reminder, a cryptocurrency wallet holds one type of cryptocurrency coin, but you want to exchange many different types. Well, if you create a wallet for each cryptocurrency coin, you will be able to exchange every cryptocurrency coin. When everyone does this, everyone is able to exchange every cryptocurrency. So a cryptocurrency exchange manages your wallets to make transactions among multiple cryptocurrencies easier.

A cryptocurrency exchange is implemented using software. This means that you cannot describe how a cryptocurrency exchange works without the context of that exchange. With that being said, there are typically two types of cryptocurrency exchanges: Centralized and Decentralized.

What is a Centralized Cryptocurrency Exchange?

A centralized cryptocurrency exchange (CEX) functions in a similar manner to the NYSE stock market. A single entity (and its servers) manage every transaction (and every wallet). Thus, the exchange itself can maintain its own order book to decide how a “representation of cryptocurrency” is distributed. In other words, there is no guarantee that the funds you own in centralized exchanges are real.

As a reminder, centralized cryptocurrency exchanges typically manage funds within their own wallets. This means that they hold the private keys necessary to access your “funds”. Just as banks are able to lose your fiat cash, centralized cryptocurrency exchanges are able to lose your fiat cryptocurrency coins: It’s rare, but it has happened. Hence the term, “Not your keys, not your coins.”

What is a Decentralized Cryptocurrency Exchange?

A decentralized cryptocurrency exchange (DEX) functions as a supervisor in an exchange between two people (peers); without being a third-party in a transaction. Multiple entities run computers (servers) with automated programs which manage transactions between real cryptocurrency wallets. In other words, you use a DEX with your own wallet to perform real transactions which exchange your funds.

It’s typical for a decentralized cryptocurrency exchange to be governed by its own cryptocurrency: This exchange token is used in order to control the platform and provide rewards to the people supporting the DEX’s operations. As an exchange token is a cryptocurrency, the benefits to holding one will be outlined in its White Paper.

Kucoin is a well-known and trusted hybrid cryptocurrency exchange. Get a 10% discount on all trading fees using my referral code “rJTF3XV”: https://www.kucoin.com/r/rf/rJTF3XV

When you need to exchange two different types of cryptocurrencies, you must perform a swap. A swap directly exchanges one cryptocurrency coin with the equivalent value of another coin through the use of a smart contract. This “smart contract” is simply another set of instructions (software) that is automatically executed upon confirmation of the swap.

Smart contracts are smart because — unlike real life contracts — they are automatically executed.

Swaps are useful for a variety of use cases. Especially when you need to transfer a token with a high transaction fee between exchanges. If the cost of a transaction — called a network fee — is high for a given cryptocurrency coin (i.e Bitcoin), consider swapping it to a feeless cryptocurrency coin (i.e Nano) on the old exchange. Once the cryptocurrency has been sent from the old exchange to the new exchange, swap back.

How Does a Swap Work?

A swap is an abstraction over multiple transactions between wallets. While the details of a swapping algorithm may differ depending on the exchange, the algorithm typically comes down to the following steps (where cryptocurrencies A and B are swapped between person 1 and 2).

  1. Send cryptocurrency A from wallet A1 to wallet A2.
  2. Send cryptocurrency B from wallet B2 to wallet B1.
  3. If either transaction fails (due to an error), revert the other transaction.

How Do I Swap Fiat Cash?

Fiat cash is a currency managed in a centralized system (typically by a government). While fiat cash can be exchanged for cryptocurrency coins in any exchange that supports it, you must keep in mind the legal implications of doing so. If a cryptocurrency coin isn’t recognized as a form of currency by your government, then the exchange of fiat cash for cryptocurrency coins will be recognized as a digital asset transaction (which carries tax implications). For this reason, many DEX’s avoid cash-to-crypto transactions while CEX’s opt to adhere to Know Your Customer (KYC) laws.

As cryptocurrency evolves, so do the mechanisms behind it. Layers refer to the level a cryptocurrency coin operates on. A layer one cryptocurrency token (L1) is a standalone token that operates on its own blockchain (i.e Bitcoin, Ethereum). A cryptocurrency that contributes or operates under a layer one token’s existing blockchain is known as a layer two cryptocurrency token (L2).

Ethereum is an example of a layer one token which provides important building blocks for creators of cryptocurrency by being able to store code (smart contracts) in its layer two tokens. These layer two tokens benefit from Ethereum’s ecosystem and security protocols. In addition, a person is able to store any and multiple types of ERC-20 layer two tokens within a single Ethereum wallet.

A rollup is another example of a layer two token. These types of tokens aim to improve certain aspects of the layer one token. Say that the network fees for Bitcoin become too expensive or time-consuming: You can use a layer two token for faster and less expensive transactions. This can be implemented by storing multiple transactions in a faster database or blockchain, batching them together as a single transaction, then rolling them up to the main blockchain.

This article analyzes the first modern cryptocurrency coin — Bitcoin — to demonstrate why someone would use it. However, you must understand that every cryptocurrency has its own objective, use case, logic, etc. This is why it’s important for you to read a cryptocurrency’s White Paper — and confirm that the cryptocurrency does what the paper actually says — before using said cryptocurrency.

Bitcoin aims to provide a decentralized financial system. In the modern day, people use fiat cash which maintains no value beyond its belief. In other words, fiat cash is only valuable because people agree that it is. So how is the cash of a fiat currency created? An entity (i.e a government) that manages the fiat cash creates it out of thin air by typing a “1” followed by many “0”s in a centralized database.

So what’s the problem with this?

Understanding Inflation

Have you ever walked into a store and noticed the price of a Loaf of Bread went from $1 to $2? Well, there’s two ways this can happen. The first being that the value of Bread increased: Perhaps, more bread was included in the package. Since there is more bread, there is more value you have to pay for.

The second way the price of the Loaf of Bread can increase is when the value of your money decreases. If your money is worth less, the Loaf of Bread will cost more. The amount and quality of the bread didn’t change; your money did. So how did that happen? When more money is created and the demand for it stays the same, the Law of Supply and Demand indicates that the price (value) of money will decrease. This results in inflation — which measures the increase in prices over a given time — and is an issue for the 99%.

Understanding Centralization

In a centralized financial system, the owner — in this case, the government and banks — can withhold information or prevent transactions from occurring. As an example, American Banks control large amounts of fiat cash, and decide who, when, and where you can send money to. Banks can also decide to reverse transactions or create money out of thin air through loans and credit.

While the above practices are not inherently positive or negative, they do allow bad practices to go unnoticed. Events such as the Subprime Mortgage Crisis in 08’ and Naked Shorting in 20’ are only possible in opaque (non-transparent) systems. The financial crimes that lead to these events are worse than murder since they destabilize entire communities.

Understanding Bitcoin

Bitcoin aims to solve these issues through a system that is verified by the public and virtually impossible to manipulate (in a technical manner). No bitcoin is created unless it follows the exact protocols set forth by the Bitcoin code, which is also open to the public (GitHub). When source code is available to the public, the software it builds is Open Source Software (OSS).

Understanding Cryptocurrency Concepts

As a reminder, each cryptocurrency coin works differently and is subject to change over time. For this reason, this article doesn’t spend much time on specifics such as Proof of Work, Proof of Stake, or Non Fungible Tokens (NFTs). However, you can now use the information that you have learned to gain a better understanding of those things on your own.

The largest issue with cryptocurrency is you. If you are unable to keep the ownership of your digital assets secure — by mishandling them or trusting bad cryptocurrencies — you will lose them. In the rawest form of cryptocurrency usage, no one can reverse these mistakes (due to the nature of decentralization). Cryptocurrency is a currency that provides protection from a lack of transparency and centralized corruption. It does NOT stop scams, Ponzi schemes, or any other fraudulent financial crime — that stems from the human usage of currency — from occurring.

[ad_2]

Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here