Comparison of Scheduling of Transactions in Ethereum: Aion Scheduling System, Ethereum Alarm Clock, Oraclize.
By: Jaime Delgado
Tags: Trustless, Smart Contracts, Ethereum, Blockchain, Scheduling Transactions

Photo by Sonja Langford on Unsplash

Smart contracts in Ethereum, in contrast to other types of programs, do not run perpetually. Instead, the code in the smart contract needs to be triggered by externally owned accounts (EOAs) or other contracts, that are themselves triggered by EOAs. This makes it impossible to schedule, within the network, the execution of functions for a particular time point in the future.

Solutions to this have been developed on top of ethereum which require a third party to commit to the execution of the tasks on behalf of the users. This article describes features that are desired in a scheduling system and several services for that end that are available in Ethereum (main and test networks).

Desired features in a scheduling system.

The capability of scheduling arbitrary bytecode transactions: this allows the execution of any function in any contract in the network making the system fully flexible. Users can then provide the address and function’s description. The scheduling system then triggers the corresponding contract at the required time. Trustlessness: the system should provide security and users should not need to rely on the third party that executes the transaction. Modifying the transaction data passed by the subject should be impossible. Furthermore, the system should only be capable of charging fees if the execution of the task has been performed. Low gas cost: depending on the application at hand, a smart contract may require recurrent scheduling. Therefore, a low cost associated with the programming of transactions is not only desirable but necessary. This involves the fee charged by the third party and the gas consumed during the scheduling of the task (storage of transaction data). Reimbursement of unused gas: The system should have the capability of returning the gas that the users provided but was unused to execute the transaction. This allows users to pass more than necessary gas, avoiding possible “out-of-gas” exceptions. Decentralization: this is a desired feature which ensures that even if the third party in charge of the execution of the task disappears or is not available, any other person/entity in the network could take over, having the fee paid by the users as an incentive. On the other side, having an institution committed to executing the transactions has been proved in recent years to be a feature that developers accept despite the risks described above (See Oraclize below).

Available systems in the Ethereum Network.

Table 1 shows three systems currently operational in Ethereum for the scheduling of transactions: Aion Scheduling System, Ethereum Alarm Clock, and Oraclize.

Table 1. Comparison of transaction scheduling services in the Ethereum network.

Aion Scheduling System:

Website: https://aion.ethpantheon.com

Availability: MainNet and Ropsten.

Aion allows arbitrary byte-code transactions in a trustless setup. The average gas cost for ether transactions is low, about 70.000 gas. Estimation of the unused gas in made on-chain and the gas unused is returned to the user. System’s fee is 0.00012 Ether per transaction (about 2 cents of a dollar). The execution of the tasks is controlled by the developers (ETHPantheon). Currently, a discussion for allowing anyone to become an executor in Aion is taking place in Aion’s Github page.

Figure 1. Example of an Ether transaction scheduled using Aion in Ropsten: Gas used: 67,663.

Ethereum Alarm Clock:

Website: https://www.ethereum-alarm-clock.com

Availability: MainNet and Kovan.

EAC allows arbitrary byte-code transactions in a trustless setup. The average gas cost for ether transactions is very high, about 550.000 gas. Estimation of the unused gas is made on-chain and the gas unused is returned to the user. EAC uses bounties to incentivize executors (time nodes). Chronos app from Chronologic uses EAC requiring a minimum fee of 0.02 Ether per transaction (about 3 dollars) which make this prohibitively expensive for recurrent calls. However, the integration of EAC with MyEtherWallet allows lower fees. It is worth mentioning that the nodes may reject a scheduled transaction that has a low bounty. The system is decentralized, however, if a person wants to become an executor, in the Chronologic app, he/she should buy and hold “Time” tokens from Chronologic.

Figure 2. Example of an Ether transaction scheduled using EAC (Chronologic) in Kovan: Gas used: 538,893.

Oraclize:

Website: http://www.oraclize.it

Availability: MainNet, Ropsten, and Rinkeby.

Oraclize provides oracle services and is not a scheduling system per se. The use as such is because the data feed of the oracle can be delayed, which allows it to be used as a transaction scheduler. It doesn’t allow arbitrary byte-code and the set-up is not trustless. In particular, Oraclize could change the fee value at any time and at any value. However, the system has been online for several years, and users trust it. Oraclize is one of the most used oracles in Ethereum. Gas cost is low. Fees are variable with values from 1 to 5 cents of dollar depending on the task. The execution of the transactions is controlled by the developers (Oraclize -provable-)

Figure 3. Example of a transaction scheduled using Oraclize in Ropsten: Gas used: 68,660.

Summary

There are several services to schedule transactions; some of them do not require the users to trust the system (Aion, EAC) others do (Oraclize). Oraclize is the most used service in the network. Aion has the most optimal gas consumption while being trustless. This is because the amount of stored data in the network is reduced to the strictly necessary, making a difference bigger than 7x in gas consumption compared to EAC (see Figure 1 and Figure 2). On the other hand, EAC is decentralized while Aion is starting the process to allow any interested party to become an executor. Aion will not require executors to buy tokens to be able to participate in the system. It may be unfair to include Oraclize in this comparison as their service goes beyond scheduling of transactions, but as this is one of the most used services, including it was necessary to provide a picture of the state of the network in this matter.