Clockwork Finance: Automated Analysis of Economic Security in Smart Contracts
Kushal Babel, Philip Daian, Mahimna Kelkar, Ari Juels

TL;DR
The paper introduces the Clockwork Finance Framework (CFF), a formal verification tool for analyzing economic security in DeFi smart contracts, capable of modeling any contract platform and exhaustively identifying potential attacks.
Contribution
It presents a novel, complete, and attack-exhaustive verification framework for DeFi contracts, including a new formal notion of extractable value (EV) and models of major protocols.
Findings
CFF can model any smart contract platform with constant overhead.
It uncovers an average of $56 million EV per month in recent transaction data.
CFF successfully models and analyzes major DeFi protocols like Uniswap and MakerDAO.
Abstract
We introduce the Clockwork Finance Framework (CFF), a general purpose, formal verification framework for mechanized reasoning about the economic security properties of composed decentralized-finance (DeFi) smart contracts. CFF features three key properties. It is contract complete, meaning that it can model any smart contract platform and all its contracts--Turing complete or otherwise. It does so with asymptotically constant model overhead. It is also attack-exhaustive by construction, meaning that it can automatically and mechanically extract all possible economic attacks on users' cryptocurrency across modeled contracts. Thanks to these properties, CFF can support multiple goals: economic security analysis of contracts by developers, analysis of DeFi trading risks by users, fees UX, and optimization of arbitrage opportunities by bots or miners. Because CFF offers composability, it…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBlockchain Technology Applications and Security · FinTech, Crowdfunding, Digital Finance · Banking stability, regulation, efficiency
