Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 854 Bytes

33.md

File metadata and controls

12 lines (9 loc) · 854 Bytes

Race Condtion/ Front Running

Description:

Since miners always get rewarded via gas fees for running code on behalf of externally owned addresses (EOA), users can specify higher fees to have their transactions mined more quickly. Since the Ethereum blockchain is public, everyone can see the contents of others' pending transactions. This means if a given user is revealing the solution to a puzzle or other valuable secret, a malicious user can steal the solution and copy their transaction with higher fees to preempt the original solution. If developers of smart contracts are not careful, this situation can lead to practical and devastating front-running attacks.

Remediation:

The following methods can be used to prevent such attacks:

  • Use large liquidity pools
  • Keep maximum slippage low

References:

https://www.dasp.co/#item-7