Back to Home

CallLib

DAO / Governance
Part of The Piper Merriam Collection
0x1deeda36e15e...4803ae45fc80
FrontierContract #7,495Source VerifiedEdit this contract
Deployed January 31, 2016 (10 years ago)Block 930,477

The execution and payment engine behind Piper Merriam's Ethereum Alarm Clock, which paid strangers to press a button at a future block.

Frontier EraVerified Source

Historical Significance

This is scheduled execution on Ethereum, built in January 2016, years before keeper networks were a category. The problem it solves has never gone away: subscriptions, recurring payments, liquidations, anything time based needs an economic reason for a third party to submit the transaction, and the modern automation services are answering the same question CallLib answered here.

The claim auction is the part worth studying. Paying the first executor to arrive invites a gas war at the target block, where the winner's profit is competed away and the chain absorbs the waste. Selling the right in advance, at a price that rises the longer nobody takes it, finds a willing executor without the race. That is a considered piece of mechanism design at a time when most contracts were still working out how to hold a balance safely.

Context

The Alarm Clock did not start here. Four contracts named Alarm were deployed by the same author between September and December 2015 and are documented separately in this archive. This January 2016 pair is the rewrite that broke the service into linked libraries.

CallLib went out at 03:43:48 UTC on 31 January 2016, and SchedulerLib followed 34 seconds later. They are two halves of one deployment and one design.

The author, Piper Merriam, hardcoded his own address into the FutureCall contract as a constant named creator. He went on to write py-evm and much of the Python tooling the ecosystem still runs on.

Key Facts
Deployer
Piper Merriam(0xd3cda9...293601)
Deployment Block
930,477
Deployment Date
Jan 31, 2016, 03:43 AM
Code Size
4.8 KB
Gas at Deploy
1,320,077
Transactions by Year
20261

Description

Ethereum has no timer. Nothing runs unless somebody sends a transaction, so a contract that wants something to happen next Tuesday has to make it worth a stranger's while to show up and trigger it. CallLib is the half of the Alarm Clock that handles that transaction: what the scheduled call is, who has the right to make it, and what they get paid.

A scheduled call is a Call struct holding the target address, the ABI signature, the calldata and value, the gas the call will need, and the gas price it was anchored to. Alongside that sit three fields for the executor: claimer, claimAmount and claimerDeposit.

The claim is the interesting part. Rather than a race at the target block, execution rights are auctioned in advance over a CLAIM_GROWTH_WINDOW of 240 blocks, during which the amount a claimer may demand rises gradually toward the full basePayment. Claiming early means accepting less, so an executor willing to work cheap takes the job first and nobody burns gas competing at the last moment. Claiming stays open for a further 15 blocks, and then a BEFORE_CALL_FREEZE_WINDOW of 10 blocks locks everything, claiming and cancellation alike, so the terms cannot shift under an executor who has committed a deposit.

Two details date the code precisely. It tracks requiredStackDepth, a defence against the call depth attack that EIP-150 made obsolete later that year. And the source carries its own deployed address in a comment above the library, 0x1deeda36e15ec9e80f3d7414d67a4803ae45fc80, because a library has to be linked by address and there was nowhere else to write it down.

Source Verified

Etherscan verified
Heuristic Analysis

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

Detected Type: DAO / Governance

Bytecode Overview

Opcodes4,932
Unique Opcodes222
Jump Instructions260
Storage Operations102

External Links

Related contracts