PRECEDE: Power-weighted Lottery Stops Front-running
Abstract
Front-running is a subtle and persistent problem for blockchains. A blockchain is a stateful virtual machine executing instructions called transactions. Users earn rewards by publishing functional transactions essential to the system. Attackers observe these transactions and publish their own ahead of the users, seizing the reward and eroding users incentive to publish functional transactions. Preventing frontrunning means enforcing causality: If an attacker receives transaction tx A and then publishes transaction tx B, then tx A must be ordered before tx B. However, this causality is only observed by the attacker. Practical systems order transactions by bid amount, so transactions willing to pay more get executed first, but this only results in a bidding war eroding users rewards. Though numerous ordering approaches have been proposed, none achieves causality, leaving users vulnerable to front-running. We present PRECEDE, a mechanism-design approach that enforces transaction causality by removing the economic incentive to front-run. PRECEDE orders transactions by a powerweighted randomized lottery, whose winning probability grows super-linearly in the bid. The users strategy of publishing a transaction with a deterring bid forms an equilibrium where the attacker refrains from competing. Moreover, PRECEDE prevents the prominent sandwich attack, which relies on front-running. PRECEDE can be directly deployed in any censorship-resistant blockchain with a simple change to its transaction ordering mechanism.