: Vested Interest Disclosure The author is an independent contributor and has a vested interest in the company/ies mentioned in this story through direct compensation, media partnerships, or networking. HackerNoon has reviewed the story for quality, but the claims hereon belong to the author. #DYOR It’s easy to forget how, not too long ago, web3 tooling felt like a time-intensive, debug-crazy endeavor. As the community grows, to solve the problems devs face when developing on blockchain. One such problem is the by smart contracts. new solutions arise lack of auto-execute methods calls The awareness of automation has been increasing since 2015, with the first attempt being the Ethereum Alarm Clock project. However, it was the that made clear the to simplify the adoption of . Defi explosion imperative need smart-contract automation A more in-depth explanation of the smart-contract automation genesis can be found at blog by David Liebowitz. David presents the three main solutions: The DeFi Future is Automated Gelato Ops by Network (production ready in July 2020) Gelato Network (since October 2020) Keep3r by Chainlink (open beta June 2021) Keepers We are going to analyze these solutions and include the one provided by Open Zeppelin: & Relayers, Defender by Open Zeppelin Autotasks : Although this analysis was commissioned by Gelato, all research was conducted independently and the conclusions are my own. Disclaimer Setting the scene When you participate in a hackathon and you want to integrate a protocol/solution to your project, you require four things docs are your best friend- this includes everything from good online documentation to tutorials, and even covers responsiveness in Discord channels or other forums when you have technical questions or are simply looking for guidance. 1) Resources: for this experience to be optimal there are a few things to consider, such as: 2) Build & Test- Whether you can create the task easily or if you have to first use additional resources that aren’t relevant to your task If you can find helpful templates or code snippets Whether the payment information is clearly displayed and easy to understand. If the solutions are deployed on different testnet If specific tokens are required, are faucets available? Can you test the full use case in a forked hardhat node or simply deploy it to testnet? - the main question to consider here is not only whether the solution is providing the (sometimes devs think that is finished when it is coded), but also other aspects that may influence : 3) Features automation you need for your project scalability and user adoption when moving to production Are there fees to be paid? If so, how much? Can the user pay with different tokens, and are alternative options for paying? Does the solution prevent ‘front running out of the box? Does the solution notify users when funds are running low? One crucial aspect of the features is the solution’s ability to provide the Though this isn’t relevant for the job itself, it can impact scalability when moving to production (after all, decentralization is sacred in web3) executors/keepers in a decentralized manner. : 4) Dashboard & UI Is there a dashboard where you can track the logs of executions How can you track tasks/jobs created by a smart contract? Showcase Projects We are going to test the solutions mentioned above in two different use cases: Increase counter, a classic hello world smart contract automation example, increasing a counter when a specific time has elapsed (or condition is met). a) Maintenance Task Examples: One shot and cancel, dynamically create and cancel the task. As the ecosystem grows, I imagine we’ll see an explosion of different use cases where we’re required to control our tasks programmatically. We will implement this use case only in Gelato and Chainlink Upkeep. b) On the Fly: The GitHub repo can be found . here Gelato Network How it works First, users complete through the The UI is pretty intuitive and asks for the contract address and the function you want to automate, in case the contract is not verified, you will have to provide the abi. registration . Gelato Ops UI We have three choices of triggers, time elapsed (run every n-time), whenever possible, and through a custom logic condition within a resolver contract (it can be the same as the execution contract). Gelato offers the ability to (if needed) . This is done , which comes in handy for automating tasks of already deployed contracts with custom logic. split the execution logic from the condition logic by creating a resolver contract Findings Very clear and to-the-point documentation is available. However, more “target to learn” resources with specific features will speed up the development process. There are testnets available, and development on a hardhat forked network is very easy, you just have to impersonate Gelato’s contract address. One very powerful Gelato feature is , which gives users the ability to create/cancel tasks within a smart contract. Gelato Network provides decentralized execution through a whitelisted set of Node Operators and plans to have achieved the ability to have, programmatically, full control over the tasks full permissionless decentralization by mid-2023 For the time being Gelato Network to the transaction cost. Gelato offers the possibility to deposit funds (like ChainLink or OZ Defender) but also doesn’t add any fee the ability to pay independently for each transaction. Gelato ensures privacy by submitting transactions through flashbots . It also provides users with a very for when users are running into low balance. enabling front-running protection simple interface to set up a Discord or Telegram notification bot Gelato provides an for registering and controlling the execution of the tasks. You can find jobs by the connected wallet or “on the fly tasks” by searching the input contract address. The UI also provides the to understand when a transaction reverts. intuitive UI dashboard transaction logging Showcase Contract Increase Counter: Contract verified on Mumbai Gelato Ops Ui with logs Showcase Contract Create and Cancel Task: Contract verified on Mumbai Gelato Ops Ui with logs The task has been created with the createTask() and was paused after one execution. Keep3r network How it works At a first glance, Keep3r appears to be similar to Chainlink UpKeep or Gelato. The first step is to, register your job in the , and then implement a specific interface in the contract defining the Keep3r Network UI conditions and providing the execution logic However, the similarities end here: The way to pay the keepers/executors is very different from other solutions, as users pay the keepers with the yield accrued in a pool where the user provides liquidity. In order for the keepers (Keep3r network provides decentralized execution) to pick up your job, users have to publish an npm package with specific scrips (there is a Keepers-Cli-Boilerplate that you have to fork and merge). Findings Although the developer experience is really tough, with almost no detailed docs/tutorials on how to implement a job, within the forum and discord, (user wei3erhase supported my tests). the Defi Wonderland Team provides excellent support This solution is focused on maintenance/pre-programmed tasks. (although feasible) I don’t believe that the implementation of this solution as the infrastructure of keep3r requires off-line manipulation. For very dynamic scenarios is fit for purpose Guided tutorials and “easy to find” test addresses would be beneficial. The key feature of the Keep3r network is the implementation of the payment option by the yield accrued into a pool. This allows users to and in the future. provide liquidity one time doesn’t require any funds Keep3r and encourages every user to join. Though it may appear complicated at first, in the frame of this post, I’ve been able to understand the structure and how it works, and have simulated a task execution with the CLI (I could join the network as a Keeper) is a pure decentralized network Keep3r ensures privacy by submitting transactions through flashbots . enabling front-running protection Keep3r Network with more documentation targeted to “no pro” developers. could increase user adoption by improving the Ux experience Increase Counter: Contract verified on goerli Npm Package with job Chainlink Keepers How it works First, users will need to an “Upkeep” (task/job) within the Chainlink Keepers Network in the , and then connect their wallet. register keepers UI We can define the time interval to trigger the Upkeep or specific custom logic with a condition, for this later case we are required to inherit the KeeperCompatible interface into our contract (it’s a very simple interface with two functions and the required addresses). Within the UI we will need the contract address and if it isn’t verified we will be prompted to input the method’s abi. In order to finish the registration, you can input your email for notifications. You will be notified when funds are low. Findings The Chainlink ecosystem is also very well documented and there are a lot of resources, tutorials, and posts. However, it would be helpful if there were more documentation and tutorials for “on the fly” tasks. Implementing recurrent automation is quite straightforward and easy to understand. The fees on mainnet amount to 20%. As in other applications within Chainlink, . More flexible payment methods would be beneficial. you will need LINK to operate Both testnets and faucets are available. If you want to develop locally with a forked network, although this feasible (you will have to deploy it locally using a Chainlink node), it can be cumbersome if you haven’t done it before. is Chainlink Keepers have started to provide the . So far the functionality only allows users to create a task within a smart contract with specific custom logic. If a use case requires a time interval or only one run of the job, users will have to code it within the condition or execution logic. As developments occur very quickly in web3, I will have to review this post in the coming weeks to update the available features. ability to control the tasks programmatically The way to set multiple Upkeeps to the same contract is by passing custom checkDataparam to the checkUpKeep(bytes checkData) and performData into performUpKeep(bytes performData), in very dynamic use cases this architecture doesn’t help devs like me to have cleaner code. On the other hand, this architecture allows and only passing within the performData the required data for the performUpKeep() execution. the offsetting of some gas-intensive calculations off-chain Gelato Network provides decentralized execution through a whitelisted set of Node Operators. Chainlink provides a for registering/controlling the execution of the tasks. very intuitive dashboard UI The dashboard shows the UpKeeps registered by the connected wallet. Moving forward it will help devs to implement a search functionality by contract address for “on the fly” created tasks. ChainLink summary Official feedback from Chainlink is still pending, therefore my comments and analysis may change in the future. Showcase contract increase Counter: Mumbai Contract verified on UpKeep UI & Logs Create and Cancel Task: Contract verified on Rinkeby UpKeep UI & Logs Open Zeppelin How it works Users need to a in charge of the execution and an . Within the autotask, define the under which the task has to be triggered (by time or webhook) and any custom logic needed to define the register relayer autotask conditions execution. The relayer and autotask registration (shown below) are done through the defender UI where you’ll need to create an account (web2 email/password), the autotask can also be created, updated, or deleted through a POST API call. Open Zeppelin Findings Starting to learn and build with the Open Zeppelin is very rewarding, as guidance is concise, easy to understand and very well documented. The proposed solution makes it very easy to create recurring tasks that are triggered every n- time. One very interesting feature proposed by Open Zeppelin is the ability to , which fits very nicely with the sentinel ability to be notified when events on-chain happen. trigger the autotask by a webhook Open Zeppelin does “out of the box” to create and cancel a task on the fly from a smart contract. The between two triggers , a smaller interval can be achieved by a never-ending loop. not allow minimum time is one minute The solution does not provide a decentralized execution. Open Zeppelin summary Official feedback from Open Zeppelin is still pending, therefore comments and punctuations may change in the future. Showcase contract Increase Counter: Logs screenshot (required login) Contract verified on Mumbai Summary Averaging the different punctuations we could create the following representation: To conclude, there is a healthy and performant automation ecosystem in web3. All solutions provide the automation as expected, the overall numbers of automation transactions are increasing and communities are growing very quickly. After my personal experience testing the four solutions, the above picture accurately represents in UX. my view of Gelato Network being one step ahead It is important to mention that some of the solutions are under heavy development, and therefore some of the features and punctuations may change in the coming weeks and months Thank you for reading!! If you have questions or comments, please connect with me on twitter @donoso_eth Resources Gelato UI Gelato docs Gelato web Keep3r Network Frontend Keep3r docs Keep3r Job Status Chainlink Keepers UI Chainlink Keepers docs Chainlink Keepers web Open Zeppelin Defender UI Open Zeppelin Defender docs Open Zeppelin Defender web Showcase Contracts Increase counter: Gelato: Contract verified on Mumbai Keep3r Network: Contract verified on goerli Mumbai Chainlink Keepers: Contract verified on Open Zeppelin Defender: Contract verified on Mumbai Create and cancel task: Gelato: Contract verified on Mumbai : Chainlink Keepers Contract verified on Rinkeby Github repo: link Also Published Here