• 10 min read

The Launch of Smart Contracts 2.0 on Hedera

Published By
Wes Geisenberger
February 23, 2022

Hedera’s vision is to build a trusted, secure, and empowered digital future for all. Smart Contracts 2.0 on the Hedera mainnet marks the next step of this journey by making Hedera a low-cost and highly scalable network for all EVM Solidity developers and enabling new opportunities for programmable digital assets on Hedera. 

The HBAR Foundation is a resource for all Solidity developers who build on Hedera. We provide technical, marketing, and financial support to innovative smart contracts and dapps developers.

What are smart contracts?

Smart contracts, like any other contract, are terms of an agreement. What makes them smart, however, is the absence of any intermediary person to verify the terms have been met. Instead, terms are established, verified, and executed by code on the blockchain or DLT. They can be represented as an arbitrary deterministic business logic expressed in code that is run and governed on a distributed system. 

The advent of smart contracts as a concept came with a promise of fully deterministic trustless business operations and complex business logic around digital assets that can revolutionize how the financial markets, property markets, and distributed organizations can operate. Technologies like the EVM and its Solidity development language, while showing the future of possibilities, came with significant limitations that prevented businesses from taking full advantage of it on a world scale. These limitations include high costs of operations, slow transaction confirmations, and a lack of operational predictability. We have yet to see true mass adoption at scale in a fully on-chain manner and to do this we need to understand what worked and solve for issues around cost, speed, and predictability in terms of running applications leveraging smart contracts. 

Part of Hedera’s vision, as a DLT platform focussed on building a platform for real-world large-scale distributed applications, is to find solutions to these problems.

EVM Solidity Smart Contracts 2.0

Hedera has combined the learning of open-source smart contracts developer communities around the EVM, the Hashgraph consensus algorithm, and a new innovative approach by the Hedera core development team to upgrade the Hedera Smart Contracts Service to never-seen-before performance metrics. Hedera Smart Contracts Service (HSCS) scales the EVM, with the Mainnet transaction speeds 13x faster than on Ethereum Mainnet. In other words, we can now process as many EVM smart contract transactions per second on HSCS as you can in one block on Ethereum. With complete finality in seconds. Hedera doesn’t have a concept of a ‘block’ and all transactions are fairly ordered by the timestamps; there is no danger of a frontrunner attack, where the transaction confirmation entity can prioritize some transactions over others. This makes Hedera a perfect ecosystem for financial markets and DeFi projects. 

Because Hedera does not require any “block confirmations,” there is the fairness of order, fees, timestamps, and access that you get with Hedera, in addition to being aBFT (the gold standard of security), and not to mention being carbon negative

Alongside these upgrades to efficiency, Smart Contracts 2.0 have greater programmability due to their ability to integrate aspects of the Hedera Token Service and, in the future, Hedera Consensus Service and other Hedera services. Today, Hedera smart contracts can call native HTS functions from within the smart contracts, which combines the power and cost-effectiveness of Hedera Token Service with arbitrary deterministic logic of Solidity smart contracts. So far, they support minting, associating, dissociating, transferring, and burning on HTS. Developers can now integrate their smart contracts with HTS, so that their digital assets may look and feel like EVM standardized digital asset contracts such as ERC-20, but take full advantage of Hedera-native HTS tokens.

What Does This Mean for HBAR? 

One of the major use cases of smart contracts is DeFi. By using smart contracts, users do not have to place their trust in any individual person or institution, such as a bank. Rather, users place their trust in code and the governance around the code. This smart contract code is generally transparent, although it can contain flaws or sometimes errors and economic vulnerabilities. The transparency of smart contracts ensures that flaws can be found and improved upon when the code is correctly governed. Let's take an example from the Hedera ecosystem.

At the Creator Economy focused application Calaxy, founded by NBA Player Spencer Dinwiddie, they intend to utilize smart contracts to manage social tokens and their underlying collateral. Calaxy envisions a future where everyone can have their own social tokens, which their fans and community can acquire to utilize for familiar experiences, both digital and physical. By utilizing smart contracts, they are able to ensure that the Creators themselves will always have access to their rightful capital and liquidity, through their fans.

In practice, these smart contracts can accept deposits of popular stablecoins and other methods of collateral, like HBAR, and mint or burn social tokens appropriately. This method of collateralization enables fans to consistently get into and out of a Creator’s economy, without vendor lock-in, due to the immutable and censorship resistant properties of smart contracts.

A more concrete example would be a fan depositing 10 USDC and receiving 10 $SGD26 in creator tokens in return. The ledger would then be updated once the transaction has been completed. This means that the transaction cannot be changed, altered, or reversed.

Smart Contracts 2.0 will enable the ecosystem to usher in a new era of Decentralized Finance (DeFi) protocols onto the Hedera network. One that requires high throughput, stable governance and a gold standard of security for its high TVL (Total Value Locked).

In more complex scenarios, such as Decentralized Exchanges (DEXs), the order book may be managed by smart contracts (that sometimes communicate with other smart contracts), and under many DEX’s lies an AMM (Automated Market Maker). The use of smart contracts also enables people to provide liquidity for trading pairs without the need for an intermediary i.e., a bank. AMMs often set a single price for an exchange between two digital assets. This price is consistently visible to all DEX users.

Hedera offers an evolution for such systems thanks to its performance, reliability, and stability. Combining Hedera Token Service, Hedera Consensus Service and Hedera Smart Contracts Service, organizations can build high-performing applications and issue digitally native real world assets of unprecedented quality, security and usability. An example could be assets created by the open-sourced Guardian platform. Guardian-created tokens issued on HTS offer auditable logs on HCS of verifiable data that follow a methodology, such as a Carbon Offset. Using this information and the methodology, Hedera smart contracts runnning an ARM are able to leverage machine learning algorithms to interpret metadata linked to tokens (using W3C-friendly verifiable presentations) that explain the genesis of that token, and what process was done to create the asset. This allows for better price efficiency and enables dynamic pricing of highly complex non-fungible or semi-fungible assets.

For any developers that want to build on the Smart Contracts 2.0 service or any of the Hedera services, the HBAR Foundation is here to support you. We provide the technical, marketing, and financial support which can help to get projects off the ground or scaling into production. Reach out to us if you have a project you would like to start the discussion on how we can help: hbarfoundation.org.

About the HBAR Foundation

Founded in 2021, the HBAR Foundation fuels the development of the Hedera ecosystem by providing grants and other resources to developers, startups, and organizations that seek to launch decentralized applications in DeFi, NFTs, CBDCs, sustainability, gaming, and other sectors. In addition to providing funding through a streamlined grant process, the HBAR Foundation acts as an integrated force multiplier through expert support across technical, marketing, business development, and other operational functions that are required to scale. 

To apply for a grant from the Foundation, please visit https://www.hbarfoundation.org/apply or follow the Foundation on Twitter @HBAR_foundation.