1

I did swap on Uniswap today, and realized that my tx is frontrunned and it become a flashbots / private transaction.

Here is the tx https://etherscan.io/tx/0x6eb4543732962a023b58e12bcc0add03202ad856a0e6fe04f6263dee8b1186e9

Why it happened ? and how to prevent this ? Does my tx is mined by those bots since I saw the frontrunner tx also a flashbots / private transaction. https://etherscan.io/tx/0xd27158832cca42f99172de8910ac100c6794576ca32259f05c007585dfa3755e https://etherscan.io/tx/0x6a68e82617d83414ffebde0fbc5b3cb71e4c91745c5db58cc9c6a85b28c4cfc2

1

Uniswap has an slippage parameter that allows the final price to vary slightly. In uniswap v3 this parameter is set at 0.5%.

This slack allows bots to intervene when there's an opportunity. In their first transaction they buy NIIFI increasing the price slightly, then your transaction buys some more, then their second transaction sells the tokens and profits from the price difference. In this case the profit was 0.0228 ~ 61 USD at the time.

To prevent this you can set a lower slippage but it has the risk that your transaction might fail if the price has changed before your transaction is mined.

Note: That Etherscan calls the transactions private is a bit misleading. For example your transaction was public.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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