May 18, 2021
By: Paul Riegle
The Algorand blockchain is known for being fast (over 1000TPS with sub 4.5 second blocks), inexpensive (.001 Algos per transaction), immediately final (no forking, 1 confirmation) and green (carbon negative). These characteristics, combined with Layer-1 primitives like Algorand Standard Assets (ASAs), have made Algorand the blockchain of choice for many asset issuers, and asset management platforms.
Our smart contracts have stayed true to these first principles, including being the first carbon negative smart contract system. Unlike smart contracts on other platforms, we ensured our smart contracts would be fast (the same speed as any other transaction), inexpensive (the same cost as any other transaction - .001 Algos) and at Layer 1 and thus enjoy the same security and finality properties as Algorand's consensus protocol.
The Algorand Smart Contract Model
Our model is simple and powerful. Smart contracts are written in a higher level language and compiled to bytecode for execution by the Layer-1 Algorand Virtual Machine (AVM). An easy frame of reference is Ethereum, where smart contracts are written in Solidity and compiled to bytecode for execution by the EVM.
If you’ve written smart contracts on Algorand, you have already interacted directly with early versions of the AVM while using an assembly-like language called Teal. Through this early use of the AVM, Teal developers have given us feedback and allowed us to rapidly iterate and improve the AVM. As we approach the AVM v1.0 release, the AVM will enable smart contracts to be written in Turing-complete languages and to send transactions, and will be capable of executing complex smart contracts that can power the most popular DeFi, NFT, and web3 dApps available in blockchain today.
Critically, this smart contract power does not sacrifice speed or cost. Compute and storage budgets, while generous, are calculated and enforced during runtime. This means that smart contracts will continue to have safety guardrails by design and that potential infinite loops will be terminated before having any impact on the overall system.
Smart Contract Languages on Algorand
We believe that it is critical to be able to write smart contracts in accessible languages. We also believe that it is critical to have safety and correctness guarantees when writing smart contract based infrastructure that interacts with billions of dollars of value. As such, together with our community and ecosystem, we are focused on providing languages that strike the right balance.
Additional strategies, such as integrating with the LLVM stack are now clearly available to the project and our community, opening up writing smart contracts to a wide variety of popular languages such as Rust, C, C++, Go, Haskell, Python, JavaScript, and more.
An Enduring Smart Contract Platform
Our smart contracts, in their current form, can support the needs of all the major and popular dApps. In addition, we are actively preparing for a future where smart contract transactions are ubiquitous and numerous enough to cause congestion even on the highest throughput blockchains like Algorand. We are also preparing for the natural evolution of resource usage in programs, when new and more complicated protocols and cryptographic primitives evolve to require resource usage that would need to be constrained within the current framework. We are hard at work designing and iterating a layer-2 smart contract system to address these future needs that will be powerful, flexible, and fully composable with our growing layer-1 smart contract dApp ecosystem.
Join our Ecosystem of Builders
Developers on Algorand can expect to build superior DeFi, NFT-related, and web3 dApps with a combination of:
Algorand is based on smart and thorough research, careful planning, and excellent implementation and our smart contracts are no different. They are powerful, fast, inexpensive, and easy to get started in.