How to Prevent Frontrunning in DeFi

Christian Cachin



Blockchain consensus protocols put miners and validators in charge of ordering transactions into blocks. Validators control not only which transactions appear in a block, but also the relative order of transactions within. Such influence on the order constitutes a major vulnerability for corresponding decentralized finance (DeFi) networks. It allows, for example, that validators maximize their own profit at the cost of innocent users, through so-called MEV attacks.

This presentation will dive into the front-running problem and explain several defense methods that are currently being explored in theory and practice:

1) Protecting the causal order among all transactions through encryption, in the sense that transactions are encrypted by clients and the validators agree on a sequence of encrypted transactions.

2) Receive-order fairness aims at ensuring that transactions that were first received by "many" validators appear before transactions received by "few". If the number of malicious validators is small, their power to control the order and exploit frontrunning can be bounded.

3) Eliminating frontrunning through randomized ordering. This protocol randomly permutes the transactions that appear in a block. The crux lies in ensuring that the randomness used for the scrambling cannot be biased by the malicious validator that creates the block.

This talk is based on joint work with Orestis Alpos, Ignacio Amores Sesar, Jovana Micic, Nathalie Steinhauer, Michelle Yeo, and Luca Zanolini.


Christian Cachin is a professor of computer science at the University of Bern, where he has been leading the Cryptology and Data Security Research Group since 2019. Prior to that he worked for IBM Research - Zurich during more than 20 years. He has held visiting positions at MIT and at EPFL and has taught at several universities during his career in industrial research. He graduated with a Ph.D. in Computer Science from ETH Zurich in 1997. He is an IACR Fellow, ACM Fellow, IEEE Fellow, recipient of multiple IBM Outstanding Technical Achievement Awards, and has also served as the President of the International Association for Cryptologic Research (IACR) from 2014-2019.

Time and Place

Tuesday, November 14, 4:00pm
Gates 104 & Zoom