Our Archive

Welcome to your Archive. This is your all post. Edit or delete them, then start writing!

Crypto layer-2

Layer-2 is a scaling solution to enable faster and lower-cost transactions on a blockchain network like Bitcoin or Ethereum.

As crypto has exploded in popularity it has inevitably stretched the capabilities and limitations of the major blockchain crypto networks like Bitcoin and Ethereum.

You could imagine the early days of crypto like a shiny new three-lane highway, freshly tarmacked for a smooth ride and almost no traffic due to the relatively small number of cars. 

Fast forward to today and that same highway is bursting at the seams just as our real highways are. 

It’s not easy or sometimes even possible to add a new lane to ease the traffic. Crypto networks like Bitcoin and Ethereum face a similar dilemma.

The limitations of layer-1 when it comes to transaction speed

The core blockchain network is what is known as Layer-1. 

In the case of crypto, one major problem with layer-1 is the relatively slow speed at which transactions can be confirmed. 

Take the case of the credit card company Visa, it is capable of processing up to 20,000 transactions per second (TPS).

Bitcoin on the other hand is capable of 3 to 7 transactions per second on the main blockchain. 

This is a gigantic difference and poses serious scalability issues. 

The reasons why are too complex to get into here but in essence, Visa uses a centralised system whereas Bitcoin uses a completely decentralised system where every single transaction needs to be verified by every node on the blockchain. 

This produces a highly secure, cost-effective and super-resilient network but this security and robustness comes at the cost of lower transaction speeds. 

Layer-2 is one solution to the problem of scaling

As a result technologists in the crypto world have been exploring ways to ease this congestion and layer 2 is one such solution.

To illustrate what layer-2 is we can use a different analogy this time. That of banking. 

Imagine a major bank like HSBC or Barclays. It has a centralised technology or systems that store all the balances and transactions for thousands or maybe even millions of customers. 

Every time money is deposited, withdrawn or transferred by an account holder the information is updated on the central network and most often in real-time. So far so good. 

Now imagine we didn’t have online banking or ATMs and like the old days of banking, every single customer would have to physically visit a branch office and conduct the desired transaction no matter how small. Imagine the queues! 

Well, this is what layer-1 kind of looks like. 

As you can imagine, even with lots of branches it would take a lot of time to get things done. 

Banking solved much of this problem by going online and by offering ATMs. 

This has resulted in a huge amount of daily transactions being removed from the workload of branch offices. We could think of ATMs and online banking as layer-2 in crypto.

Now that we have an idea of what layer-1 and layer-2 are we can go a little deeper into what they are in crypto terms

Blockchain networks like Bitcoin and currently Ethereum, (although this will change), use what is known as a Proof of Work (PoW) consensus mechanism. 

In simple terms, every time a transaction or “block” is recorded on the blockchain a miner has to solve a highly complex computational puzzle first by beating other miners and winning the opportunity to record the new block and in return earn some coins and corresponding transaction fees. 

This transaction has to be verified by the entire blockchain network and then it is set in concrete so to speak. 

This process takes time and energy, literally. If this proof of work consensus mechanism didn’t exist, say in the case of Visa, a transaction could be recorded instantly and naturally 20,000 transactions per second are possible. 

In the case of Bitcoin, it is a physical limitation due to how the blockchain was originally conceived and developed. 

Layer-2 is designed to divert transactions from the layer-1 network onto a faster network

What layer-2 does in very simple terms is “divert” a transaction away from the main layer-1 network, process it on a faster separate layer, “layer 2” and then when the transaction has been completed punch it back into the main layer 1 and set it in concrete so to speak. 

This results in a reduction in small transactions occurring on the main layer 1 of the blockchain but still recording the final transaction with the same level of surety. 

In addition to reducing congestion layer-2 also helps by offering lower transaction fees which are essential for very small transactions or micro-transactions where high fees simply wouldn’t work.

We could go back to the highway analogy again to illustrate layer-2 as well. 

Imagine the main highway as layer-1, the primary blockchain of say Bitcoin or Ethereum. 

Layer-2 could be an exit onto a separate super wide and fast stretch of road that leaves the main highway and then rejoins again several junctions later. 

Now if we imagine a lot of these separate stretches of road in existence that are diverting traffic away we could expect a reduction in traffic on the main layer-1 highway. 

Of course, it’s not as simple as that but hopefully, the analogy makes it easier to understand the issue and how layer 2 can ease congestion.

The Lightning Network is an example of a layer 2 crypto scaling solution for Bitcoin

One example of a layer-2 scaling solution is the Lightning Network on the Bitcoin blockchain. 

The Lightning Network simultaneously takes transaction loads from the Bitcoin layer-1 and reports to it as well. 

This results in an increase in processing speed on the Bitcoin blockchain. In addition to this, the Lighting Network brings smart contract capabilities to the Layer-1 Bitcoin blockchain. 

This is pretty major as the layer-1 Bitcoin blockchain, unlike Ethereum, does not inherently support smart contracts. 

Smart contracts, in very simple terms, are automated contracts that allow for more complex possibilities on a blockchain beyond the storing and transferring of cryptocurrencies. 

Conclusion

As with almost all new technologies that experience mass adoption, like banking or cars, there is inevitably going to be a scaling problem. 

Crypto is experiencing this scaling problem right now. In order for crypto to truly go mainstream robust solutions will be needed. 

Layer-2 is one such solution trying to help ease congestion and keep traffic moving!

Ready to go take your SEO content to the next level? Request our free site audit

Read More
ERC-20 Ethereum

ERC-20 tokens are specifically created to work on the Ethereum blockchain platform. ERC-20 is a common standard that allows ERC-20 smart contract tokens to be easily created, shared, exchanged and transferred to a compatible crypto wallet.

Ethereum arrives on the crypto scene in 2015

As the cryptocurrency world continues to evolve at a rapid pace and an ever greater number of developers and crypto entrepreneurs invent new dapps (decentralised apps) it has become increasingly important to find a way to maintain a standard level of interoperability and compatibility.

The original cryptocurrency Bitcoin is relatively basic when we look at the entire crypto world of today. 

The primary purpose of Bitcoin is the holding, sending and receiving of value in a digital world. 

When Ethereum arrived on the scene in 2015 it opened up a great deal more possibilities beyond simply being another cryptocurrency. 

Ethereum created an exciting new crypto eco-system where new decentralised applications (Dapps) and innovative use cases could be developed and the result has been, well, astounding.

How is Ethereum different from Bitcoin?

Before going into any detail about what ERC-20 is we really need to first grasp what Ethereum is and how it fits into the overall crypto world.

We have to give props to Bitcoin, the cryptocurrency that started it all. The vision being a universal, decentralised digital currency that nobody controls, this means no government, corporation or central banking organisation. 

Bitcoin fused cryptography and something called blockchain technology to provide the foundation on which Bitcoin operates. 

As with almost all new technologies, they are relatively basic when compared to later arrivals. Look at the first automobiles that arrived on the scene, whilst revolutionary and certainly paving the way for better cars, they were in relative terms of course way more basic compared to today’s cars. 

Of course, they still perform the same core function, autonomous transportation, however, cars today are way faster, more efficient and superior in just about every way. 

In the world of crypto, something similar happened and is still happening. 

Bitcoin spawned an entire industry and some bright people saw a bigger future. One of these people was Vitalik Buterin, the creator of Ethereum. 

Think of Ethereum as v2 of the automobile. Vitalik saw a use case beyond that of a digital currency and instead saw a platform or eco-system where blockchain technology and smart contracts could be put to use for an almost limitless amount of uses. 

Ethereum was born and has played a pivotal role in the world of crypto ever since and is now the second most valuable cryptocurrency after Bitcoin.

Ethereum and smart contracts

In essence, Ethereum is a blockchain that can record transactions and also a virtual machine that can produce smart contracts. Smart contracts were a game-changer in crypto!

Smart contracts are in very simple terms computer code that perform certain very specific functions whenever a predetermined action takes place. 

A very simple way to imagine a smart contract is a vending machine. The vending machine is programmed to release the specific item the user wants after they have inserted the correct amount of money. 

If the correct amount of money has been inserted the vending machine releases the product. It will also be programmed to give back the correct amount of change. 

A smart contract works in pretty much the same way. It is designed to perform certain functions when certain actions take place, for example, a person pays X in the correct amount of cryptocurrency and the smart contract releases Y to the person, like the deeds to a house or a piece of valuable artwork. 

Of course, smart contracts are way more complex but you get the general idea.

Going back to Bitcoin, there are no smart contracts. It is purely a means of storing and transferring value digitally.

Now, the two core functions of Ethereum, the blockchain and the ability to create smart contracts means that Ethereum is able to support an almost unlimited amount of dapps (decentralised apps) and this is where the ERC-20 token standard comes in very handy.

Depending on the intended use, DAPPs might create ERC-20 tokens to function as an in-game currency, points in a loyalty program, or even ownership of an actual real-world asset like gold, silver, artwork or the deeds to a property.

This is exactly what happened and before long all sorts of new tokens were invented for different purposes. 

In 2023, there are nearly 450,000 different ERC-20 tokens according to the Etherscan website

ERC-20, a standard that developers can use to ensure quick and easy compatibility

With so many ERC-20 tokens around and way more to come, a standard or framework was going to be needed before long.

During the very early days, if two different types of tokens, token A and token B wanted to work with each other, i.e. interoperate, they could each manually write their code to work with the other tokens code and token A and token B could technically work with each other. 

This was okay when there were just a handful of tokens, however, it became unmanageable pretty quickly as the number of new tokens being launched on Ethereum exploded. 

A standard was desperately needed that developers could use as a common framework.

In answer to this, the Ethereum community developed a common standard or specification called ERC-20 to which all compatible tokens must adhere and comply. ERC standards for Ethereum Request for Comment.

Before we get into the technicalities of what ERC-20 is, let’s look at a couple of simple analogies to get an understanding of why ERC-20 was needed and what it actually does in practical terms.

Let’s begin by Imagining a casino environment full of all manner of different gaming machines from different manufacturers. So far so good. 

Now imagine that when you enter the casino, you need to exchange your Euros or Dollars for 20 or 30 different types and shapes of tokens as every machine uses a different type of token. 

That would be completely impractical and frustrating. In answer to this problem, the casino would tell all the gaming machine manufacturers that in order to have their machines in the casino their machines would have to have a certain size and shape of coin so that the same coin could work across all the machines. 

When you get paid out from one machine, you can take those tokens and put them into any other machine or convert all the remaining coins back to a fiat currency at the end of the day. 

This clearly makes things a lot easier and in very simple terms this is what Ethereum created with ERC-20, a specific standard that all compatible tokens have to adhere to in order to be able to interoperate and also be easily and quickly listed on exchanges.

Another way to imagine the ERC-20 standard would be to think about how debit and credit cards work. 

We as consumers can in most cases take any brand of debit card or credit card from any bank to a store and buy whatever we need. 

Each card conforms to a standard and contains some core information. Now if every card used a completely different standard it would be chaotic in store, imagine how many different machines or systems would be needed let alone the delays and confusion. 

Thankfully this isn´t the case and we can very easily swipe or touch the card on a machine and in the majority of cases we´re good to go due to a framework of common payment processing standards.

Now, the above are very simple examples just to demonstrate the problem and solution. Crypto tokens are way more complex than a casino coin or a debit or credit card and can perform a multitude of tasks and hold a whole host of values for different use cases from being a currency to owning a piece of art.

At its core. ERC-20 contains 3 optional and 6 mandatory rules that every token must be compliant with.

The three optional rules of ERC-20

Token Name – This is the name of the token

Symbol – This is the symbol of the token, a bit like a stock symbol like

Decimal (up to 18) – -this the divisibility of the token, 0 would mean it’s not divisible, the decimal value can basically determine how small the fractions of a token can get

The six mandatory rules of ERC-20

TotalSupply – This holds information about the total supply of the token

BalanceOf – This holds information about the account balance of the holders account

Transfer – This executes the transfer of a specific number of tokens to a specific address

TransferFrom – This executes the transfer of a specific number of tokens from a specific address

Approve – This allows a user to withdraw a certain amount of tokens from a specific account

Allowance – This allows a user to return a certain amount of tokens to a specific account

In addition to the above, these functions will trigger up to two events. This would be the transfer event that takes place whenever tokens are transferred and the approval/validation event that takes place whenever approval is required.

ERC-20 tokens have played a big part in the ICO craze and growth in the Ethereum platform of recent years

ERC-20 tokens have played a huge role in the massive amount of ICOs (initial coin offering) that have taken place over the last few years to help developers get funding for their projects. 

As ERC-20 tokens are relatively easy to create and are designed to work on the Ethereum platform they have helped to fuel the IPO boom.

What about the downsides of ERC-20?

Whilst ERC-20 has played a crucial part in the growth of the Ethereum platform and made things much easier for developers and ultimately users, ERC-20 isn’t perfect. 

There are some issues that the ERC-20 token standard does not address

One of these is that tokens could be unintentionally destroyed when they are accidentally used as payment for a smart contract application instead of correctly using ETH, the native currency of Ethereum. 

An estimated $3 million dollars of value has been lost due to this weakness. 

To resolve this problem, the Ethereum community is working on a new standard, ERC-223, however, this standard is not compatible with ERC-20, the dominant standard today so developers are still working primarily with ERC-20 until compatibility exists.

Another issue is what is known as the “batch overflow” bug that could allow an attacker to illegally potentially possess a huge amount of tokens by exploiting a weakness called the classic integer overflow issue. 

We are not going to get into this here but needless to say, it’s a potentially huge security weakness in ERC-20.

Conclusion

As with almost all industries and major technological breakthroughs, there is constant evolution, weaknesses are found, new use cases are discovered and innovation takes place every day. 

In the crypto world, the primary and not to be underestimated breakthrough was Bitcoin and the blockchain technology it uses. 

Bitcoin and blockchain technology paved the way for the likes of Ethereum where a broader use of crypto came about like DeFi (decentralised finance) and much more. 

ERC-20 is a standard that the Ethereum community introduced to provide a standardised means of compliance and ERC-20 has helped to propel Ethereum as a major crypto platform and ecosystem. 

ERC-20 isn’t without its flaws and will no doubt be superseded in time. However, for now, at least it plays a major part in facilitating the creation of compatible tokens that are easy and quick to create, transfer and hold in compatible crypto wallets. 

ERC-20 helped to fuel the ICOs that helped generate huge amounts of startup capital which in turn has helped Ethereum and the broader crypto world get to where it is today.

Ready to go take your SEO content to the next level? Request our free site audit

Read More