ITSA DeFi Insight — Gelato’s automated smart contracts
Gelato Network is a decentralized network of bots used by web3 developers to automate smart contract executions on public EVM-compatible blockchains. Since 2019, Gelato has been experimenting with various use cases, and in July 2020, it released its production-ready V1. Since late October 2020, Keep3r network, a protocol developed by Yearn founder Andre Cronje, has started operating its own solution. And in June 2021, Chainlink announced an open beta for Chainlink keepers in the field of smart contract automation. The interest in automated strategies is therefore accordingly high, which led to a large number of exciting ideas. Examples include user-friendly trading techniques and infrastructure-level liquidation protection.
Authors: Christian Viehof, Valentin Kalinov
Lack of automation and middleware
The deployment of bots to perform operations on the blockchain is known as automation. These bots, sometimes known as “keepers,” are an element of the blockchain stack’s middleware infrastructure. The blockchain ecosystem is underpinned by middleware infrastructure, allowing dApps to focus on developing their core products so that end users can connect without interruption. Oracles, which are nodes that transmit information from the outside world and broadcast it on-chain so that smart contracts can use it for various purposes, are among the most well-known types of middleware. The market capitalization of Oracle alone is $9.9 billion, which should offer an idea of how huge the potential market for automation is.
Many people believe that smart contracts are already automated when they talk about them. This could not be further from the truth, and automation in DeFi is conspicuously lacking except for liquidations and arbitrage. According to Gelato’s whitepaper:
The reason for this lack of automation lies in the Ethereum Virtual Machine (EVM) itself: programs only run for a few milliseconds at a time; persistent loops or “cron” jobs that constantly repeat themselves, typical in traditional operating systems, limit a miner from ever completing the state transition and thus mining a block. As a result, these programs, called smart contracts, are limited to only storing state and logic. Without an outside impulse, they are functionally inactive. In order to execute their logic and to change their state, they require an external party to send a transaction to them in the first place.
Since at least 2015, the Ethereum community has experimented with and explored automation at the level of smart contracts, with the Ethereum Alarm Clock serving as the first example. When Ethereum Alarm Clock Partner ChronoLogic spoke with numerous prominent members of the Ethereum community about the subject and offered their perspectives, it became clear that automation had great potential. Taylor Monahan, the inventor of MyCrypto, claimed that she thought automation would enable multi-step transactions, including the execution of signals from the outside world (a tweet, for example). Additionally, the creator of the ERC-20 token standard, Fabian Vogelsteller, saw automation as a means to increase trading activity on decentralized exchanges.
However, based on the last update of any type posted on Github, which was over three years ago, the Ethereum Alarm Clock does not seem to be under active development any longer. The clock was apparently too early for its time. DeFi essentially didn’t exist throughout its most active years, 2016–2018, which severely constrained the use cases the Ethereum Alarm Clock could put to use.
Gelato’s Maker use case
The introduction of DAI, a decentralized overcollateralized stablecoin, was one of the first significant applications of automation at the level of smart contracts. The Maker system generates DAI, hence one needs to overcollateralize their assets. Therefore, you would need at least $150 worth of tokens stored in a vault if you wished to borrow $100 worth of DAI. If the assets’ collateralization falls below the collateralization threshold, the owner risks having to pay a fine and have the assets liquidated.
Maker has created a system of outside “Maker Keepers” to take care of the liquidations rather than handling them themselves. Anyone could start engaging in liquidations by setting up a Maker keeper. Keepers bid for the opportunity to liquidate vaults via gas auctions using an incentive-driven auction mechanism, and whoever wins would be able to do so for a profit. By opening up liquidation auctions to all participants, Maker removes a barrier and automates one of the core components of their ecosystem, which today supports billions of dollars worth of TVL in the DeFi market. Maker would take on the role of serving as the protocol’s single point of failure if they handled liquidations on their own.
Even though Maker has an external liquidation scheme in place, a systematic malfunction occurred in March 2020 and led to protocol losses totaling 5.67 million DAI. Due to a late update to Maker’s oracle security module brought on by high gas prices, a limited number of keepers had a window of opportunity to put almost zero DAI bids to liquidate vaults. The historic Black Thursday incident serves as a reminder that automation is still in its infancy. To improve it, advancement is required. If Maker, one of DeFi’s biggest and most well-known organizations, is susceptible to such widespread failures, how can we expect other, far smaller projects to be prepared to withstand similar systemic shocks?
Two of the main problems since the need for automation became clear are how to motivate bots in a way that is economically sustainable and how to deal with fluctuating and unpredictable gas prices. Maker’s gas auctions were developed to overcome both of those challenges, but in the end, they represent the uncoordinated design of a bot ecosystem.
How to set things up?
We want to show how to use Gelato Network and what things to consider. For this example, we will use Moonbeam and Moonriver tokens, both are parachains from Polkadot and Kusama, respectively.
To create the operation, take the following steps:
- Enter the amount of Moonbeam/Moonriver you’d like to use to fund your Gelato operations account. These funds will be used to pay for gas. Then press Deposit and confirm the transaction in MetaMask
- Press “Create Task”
- Copy your NFT’s contract address
- Paste the contract address to allow the ABI (Application Binary Interface) to be fetched by Gelato
- Select the function you’d like to automate. For this example, choose the lick function
- The lick function takes a single parameter, namely, the token ID of the NFT to lick. Enter the token ID that corresponds to your ice cream NFT
- Choose the automation schedule. You can choose from a time-based schedule or Gelato can automatically execute the function whenever possible
- Select Gelato Balance to use your deposited funds to pay for the gas of the automated transactions
- Enter a name for your task
- Press Create Task and confirm the transaction in MetaMask. Then, sign the next pop-up in MetaMask to confirm your task name
Now, the repeating smart contract interaction with Gelato has been successfully set up. Until the gas reserves are depleted or the automation is suspended on Gelato operations, your automated smart contract interactions will proceed as planned. This example served as a straightforward demonstration, but you may automate far more intricate interactions and incorporate ever-more complex reasoning into your automated activities. For further details, visit docs.gelato.network.
The classification of Gelato according to the ITC
GEL is the Gelato Network's primary token, providing its holders an on-chain governance functionality so they can participate in the decision-making process on how the platform is managed.
Economic Purpose (EEP): GEL is listed as a Settlement and Governance Token (EEP22TU03) due to its design as a means of collateral combined with governance functionality.
Industry Type (EIN): The issuer of GEL is active in the field of Decentralized Data, Oracles and Infrastructure (EIN06DF04).
Technological Setup (TTS): GEL is an Ethereum ERC-20 Standard Token (TTS41BC). The Class “Ethereum ERC-20 Standard Token” captures every Token that is implemented by means of the ERC-20 Standard on top of the Ethereum blockchain.
Legal Clam (LLC): GEL does not entitle its holder to any legal claim or rights against the issuing organization; therefore, it is listed as a No-Claim Token (LLC31).
Issuer Type (LIT): The dimension “Issuer Type” provides information on the nature of the issuer of the token. GEL is built by Gelato Network, its Issuer Type is a Private Sector Legal Entity (LIT61PV).
Regulatory Framework (EU) (REU): The dimension “Regulatory Status EU” provides information of the potential classification of a token according to the European Commission’s proposal for a Regulation on Markets in Crypto Assets (MiCA, Regulation Proposal COM/2020/593 final). GEL qualifies as a Utility Token (REU52) according to the definition provided in Article 3 (5) of Regulation Proposal COM/2020/593 final.
The International Token Standardization Association (ITSA) e.V.
The International Token Standardization Association (ITSA) e.V. is a not-for-profit association of German law that aims at promoting the development and implementation of comprehensive market standards for the identification, classification, and analysis of DLT- and blockchain-based cryptographic tokens. As an independent industry membership body, ITSA unites over 100 international associated founding members from various interest groups. In order to increase transparency and safety on global token markets, ITSA currently develops and implements the International Token Identification Number (ITIN) as a market standard for the identification of cryptographic tokens, the International Token Classification (ITC) as a standard framework for the classification of cryptographic tokens according to their inherent characteristics. ITSA then adds the identified and classified token to the world’s largest register for tokens in our Tokenbase.
- The International Token Identification Number (ITIN) is a 9-digit alphanumeric technical identifier for both fungible and non-fungible DLT-based tokens. Thanks to its underlying Uniform Token Locator (UTL), ITIN presents a unique and fork-resilient identification of tokens. The ITIN also allows for the connecting and matching of other media and data to the token, such as legal contracts or price data, and increases safety and operational transparency when handling these tokens.
- The International Token Classification (ITC) is a multi-dimensional, expandable framework for the classification of tokens. Current dimensions include technological, economic, legal, and regulatory dimensions with multiple sub-dimensions. By mid-2021, there will be at least two new dimensions added, including a tax dimension. So far, our classification framework has been applied to 99% of the token market according to market capitalization of classified tokens.
- ITSA’s Tokenbase currently holds data on over 4000 tokens. Tokenbase is a holistic database for the analysis of tokens and combines our identification and classification data with market and blockchain data from external providers. Third-party data of several partners is already integrated, and API access is also in development.
If you like this article, we would be happy if you forward it to your colleagues or share it on social networks. More information about the International Token Standardization Association can be found on the Internet, on Twitter, or on LinkedIn.
Christian Viehof is an Executive Director at the International Token Standardization Association (ITSA) e.V., working to create the world’s largest token database including a classification framework and unique token identifiers and locators. He completed his Bachelor in Economics at the University of Bonn, the Hong Kong University and the London School of Economics and Political Science with a focus on Behavioral Economics and Finance. Currently pursuing his Master of Finance at the Frankfurt School of Finance and Management, you can contact him via firstname.lastname@example.org and connect with him on Linkedin, if you would like to further discuss ITSA e.V. or have any open questions.
Valentin Kalinov is an Executive Director at International Token Standardization Association (ITSA) e.V., working to create the world’s largest token database, including a classification framework and unique token identifiers and locators. He has over five years of experience working at BlockchainHub Berlin in content creation and token analysis, as a project manager at the Research Institute for Cryptoeconomics at the Vienna University of Economics and token analyst at Token Kitchen. You can contact Valentin via email@example.com and connect on Linkedin if you would like to further discuss ITSA e.V. or have any other open questions.