With my previous article, I opened the Algorand series, so if this platform is new to you, I recommend you start by reading Algorand 1.0 - Introduction. However, in this article, I develop the topic further, moving on to new functionalities that the Algorand team introduced to the protocol at the end of 2019.
The update of the main Algorand platform was quite a big surprise for me. For two reasons:
- I am impressed by the pace of development of Algorand: in May 2019 their main network was launched (mainnet), while in November 2019 they provided 3 new, large functionalities, releasing Algorand 2.0. The Algorand team took less than 6 months.
- Level of technical advancement and innovationwhich Algorand 2.0 introduces in my opinion is very significant vs. Algorand 1.0.
So let's try to digest it, step by step.
Algorand 2.0 adds three new key functionalities:
- Algorand Standard Assets (Algorand Standard Assets), which is a standard that allows creating and issuing new tokens, based on the Algorand platform. Nothing new? Not quite, they are built into Layer-1. The implications are significant.
- Smart Layer-1 contracts (and the incomplete in the Turing sense script language TEAL). Is it not surprising that the Turing prize winner decides to build a language that is not complete in Turing's view? Indeed.
- Atomic transfers (Atomic Transfers), secure asset transfer, also embedded in layer-1. However, they should not be confused with Atomic Swaps, known from other platforms, here we are also talking about implementation on the lowest protocol layer.
The new version of Algorand takes a big step forward vs its predecessor, addressing some of my earlier concerns described in my other analyzes of this platform. In this article I will discuss the nuances of Algorand 2.0 and try to answer the question: do I think this is a big change.
Algorand Standard Assets (ASA)
ASA provides a standardized mechanism so that any type of digital resources can be saved and stored on Layer-1.
- Fungible Assets: such as currencies, utility tokens, or stablecoins,
- Non-Fungible Assets: such as real estate, computer game artifacts, tickets, works of art,
- Securities, shares, certificates, etc.
The implementation of this type of approach on a layer-1 is, in my opinion, a unique and innovative approach that guarantees that all operations performed on these assets are:
- Fast and Safe, maintaining the same level of security as native Algos, being as secure as the basic consensus protocol and as fast as Tier 1 transactions.
- Compatible, if the application supports a specific Algorand resource, it will automatically support all Algorand ASA resources, thanks to its universal interoperability.
- guarantee ease of use, are able to create a resource in one transaction!
The ERC-20 tokens standard at Ethereum changed the entire industry a few years ago, but some time has passed 🙂 I believe that ASAs can have a similar impact on the way of thinking about solution design, if not greater, when they become widely used.
Smart Contracts at Warsaw-1 (ASC1)
Of course, we think that smart contracts are Layer-2 solutions, because other platforms have accustomed us to such thinking, but Algorand breaks this principle by introducing smart contracts on the base layer and ensuring that we can use the simple TEAL language.
Algorand believes that complete languages in the Turing sense are not necessary for most blockchain use cases. Turing's complete languages introduce an additional layer for potential attacks and further escalate performance problems. Let's take a look at the numbers:
- Recently, scientists from the University of Germany reviewed over 53 000 currently implemented smart contracts in terms of their security.
- They found that most currently implemented smart contracts do NOT need complete Turing languages, and can often be written based on simpler rules.
- Out of 53 thousand of the analyzed smart contracts, only 7% of them used a flow control mechanism ("while" loop), which usually requires a full programming language (in Turing's meaning).
- In addition, it is highly likely that some of these "7 percent" smart contracts could be programmed without a WHILE loop and could be replaced with UTXO functions.
- Read more here => For Smart Contract Languages Need to be Turing Complete?
The Algorand team provides a set of templates for smart contracts, which makes ASC1 programming smooth and easy, and you can also build your own smart contracts from scratch.
Algorand created his own programming language with ASC1 TEAL (Transaction Execution Approval Language)which is just not complete in Turing's view. Given that Silvio Micali is a Turing Prize winner, one might wonder whether such a language construction is conscious and whether it is an advantage or a disadvantage?
Let's take a closer look at the topic.
There are 16 documented attack vectors that are directly related to Turing's complete smart contracts. Let's list a few:
- the famous DAO Hack was possible thanks to the gate that Solidity's complete Turing language left behind.
- Constantinopole upgarde also posed a threat due to its turing-complete functions that Solidity possesses (as a result it has been delayed).
- Solidity does not give an opportunity to accurately estimate transaction costs or time to stop the process and execution, which is sometimes used by bad actors.
With that in mind, the TEAL language by Algorand can be a nice choice because it provides more predictability i security, at the same time simplicity (ease of writing and debugging). In addition, it improves program execution time, makes it more deterministic, preventing recursive logic (maximizing security and performance).
Possible use cases?
- Trust accounts,
- Centralized and decentralized exchanges.
Algorand is currently working on full support for all SDKs and is building templates for typical use cases based on TEAL, which will help developers to start programming quickly. Much of this work is ready (Java, Java Script, Go, Python, .NET soon).
Of course, there are use cases that will require more complex logic compared to what ASC1 can provide, so on the roadmap for Algorand there are also planned works on layer-2 smart contracts that will provide complete functionality in the sense of Turing, and therefore wider possibilities of use.
Atomic transfers are the third functionality available with Algorand 2.0. They are a secure way to transfer multiple resources between pages (they should not be confused with other known Atomic Swap solutions). What is the difference?
Atomic Transfers allow transaction groups to be approved at the same time - or not at all.
How it works?
1. Individual transactions are created.
2. Then the transactions are grouped in a package.
3. Each transfer is signed individually by the transfer initiator.
4. The package is reported to the blockchain network, and the nodes approve all transactions from the package in one go.
5. If one of these transactions fails, all transactions are automatically rejected - so all transactions are approved or none of them.
This eliminates the need for hashed time-locks (time locks) as in the case of atomic swaps, on other blockchain platforms, as well as limits the delays associated with hashed time-locks.
There is no need to rely on temporary blocking of contracts. This means a smooth and quick approach to Atomic Trasnfers.
An additional benefit: since these operations are performed on Layer-1, they are safer than if they were performed on Layer-2.
Atomic Transfers allow applications such as:
– Dependent transactions: A pays B if B pays C and B pays C if C pays A.
– Group payments: either everyone pays or nobody.
- Exchange without trusted intermediaries.
- Payments to many recipients simultaneously.
A simple example of use: You can imagine that in this way we sell a tokenized property, in which documents confirming ownership, property fee, and for example official fees are sent in one package.
Observing the speed of development of the main Algorand protocol and additional functionalities that appear on their blockchain, Algorand seems to be moving in a different direction than most Ethereum mimics. It's rather good. I still think Ethereum is the main player in this space (network effect), and new projects must come up with a proposal of some unique value in order to compete with Ethereum. Increasing network capacity by sacrificing decentralization (which makes many players) is short-sighted and most of such solutions imitating Ethereum will certainly no longer count in a few years (either end up as an expensive database, or will exhaust resources to stimulate the ecosystem), so I believe that platforms that don't take shortcuts have the chance to build a solid foundation and survive the next few decades.
I am glad that Algorand brings a new approach to the game and doesn't compromise when it comes to addressing blockchain trileme (decentralization / speed / security). I think this will prove to be the right path in the long run.
I am even more optimistic about the future that there is still a lot of innovation on the Algorand roadmap. In the next post I will discuss their approach to interoperability and private chains (what-chains). Below is also a trailer of what the band is still working on - I mention it in the linked material video.
Fasten your seat belts, it will happen 🙂