Back to Home

Alarm

Utility
Part of The Piper Merriam Collection
0xdb15058402c2...04b1fbeea10b
FrontierContract #1,845Source VerifiedEdit this contract
Deployed October 8, 2015 (10 years ago)Block 353,876

The scheduler of the Ethereum Alarm Clock: it holds deposits, records calls against a future block, and pays whoever executes them.

Frontier EraVerified Source

Historical Significance

The Ethereum Alarm Clock answered a problem the EVM has by design: nothing on chain runs unless an account sends a transaction, so a contract cannot wake itself at a future block. Piper Merriam's answer was to pay whoever does send it. A scheduler holds the requester's deposit, anyone may execute the call once its block arrives, and the executor is reimbursed for gas plus a margin. That shape, a public bounty for executing someone else's scheduled work, backed by bonded callers who get first refusal, is the one keeper networks settled on later.

Context

The Alarm Clock was built on mainnet through the autumn of 2015, and each revision was deployed as a complete new set rather than upgraded in place, so several generations of the service sit on chain side by side. The code is Frontier Solidity: no events are emitted, the log statements are commented out, and a failed check signals an error by reading past the end of an empty array so the transaction consumes its gas and reverts.

Key Facts
Deployer
Piper Merriam(0xd3cda9...293601)
Deployment Block
353,876
Deployment Date
Oct 8, 2015, 07:25 PM
Code Size
10.8 KB
Gas at Deploy
3,121,166
Transactions by Year
20152
20162

Description

Alarm is the scheduler at the centre of the Ethereum Alarm Clock, Piper Merriam's service for making a contract call happen at a chosen future block. An account deposits ether, registers the call data it wants sent, then schedules a call by naming a target contract, a four-byte signature, a hash of that data, a target block and a grace period. Scheduled calls are held in a binary tree ordered by target block, so a caller can walk forward to the next block that has work waiting.

Once the target block arrives anyone may execute the call. The scheduler checks the window, confirms the scheduling account can still pay, asks the caller pool whether this block is reserved, and forwards the call through one of two relay contracts depending on whether the target had authorized the scheduler. It then measures the gas the execution consumed and pays the executor out of the scheduling account: the gas cost scaled by a factor that shrinks as the executor's gas price rises above the price paid when the call was scheduled, plus one percent, with a further one percent kept as a fee.

Its constructor deploys two relays and a caller pool, so a single transaction puts four contracts on chain. The fee address is a constant compiled into the code and there is no administrative function of any kind: nothing about a deployed scheduler can be changed.

Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Utility

Bytecode Overview

Opcodes11,065
Unique Opcodes253
Jump Instructions629
Storage Operations328

External Links

Related contracts