Interpretation of DeFi Smart Contract Automation Track

DeFi’s Smart Contract Automation Competition: Gelato, Keep3r and Chainlink Keepers

A race for DeFi innovation is unfolding, and both established players and upstarts are running.

Gelato, an Ethereum smart contract automatic execution tool, has been expanding the scene since 2019, and launched its V1 version in July last year. At the same time, Keep3r has been implementing its own solutions since late October 2020. Just last month, Chainlink also released a public beta version of Chainlink Keepers in the field of smart contract automation. The prize of this competition is automation. From user-friendly trading strategies to infrastructure-level liquidation protection, its huge potential is just beginning to be realized.

“Automation” can be defined as the use of robots to automate software processes. Sometimes these robots are called “executors” or “keepers”, and they are part of the blockchain stack middleware infrastructure. Middleware infrastructure is the backbone of the blockchain ecosystem. DApps can use it to focus on building core products so that end users can interact smoothly. One of the most well-known examples of middleware is the oracle machine, which obtains information from the external world and publishes it on the nodes on the chain to provide data for different applications of smart contracts. At present, the total market value of the oracle project alone has reached 9.9 billion U.S. dollars, which can predict the potential scale of the automation market.

1. DeFi lacks automation

When it comes to smart contracts, many people think they are already built automatically. This is far from the truth. In addition to liquidation and arbitrage, DeFi obviously lacks automation. Gelato’s white paper states:

“Automation is lacking because of the Ethereum Virtual Machine (EVM) itself: the program only runs for a few milliseconds at a time; the continuous loop or repeated “cron” operations that are common in traditional operating systems restrict miners from completing state transitions and mining Blocks. Therefore, these programs called smart contracts are limited to storing state and logic. If there is no external push, they are functionally inactive. In order to execute the logic of these programs and change this state, an external Send it a transaction.”

As early as 2015, the Ethereum community has tried and discussed smart contract-level automation. The first attempt was the Ethereum Alarm Clock. It was created by the developer Piper Merriam. The product description is “a service that allows transactions to be scheduled for later execution on the Ethereum blockchain.” It is called TimeNodes. Inspired by the decentralized robot network, these execution agents perform simple automated tasks off-chain, such as sending transactions at specific times.

In 2018, ChronoLogic, the partner of Ethereum Alarm Clock, interviewed several leaders of the Ethereum community on this topic, and they talked about the potential of automation. Vitalik Buterin called automation “seems to be a very valuable thing . ” Taylor Monahan, the founder of MyCrypto, said that she envisions automation to facilitate multi-step transactions, including the execution of signals from the real world (such as a tweet). In addition, Fabian Vogelsteller, the author of the ERC-20 token standard, believes that automation is a way to stimulate decentralized exchange trading activities. This view was later confirmed.

However, the development activities of the Ethereum alarm clock were not active afterwards. The developer made the last update on Github more than a year ago. But the value of the Ethereum alarm clock should not be underestimated-it is the first real attempt to automate transactions on Ethereum.

Perhaps the biggest problem is that the Ethereum alarm clock is too advanced. The active development time of the project was concentrated in 2016-2018, but DeFi basically did not appear at that time, so it severely limited the number of scenarios in which the Ethereum alarm clock can be applied. In addition, this protocol can only execute simple processes, but cannot handle complex tasks that require deep integration with smart contracts.

2. Maker liquidator

The launch of DAI is one of the first widespread applications of automation at the smart contract level, which is a decentralized over-collateralized stablecoin. The Maker system operates by generating DAI, and users must over-collateralize 150% of their assets. That is, if you want to generate $1,000 worth of DAI, then at least $1,500 worth of tokens must be locked in the vault. If the assets are less than 150% of the mortgage amount, then the owner may lose assets due to liquidation and payment of fines.

The Maker system does not handle the liquidation itself, but is handled by an external “Maker Liquidator” system. In this system, the Maker liquidator bids for the rights of the liquidation vault through Gas fee bidding, and the winner will implement the liquidation and obtain a profit. By allowing anyone to participate in the liquidation auction, Maker itself withdrew from one of the most important aspects of its ecosystem to automate it, and the automated system now supports billions of dollars in total lock-up volume in DeFi. If Maker handles the liquidation by themselves, once the agreement fails, they, as the central party, need to bear the most important responsibilities.

Although Maker has its external clearing system, in March 2020, the system suffered a systematic failure, and the agreement lost a total of 5.67 million DAI. The reason is that due to the high gas fee, Maker’s oracle security module was updated late, which gave a small number of liquidators an opportunity to liquidate the vault with close to zero DAI bids. This infamous Black Thursday fiasco shows that automation is still in its early stages of development and still needs to be improved. If Maker, as one of the largest and most mature projects in the DeFi ecosystem, is still prone to such widespread failures, how will other much smaller projects respond to such systemic shocks?

Nowadays, the demand for automation in the DeFi field is becoming more and more obvious. The two biggest pain points are: how to incentivize robots in an economically sustainable way, and how to adapt to the fluctuating and unpredictable gas price.  Maker’s Gas auction system aims to solve these two obstacles at the same time, but the reality ultimately shows that the design of the robot ecosystem is not coordinated.

Third, the robot operator

Assuming that there are 10 robots bidding for the right to liquidate a vault, although one robot can obtain the liquidation right after the highest bid to pay back the cost, even if the other 9 robots lose, they still have to pay Gas fees. Once this process is repeated for a long time, it is not economically feasible for most robot operators to continue participating in the liquidation.

Gas auction is a winner-takes-all system, which is highly competitive and capital-intensive. Therefore, only a small number of robot operators can survive, and most robots cannot participate. In addition, due to lack of coordination, gas auctions are very resource intensive, and valuable block space is filled with failed transactions. This also causes miners to get most of the value from the liquidation, because they determine the winner of the Gas auction, not the robot operator who wants to liquidate.

Except for scenarios such as off-chain order book repeaters, Maker clearing systems, and arbitrage robots sniping orders on DEX, there have been no other extensive automation applications at the level of smart contract systems until the emergence of Gelato in 2019. This is the first real attempt to organize robot operators in a coordinated way through a smart contract agreement, rather than the uncoordinated way of the Gas auction mechanism.

Gelato’s pioneering move is to provide general automation services and match DApp developers with robot operators in a mutually beneficial way, thus greatly reducing the situation of improper coordination and loss of value to miners. Unlike Maker’s liquidator model, which is centered on Gas auctions, Gelato’s robots are coordinated in various slots, and transactions can only be executed when it is their turn.

Compared with Gas auctions, this method of cyclically allocating trading tasks has significantly improved the efficiency of widespread automation applications, because it pools robot resources in a coordinated manner and eliminates competition between robots. In addition, Gelato also began to seek to coordinate robots in the overall network, so that robot operators of all sizes and types can participate in the long-term, and it is also economically feasible. As a result, the system has become more powerful and decentralized.

Gelato was founded by Hilmar Orth and Luis Schliesske in the Gnosis full-node joint workspace in Berlin in April 2019. Gelato can be understood as the natural successor of the Ethereum alarm clock-it is not limited to simple transactions, but focuses on deep smart contract automation integration from the beginning.

Four, patching and iteration

After receiving a $1.2 million seed round led by Galaxy Digital and IOSG Ventures and after years of refinement and iteration, Gelato now has several use cases in DeFi. In particular, Instadapp (currently ranking third in the total lock-up volume of DeFi) has applied Gelato in a variety of ways. The first cooperation project between the two parties is Instadapp’s “debt bridge”, which can automatically refinance unhealthy Maker vault positions to Aave and Compound.

The next application that Gelato and Instadapp will collaborate on is to migrate Aave positions from the Ethereum mainnet to Polygon. Recently, with the launch of INST token, Instadapp has used Gelato’s G-UNI pool for its liquidity mining plan. The G-UNI pool allows users to provide liquidity in Uniswap v3 and automatically perform a number of functions, including asset reinvestment, automatic rebalancing of positions, etc.

Last month, Gelato received a $50,000 grant from Aave to build “automatic health factor maintenance” to protect users from liquidation. In addition, Gelato has been deploying its limit order function on multiple blockchain networks. This feature was first applied to the Sorbet Finance product, which took advantage of the deep liquidity of Uniswap on Ethereum and QuickSwap on Polygon, allowing thousands of users to buy on dips. In early June, its limit order function was natively integrated into SpookySwap, the leading AMM project on Fantom. In the future, Gelato also plans to launch GEL tokens and Gelato DAO.

Interpretation of DeFi Smart Contract Automation Track

Source: Sorbet Finance by Gelato

If Gelato proves anything, it is that automation cannot be classified as a limited use case. Automation covers a variety of uses ranging from automated trading strategies, debt refinancing to liquidity provider management. According to Gelato’s white paper, future use cases for automation may also include automated DAO fund management and the use of real-world events (such as a tweet) to trigger on-chain transactions. It can also provide motivation for the casting of NFT rewards based on on-chain conditions (such as visiting a certain DApp for a certain number of times).

However, Gelato is just one of the paths to automation, and other teams are also experimenting at the same time. Andre Cronje is an early fan of Gelato. He released his Keep3r Network, which he described as “a decentralized network of liquidators for projects that require external development and external teams seeking liquidation work.” Like Gelato, Keep3r aims to be an infrastructure-level project that will not directly benefit end users, but will benefit DApp developers and the entire ecosystem.

The working principle of the system is that anyone can set up and maintain liquidators, and they can perform their work by bidding on information published in the Keep3r registry. Currently, Keep3r-based projects include multiple protocols in the Year ecosystem, such as Year, Sushi, Pickle, etc. Since the network was launched, only 4 to 5 liquidators have performed the tasks provided in the network every week. According to keep3r.live, the liquidator has completed a total of 30,327 tasks and received a reward of 38,027.93 KP3R.

Recently, two proposals have appeared in the Keep3r Governance Forum: “Keep3r V2: Optimized Protocol Growth Capability” and “STABLE: Improved Keep3r-based Token Economics System”. The authors of both proposals are Luciano of DeFi Wonderland. Among them, in the Keep3r V2 proposal, Luciano discussed many improvement suggestions, including improving Gas efficiency, replacing Gas auctions with cyclic execution, separation of contract structure, faster work binding/unbinding, abandoning oracle machines, back-end improvements, etc. .

The STABLE proposal aims to create a new stable coin (STABLE) linked to KP3R’s minting/destroying mechanism, and to replace KP3R with STABLE as a work reward and punishment token. In view of the high volatility and insufficient liquidity of KP3R tokens, the purpose of this proposal is to improve the stability of liquidators. Up to now, these proposals are still in the discussion stage.

Chainlink is the latest competitor in automation and has invested a lot of resources for this. On June 7, Chainlink launched the public beta version of Chainlink Keepers. The system can automatically execute smart contract functions and perform regular contract maintenance. The latter is regarded by the Chainlink team as a major obstacle to the development of smart contracts.

Chainlink Keepers uses a cyclic system to execute transactions. This solution has long become Gelato’s standard and has recently been mentioned in Keep3r’s governance proposal. In addition, some of the use cases that Chainlink Keepers are dealing with are similar to those that already exist on Gelato, such as limit orders, automated trading strategies, and monitoring of token balances.

But Chainlink goes a step further in that Chainlink Keepers has established cooperative relationships with multiple projects including Base Protocol. Base Protocol is a token linked to the total market value of all cryptocurrencies, with an exchange ratio of 1:1 trillion. Through this cooperation, Chainlink Keepers can automatically maintain its rebase function on a regular basis and integrate it into OpenZepplin Defender, allowing projects to register and manage jobs directly on the Defender platform. Recently, they started to cooperate with BarnBridge to operate SMART Exposure, which can automatically realize the rebalancing function.

Five, smart contract automation

Chainlink has worked with Gelato and Keep3r in different identities in the past. In July 2020, Gelato took the lead in using Chainlink’s Gas price prediction machine, allowing the Gelato network’s smart contracts to maintain fair gas prices on behalf of developers and users to prevent Gelato automated robots from overcharging gas fees. Regarding Keep3r, in December 2020, Keep3r founder Andre published a blog about how to use Chainlink to extend Keep3r. In the article, he envisions that Chainlink node operators will eventually perform the work of liquidators, and existing eligible liquidators will become Chainlink node operators.

So what does all this mean?

Automation can significantly enhance the DeFi protocol, but relatively speaking, it is still a blue ocean to be developed. Over the years, people have made many attempts at automation, from simply arranging transactions to holding gas auctions. But it seems that the coordinated loop model is currently the most effective solution.

At present, the market value of DeFi has exceeded 75 billion U.S. dollars, and there are various loan agreements, and the total lock-up volume of AMM projects is close to 100 billion U.S. dollars. The functions of all these projects can be automated. They are likely to become potential users of automation solutions such as Gelato, Chainlink and Keep3r. In the future, anything that can be automated will be automated. The only question is which protocol will do this.

Author David Liebowitz, The Defiant

Thanks to Richard Lee, chain catcher for compilation

 

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/interpretation-of-defi-smart-contract-automation-track/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Leave a Reply