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

TheDefiant
2021-07-29 11:31:49
Collection
Automation can significantly enhance the experience of DeFi protocols, but relatively speaking, it is still a blue ocean waiting to be developed.

image

Original Title: 《The DeFi Future is Automated

Author: David Liebowitz, The Defiant

Translated by: Richard Lee, Chain Catcher

A race for DeFi innovation is underway, with both established players and newcomers in the running.

The Ethereum smart contract automation tool Gelato has been expanding its use cases since 2019 and launched its V1 version last July. Meanwhile, Keep3r has been executing its own solutions since late October 2020. Just last month, Chainlink also released the public beta of Chainlink Keepers in the field of smart contract automation. The prize in this race is automation, with its immense potential just beginning to be realized, from user-friendly trading strategies to infrastructure-level liquidation protection.

"Automation" can be defined as the use of bots to automatically execute software processes. Sometimes, these bots are referred to as "executors" or "keepers," and they are part of the middleware infrastructure of the blockchain stack. Middleware infrastructure is the backbone that supports the blockchain ecosystem, allowing DApps to focus on building core products and enabling end users to interact smoothly. One of the most famous examples of middleware is oracles— which fetch information from the outside world and publish it on-chain nodes, providing data for various applications of smart contracts. Currently, the total market capitalization of oracle projects alone has reached $9.9 billion, indicating the potential scale of the automation market.

1. Lack of Automation in DeFi

When it comes to smart contracts, many people believe they are inherently automated. This is far from the truth; beyond liquidation and arbitrage, DeFi clearly lacks automation. Gelato's white paper states:

"Automation is lacking due to the Ethereum Virtual Machine (EVM) itself: programs run for only a few milliseconds at a time; the continuous loops or recurring 'cron' jobs common in traditional operating systems limit miners' ability to complete state transitions and mine blocks. Therefore, these programs known as smart contracts are limited to storing state and logic, and without external impetus, they are functionally inactive. To execute the logic of these programs and change this state, an external party must first send a transaction."

As early as 2015, the Ethereum community attempted and discussed automation at the smart contract level. The first attempt was the Ethereum Alarm Clock, created by developer Piper Merriam, described as "a service that allows scheduling transactions to be executed later on the Ethereum blockchain." Motivated by a decentralized network of bots known as TimeNodes, these execution agents performed simple automated tasks off-chain, such as sending transactions at specific times.

In 2018, ChronoLogic, a partner of the Ethereum Alarm Clock, interviewed several leaders in the Ethereum community on this topic, discussing the potential of automation. Vitalik Buterin called automation "something that seems very valuable." Taylor Monahan, founder of MyCrypto, envisioned automation facilitating multi-step transactions, including executing signals from the real world (like a tweet). Additionally, Fabian Vogelsteller, the author of the ERC-20 token standard, believed automation could stimulate trading activity on decentralized exchanges, a view that was later confirmed.

However, the development activity of the Ethereum Alarm Clock later waned, with the last update on GitHub occurring over a year ago. But the value of the Ethereum Alarm Clock should not be underestimated—it was the first real attempt to achieve transaction automation on Ethereum.

The biggest problem may be that the Ethereum Alarm Clock was too ahead of its time. The project's active development period was concentrated between 2016 and 2018, but at that time, DeFi had barely emerged, severely limiting the number of use cases for the Ethereum Alarm Clock. Moreover, this protocol could only execute simple processes and could not handle complex tasks that required deep integration with smart contracts.

2. Maker Liquidators

The launch of DAI is one of the first widespread applications of automation at the smart contract level, being a decentralized over-collateralized stablecoin. The Maker system operates by generating DAI, where users must over-collateralize their assets by 150%. That is, if you want to generate $1,000 worth of DAI, you need to lock at least $1,500 worth of tokens in the vault. If the asset falls below the 150% collateralization ratio, the owner risks losing assets due to liquidation and paying penalties.

The Maker system itself does not handle liquidations but relies on an external "Maker Liquidator" system to do so. In this system, Maker liquidators bid for the rights to liquidate vaults through gas fees, with the winner implementing the liquidation and earning profits. By allowing anyone to participate in liquidation auctions, Maker itself has exited one of the most critical aspects of its ecosystem, achieving automation, and this automated system now supports billions of dollars in total locked value in DeFi. If Maker were to handle liquidations itself, it would bear the most significant responsibility as a central party in the event of a protocol failure.

Despite having its external liquidation system, in March 2020, this system encountered a systemic failure, resulting in a total loss of 5.67 million DAI for the protocol. The reason was that due to high gas fees, Maker's oracle security module was updated late, giving a few liquidators the opportunity to liquidate vaults by bidding close to zero DAI. This infamous Black Thursday failure indicates that automation is still in its early stages and requires continuous improvement. If Maker, as one of the largest and most mature projects in the DeFi ecosystem, can still suffer such widespread failure, how will smaller projects cope with similar systemic shocks?

Today, the demand for automation in the DeFi space is becoming increasingly evident, with its two biggest pain points being: how to incentivize bots in an economically sustainable way and how to adapt to the highly volatile and unpredictable gas price. Maker's gas auction system aims to address both of these barriers, but in practice, it has shown that the design of the bot ecosystem is not coordinated.

3. Bot Operators

Suppose there are 10 bots bidding for the rights to liquidate one vault. Although one bot can recoup its costs by winning the liquidation rights, the other nine bots must still pay gas fees even if they lose. Once this process is repeated over a long period, it becomes economically unfeasible for most bot operators to continue participating in liquidations.

Gas auctions are a winner-takes-all system characterized by strong competition and capital intensity. Therefore, only a small number of bot operators can survive, while most bots cannot participate. Additionally, due to a lack of coordination, gas auctions are resource-intensive, filling precious block space with failed transactions. This also leads to miners capturing most of the value from liquidations, as they determine the winners of gas auctions rather than the bot operators hoping to liquidate.

Aside from scenarios like off-chain order book relayers, Maker's liquidation system, and arbitrage bots sniping orders on DEXs, there have been no other widespread applications of automation at the smart contract system level until the emergence of Gelato in 2019. This was the first real attempt to organize bot operators in a coordinated manner through a smart contract protocol, rather than the disjointed approach of gas auction mechanisms.

Gelato's groundbreaking initiative is to provide universal automation services and match DApp developers with bot operators in a mutually beneficial way, significantly reducing miscoordination and value leakage to miners. Unlike Maker's gas auction-centric liquidator model, Gelato's bots are coordinated across various slots, executing transactions only when it's their turn.

Compared to gas auctions, this cyclical distribution of transaction tasks significantly improves the efficiency of widespread automation applications, as it pools bot resources in a coordinated manner, eliminating competition among bots. Furthermore, Gelato has begun seeking to coordinate bots across the entire network, allowing bot operators of various sizes and types to participate long-term in an economically viable way. As a result, the system becomes increasingly robust and decentralized.

Gelato was founded by Hilmar Orth and Luis Schliesske in April 2019 at the Gnosis full node co-working space in Berlin. Gelato can be seen as the natural successor to the Ethereum Alarm Clock—it is not limited to simple transactions but has focused on deep integration of smart contract automation from the start.

4. Patching and Iteration

After securing $1.2 million in seed funding led by Galaxy Digital and IOSG Ventures and undergoing years of refinement and iteration, Gelato now has several use cases in DeFi. Notably, Instadapp (currently ranked third in total locked value in DeFi) has applied Gelato in various ways. The first collaborative project between the two was Instadapp's "Debt Bridge," which automatically refinances unhealthy Maker vault positions to Aave and Compound.

The next application that Gelato and Instadapp are set to collaborate on is migrating Aave positions from the Ethereum mainnet to Polygon. Recently, with the launch of the INST token, Instadapp has utilized Gelato's G-UNI pool for its liquidity mining program. The G-UNI pool allows users to provide liquidity on Uniswap v3 and automatically executes multiple functions, including asset reinvestment and automatic rebalancing of positions.

Last month, Gelato received a $50,000 grant from Aave to build an "automatic health factor maintenance" feature to protect users from liquidation. Additionally, Gelato has been deploying its limit order functionality across multiple blockchain networks. This feature was first applied to the Sorbet Finance product, which leveraged deep liquidity on Uniswap on Ethereum and QuickSwap on Polygon, allowing thousands of users to buy at lower prices. In early June, its limit order functionality was natively integrated into SpookySwap, a leading AMM project on Fantom. In the future, Gelato also plans to launch the GEL token and Gelato DAO.

image

Gelato's launch of Sorbet Finance

If Gelato proves anything, it is that automation cannot be confined to a limited use case. Automation encompasses a variety of uses, from automated trading strategies and 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 triggering on-chain transactions using real-world events (like a tweet). It could also incentivize the minting of NFTs based on on-chain conditions (such as accessing a certain DApp a specified number of times).

However, Gelato is just one path toward automation, while other teams are also experimenting. Andre Cronje, an early fan of Gelato, launched his own Keep3r Network, which he describes as "a decentralized network of keepers for projects needing external development and external teams seeking keeper work." Like Gelato, Keep3r aims to be an infrastructure-level project that does not directly benefit end users but rather benefits DApp developers and the entire ecosystem.

The system works by allowing anyone to set up and maintain keepers, who can bid for execution work by posting information in the Keep3r registry. Currently, projects based on Keep3r include several protocols from the Yearn ecosystem, such as Yearn, Sushi, and Pickle. Since the network's launch, only 4 to 5 keepers have executed tasks provided by the network each week. According to keep3r.live, keepers have completed a total of 30,327 tasks and earned 38,027.93 KP3R in rewards.

Recently, two proposals appeared in the Keep3r governance forum: "Keep3r V2: Optimizing Protocol Growth Capacity" and "STABLE: Improved Tokenomics System Based on Keep3r." Both proposals were authored by Luciano from DeFi Wonderland. In the Keep3r V2 proposal, Luciano discussed many improvement suggestions, including enhancing gas efficiency, replacing gas auctions with cyclical execution, separating contract structures, faster task binding/unbinding, phasing out oracles, and backend improvements.

The STABLE proposal aims to create a new stablecoin (STABLE) linked to the minting/burning mechanism of KP3R, replacing KP3R as the reward and penalty token for work. Given the volatility and liquidity issues of the KP3R token, the purpose of this proposal is to enhance the stability of keepers. As of now, these proposals are still under discussion.

Chainlink is the latest competitor in automation and has invested significant resources into it. On June 7, Chainlink launched the public beta of Chainlink Keepers, a system that automates the execution of smart contract functions and regularly performs contract maintenance, which the Chainlink team views as a major obstacle to the development of smart contracts.

Chainlink Keepers employs a cyclical system to execute transactions, a solution that has long been a standard for Gelato and was recently mentioned in Keep3r's governance proposals. Additionally, some use cases that Chainlink Keepers is handling are similar to those already existing on Gelato, such as limit orders, automated trading strategies, and monitoring token balances.

But Chainlink goes a step further by establishing partnerships with multiple projects, including Base Protocol. Base Protocol is a token pegged to the total market capitalization of all cryptocurrencies, with an exchange rate of 1:1 trillion. Through this collaboration, Chainlink Keepers can automatically maintain its rebase function regularly and integrate into OpenZeppelin Defender, allowing projects to register and manage jobs directly on the Defender platform. Recently, they began collaborating with BarnBridge to operate SMART Exposure, a product that automatically implements rebalancing functions.

5. Smart Contract Automation

Chainlink has previously collaborated with Gelato and Keep3r in different capacities. In July 2020, Gelato was the first to use Chainlink's gas price oracle, enabling the smart contracts of the Gelato network to maintain fair gas pricing on behalf of developers and users, preventing Gelato's automation bots from overcharging gas fees. In terms of Keep3r, in December 2020, Keep3r founder Andre published a blog about how he intended to use Chainlink to scale Keep3r. In the article, he envisioned that Chainlink node operators would eventually perform the work of keepers, while existing qualified keepers would become Chainlink's node operators.

So what does all this mean?

Automation can significantly enhance DeFi protocols, but relatively speaking, it remains a blue ocean waiting to be developed. Over the years, there have been multiple attempts at automation, from simply scheduling transactions to hosting gas auctions. However, it seems that the coordinated cyclical model is currently the most effective solution.

Currently, the market capitalization of DeFi has surpassed $75 billion, with the total locked value of various lending protocols and AMM projects approaching $100 billion, all of which can have their functionalities automated. They are likely to become potential users of automation solutions like Gelato, Chainlink, and Keep3r. In the future, anything that can be automated will be automated; the only question is which protocol will achieve this.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators