0

I read an interesting piece about frontrunning in Ethereum. In essense, the problem is this:

In general, frontrunning is the act of getting a transaction first in line in the execution queue, right before a known future transaction occurs.

A simple example of frontrunning is an exchange bid. Say someone is about to buy a huge amount of ETH on Uniswap, enough to drive the price of ETH up. One way to benefit from this scenario is to put a transaction to buy ETH just before this huge amount of ETH is purchased, while the price remains lower. Then, right after the price spikes, sell the ETH for a profit.

Since to write transactions in the Tezos blockchain also require some gas, and, afaik, higher gas gets priority, frontrunning seems plausible to happen. Just find a pending transaction that can change the price and bet against it.

Is this true? Is tezos vulnerable to frontrunning?

1 Answer 1

3

Choosing the order in which operations are applied is a privilege of the baker. So yes, frontrunning is possible on Tezos and can either be done by setting high fees (the default baker strategy is to apply transactions with high fees first) or by the bakers themselves when they build their blocks. The simplest protection against frontrunning is to run your own baker and inject the operations you want directly when it is your time to build a block.

1
  • Mmm, interesting. Bakers could super easily implement a bot that does frontrunning! So there is no way to stop this?
    – luchonacho
    Mar 2, 2021 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.