Interview with Piper Merriam of Ethereum Alarm Clock at DEVCON1 in London

10 Dec 2015 · 14:28

Piper Merriam, creator of the Populus IDE and Ethereum Alarm Clock, explains at DEVCON1 in London how his system of smart contracts lets users schedule future transactions on Ethereum, such as triggering a payment days in advance. He covers how the design stays trustless and decentralized, the incentives that compensate the maintainers who keep scheduled calls running, and where the project could go next.

Speakers

Topics

Transcript

for first interview at the etherium DEFCON I'm interviewing Piper Miriam who has a very interesting project called the etherium alarm clock you know she'd given function calls before we go into my labs I'm from Boulder Colorado I've been a web developer for five or six years now and always interested in crypto stuff when Bitcoin came around it was fascinating and when he theorem came around I sort of bit a lot harder and started into it so log in there's no way for contracts on aetherium to wake up on

their own any execution of contract function calls has to be executed by some into the outside of the network so for contracts to truly be autonomous there are things like scheduled payments or a really good example where a contract needs to execute something at a later time and what the theory and mälaren clock does is set up a marketplace where contracts can pay somebody to trigger their execution at a time specified in the future so for instance let's take an example let's take the example of me wanting to make monthly payments from my rent in in

ether so the 28th of every month I want to make a monthly payment and before the start of the year I want to put 12 months worth of rent into a contract and then have the contract pay out each month to my put my landlady that that kind of thing would be a.m. o'clock right absolutely right now there's no support for recurring calls but it's very much a thing that's planned but even right now you could still do that you would deploy a wallet that wallet you would configure it so that it would accept function calls from the ethereal arm o'clock address and essentially at the time of

deployment you could schedule all 12 of those payments has an initializing action or you could deploy it and schedule them yourself and essentially you provide all of that gas money up front you put enough money in the wallet and and on at those times somebody hopefully picks up that that call an issue initiates it for you and gets whatever payment you've set aside for them so in in a sense like the tedium alarm clock is a basic infrastructure that future financial applications would need in order to trigger trigger actions on the blockchain at certain predefined

times yeah it's it's something that I've thought about a lot that I I want it to be a base level piece of infrastructure and because of that I've tried to build it in a fashion where I don't own it I want it to be something that's very publicly owned that people can get behind and use without feeling like there's some corporate interest involved or things like that so all of the design of all of the contracts involved there's no special access for me and the deployment that I put out today removes all of the compulsory payments going to me so starting today you can do scheduled calls that don't pay me

anything and that's fine that's your choice so I wanted to be something that people are comfortable getting behind as a as a foundational service for contracts so let's let's walk through how how the clock would work so suppose I make a scheduled call to pay my to pay my monthly rent to my landlady now who which contract to interact with and actually actually making the when the when the time comes which person is actually putting the transaction that pays the money to my land so if you set up a transaction scheduled called today then I will be the person who ends

up executing that call the alarm clock is set up so that anybody may do that but as of right now it's a very new service and I have nobody else has turned on a server to do it it's not surprising it's a very new thing so essentially you or the contract it doesn't matter can set up that scheduled call essentially you put you provide the alarm clock service with the without getting into too much detail with the information it needs to call your function it deploys a standalone contract that you basically own you're able to kill it at any time you want and get all your money back things like that and that contract sits there waiting to be called I have a service running that

is monitoring for upcoming scheduled calls and when the time comes when the block comes that you want that call to be executed it will pick it up ping the service all of that data that you gave it that represents the function call is is executed against your contract and I get my fee my payment that you set aside for me and all of the extra gas money that wasn't and I get all the gas money that that the gas expenditure for exit executing that is paid back to me and then all the rest of the money goes right back to you immediately okay so is the plan in the future to have so essentially what you're saying is right now the person actually executing a

shity will call is centralized that is you but do you plan to make it decentralized in some fashion in the future absolutely so the only reason that it's centralized is because there is only one node in a distributed system so there is no centralization in the sense that my server that's executing transactions is special it's just that I'm the only one doing it so anybody made may execute transactions anybody may make money by executing other people's function calls I'm just waiting for the second person to step in and do it and the reason that it's probably not happening is because there's no

documentation on how to run that and that's something that I'm just one guy and I am working my way through the things that I know need to be done for the service and that one's somewhere soon but I haven't gotten into it yet so so the way it would work is if if I I should use a function call with your service and then let's say instead of one person making actually D calls there are hundred people in the world that are interested in this line of business so let's call them x1 until X X 100 so they're 100 people or hundred nodes let's say that one they wanted to do then how does this system select which one of these nodes will actually get to make the call and how does it ensure

that one of them will make the call so there is no assurance that somebody will make the call and as much as I don't like having to say that it is a fact there is no way to guarantee that somebody will call your function and there's also as a network level thing there's no way to guarantee that a transaction will be included in a specific block but the thing that alarm clock does is a set up sets up a real guaranteed financial incentive for people who are willing to sit on the other side of the service to execute them for you I've been talking to a couple of the other app developers some people that consensus and essentially

there's a number of apps that are being set up right now where each where the company itself is setting up their own version of this for their app I know that Oracle wise it has something like this sitting behind their application that does that picks up things that need to happen execute them and then returns the value at a specific time Oracle eyes it probably has a number of servers putting it at that and so they have a couple of servers and those calls are as reliable as those servers if Oracle eyes it chose instead to use alarm clock then they would have that

same level of reliability of their servers plus one because I have a server running too and so as more people pile on and choose to use alarm as their infrastructure rather than building their own infrastructure that now the third person to pile on has all of the reliability added by Oracle Isaac and myself and theirs and Oracle eyes it now has even more reliability because now that there's a third so this is that there's this sort of snowball effect that hoping will happen okay so so what you're saying is essentially once there are thousands of people who are in the business of executing calls for other

people then we can be pretty sure that at least one of them will execute it on time the point where there's at least five or six at that point the reliability is going to be extremely high absent large scale problems like like client issues or things like that at the point where there's where there's you know five or six people servers out there you essentially need a failure of all of those servers at the time near calls supposed to be scheduled before your call to not be scheduled executed and there's also a lot of strong guarantees built into the service that

no entity is capable of censoring your contract it's not possible for somebody to to to make sure that you're called doesn't happen there's a lot of strong guarantees that I'm trying to offer and and I anyways there's a lot of strong guarantees around you will get paid for executing calls and and from the scheduler side well I can't guarantee that it will get called I can guarantee that there won't be any manipulation of the call so so so let's say let's say now I want to go and open our schedulers business which means I want to become a person who executes other people's calls and earns money

every time I execute and that's smart I want to be I want that to be my living so what kind of infrastructure and what kind of capabilities do I need on my end to become one you could run it on your home computer but you need something that's gonna be online all the time if you want to do something the the the the need of the machine that's running and executing service is very low I'm running mine on an Amazon ec2 instance it's the smallest instance type available and it runs just fine it has a GIF node installed and running on it and a Python script that's managed by supervisor that Python script is open

source it's in the main repository for alarm clock which is also open source and while there's no documentation on how to run it it is absolutely something that somebody could take two day install on a server turn it on and start theoretically making money executing people's calls what kind of apps have actually used your infrastructure or I are in the process of building stone I know of two one of them is my own which is essentially just something that I put out there each time I deploy a new version verifying that the service is up and running and working as expected and there's one that was supposed to on reddit last week or the week before

which essentially is it's a guy wanted to see what it looked like to tie three different services together so it uses ether dice it Gamble's and in the event that and then it schedules a transfer to happen later and at that time alarm clock calls the service and if there's money in the service because it won because of either dice then that money is sent through a Bitcoin relay to a Bitcoin address well that's that's a really cool idea really excited to see that they had done it so basically they what the made was a gambling contract where somebody could just put money in the gambling contract

if he wins he gets that those funds in Bitcoin and the way it works is it uses its helium alarm clock to trigger the transfer to a Bitcoin address yep yes so essentially when that alarm clock call comes in if if he got lucky on either dice then it takes that ether and transfers it out of the network and into through a Bitcoin relay cool so how can how can the viewers find out more about a TDM alarm clock I try to focus really heavily on good documentation making it easy for people to pick it up and use it there it's etherium - alarm I just forgot my url anyways you can google it it's gonna be

the first thing that shows up etherium alarm clock it's better than me rambling off a URL anyways the there's clear links to the documentation if you look in the actual github repository there's lots of example contracts in my tests example implementations of things that that use alarm and dirt is and as well as good example in implementations it's something that you don't have to trust there's very thorough instructions on the main website for how to verify the source code of alarm clock sounds a lot before joining us thank you thanks for having me