Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts Ahmed Kosba∗, Andrew Miller∗, Elaine Shiy, Zikai Weny, Charalampos Papamanthou∗ ∗University of Maryland and yCornell University fakosba,
[email protected], frs2358,
[email protected],
[email protected] Abstract—Emerging smart contract systems over decentralized privacy. Such a blockchain provides a powerful abstraction for cryptocurrencies allow mutually distrustful parties to transact the design of distributed protocols. safely without trusted third parties. In the event of contrac- The blockchain’s expressive power is further enhanced by tual breaches or aborts, the decentralized blockchain ensures that honest parties obtain commensurate compensation. Existing the fact that blockchains naturally embody a discrete notion systems, however, lack transactional privacy. All transactions, of time, i.e., a clock that increments whenever a new block including flow of money between pseudonyms and amount is mined. The existence of such a trusted clock is crucial transacted, are exposed on the blockchain. for attaining financial fairness in protocols. In particular, We present Hawk, a decentralized smart contract system that malicious contractual parties may prematurely abort from a does not store financial transactions in the clear on the block- chain, thus retaining transactional privacy from the public’s view. protocol to avoid financial payment. However, with a trusted A Hawk programmer can write a private smart contract in an clock, timeouts can be employed to make such aborts evident, intuitive manner without having to implement cryptography, and such that the blockchain can financially penalize aborting our compiler automatically generates an efficient cryptographic parties by redistributing their collateral deposits to honest, protocol where contractual parties interact with the blockchain, non-aborting parties.