Papers1 provider Ā· 1 record
January 11, 2018Ā· arXiv (Cornell University)
preprint
Open access

Online Detection of Effectively Callback Free Objects with Applications\n to Smart Contracts

Authors:Shelly GrossmanIttai AbrahamGuy Golan-GuetaYan MichalevskyNoam RinetzkyMooly SagivYoni Zohar

Abstract

Callbacks are essential in many programming environments, but drastically\ncomplicate program understanding and reasoning because they allow to mutate\nobject's local states by external objects in unexpected fashions, thus breaking\nmodularity. The famous DAO bug in the cryptocurrency framework Ethereum,\nemployed callbacks to steal $150M. We define the notion of Effectively Callback\nFree (ECF) objects in order to allow callbacks without preventing modular\nreasoning.\n An object is ECF in a given execution trace if there exists an equivalent\nexecution trace without callbacks to this object. An object is ECF if it is ECF\nin every possible execution trace. We study the decidability of dynamically\nchecking ECF in a given execution trace and statically checking if an object is\nECF. We also show that dynamically checking ECF in Ethereum is feasible and can\nbe done online. By running the history of all execution traces in Ethereum, we\nwere able to verify that virtually all existing contracts, excluding the DAO or\ncontracts with similar known vulnerabilities, are ECF. Finally, we show that\nECF, whether it is verified dynamically or statically, enables modular\nreasoning about objects with encapsulated state.\n

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.