Gelato series: Part 1

1. The missing piece of Smart Contract: Automation

Automation is a concept that is already common in modern finance. However, in the crypto space, aside from specialized bots for market liquidity or arbitrage, it has been absent from decentralized finance (DeFi) applications running on public blockchains like Ethereum. The reason for this lack of automation lies in the Ethereum Virtual Machine (EVM) itself: programs run for only a few milliseconds at a time; persistent loops or “cron” jobs that continuously repeat, typical in traditional operating systems, restrict miners from completing a state transition and thus mining a block.

image

Therefore, these programs - what we call smart contracts - are limited to just storing state and logic. Without an external catalyst, they cannot function at all. To implement their logic and change their state, these contracts require an external 3rd party to send a transaction in for them to process.

Let's take a similar real-life example to better understand smart contracts. A company contracts to pay employees daily instead of just once per month. However, if no one submits a transaction to execute the logic of that particular smart contract, then in reality, no salary payments will actually happen.

Similar to fuel-powered machines, smart contracts cannot function on their own. They require a lot of external factors, such as:

  • To fill up the fuel tank => To pay for gas on Ethereum
  • To ignite the engine to start the machine => To send a transaction to the smart contract.

For the time being, this restriction still exists. And nothing else but it is the reason why most regular dapp users still conduct most interactions manually.

Ethereum is lacking a common infrastructure for asynchronous transaction execution that makes automatically executing logic on smart contracts possible and easy for everyone without the need to rebuild specialized systems, separately for each desired function each time.

2. It's not an Automation - It's a Bot!

If smart contracts really do nothing without a previous manual impulse sent by an external account, how come some transactions like liquidation of margin positions seem automatic? What happened? Many users often have the misconception that these smart contracts execute transactions on their own. While in essence these tasks are operated by external organizations. It's just that they run specialized bots in the background to facilitate execution and give the impression of smart contract automation.

The most famous example of this is the MakerDAO system where users can lock ETH as collateral to borrow money. If the ETH collateral drops the equivalent USD value below a certain threshold, the user's position is automatically liquidated and the outstanding debt is therefore paid.

However, these liquidations must first be initiated by specialized bots known as “Maker Keepers” operated by competing individuals and organizations performing this liquidation outside the system. For each successful liquidation, these bot owners can be rewarded. Most importantly, without the people behind the bot, the bad debt positions would never be liquidated and the entire MakerDAO system would collapse - and with it an ecosystem of Ethereum dapps built. built on that basis.

Liquidation bots are just a small application in an external bot system. There are countless other problems currently being tackled by special purpose bots giving users a false impression of mass automation on smart contract protocols.

3. The Need for a Decentralized and Reliable Network of Bots

In the case of the Maker protocol, to ensure that Keepers properly executes the smart contract, they have to invest a lot of time and resources to build a system that is decentralized, reliable, and ensures transactions always performed as intended. It is therefore obvious that the Maker developers know that the core development team alone cannot afford to maintain this infrastructure.

Being forced to trust centralized parties to conduct user transactions severely reduces the benefits such as censorship resistance and the lack of trust that made Web3 applications so appealing in the first place. Developer teams are taking risks to serve their users, as their infrastructure can lead to millions of dollars in losses in the event of certain transactions not going through.

The strength and reliability of a decentralized Dapps is measured by its most vulnerable link. Even established projects like MakerDAO have experienced issues with bots that are supposed to secure their systems, resulting in Maker protocol users losing around $5.4 million in March 2020.

This incident shows that even sophisticated systems like Maker's are prone to failure. Not to mention well-funded projects for the time being, the question is how can smaller projects that don't have the necessary capital to provide certain automated trading executions to clients? Without becoming a central bottleneck and having to run, monitor, and maintain the necessary technical infrastructure 24/7? Even for larger teams with significant resources, this has become a challenge, as dedicated teams must be hired to ensure that these bots are up and running.