4

I've been doing some research on Solana transactions over the past few weeks, and to my surprise, I've noticed and collected quite a large number of "sandwich attacks". I knew this was a big thing on Ethereum (by using gas prices to bid for transaction priority) but not Solana where I assume these attacks can only be executed by corrupt validators, i.e. validators that spam and reorder transactions to lock in profits from arbitrage.

What can the network do to fight this behaviour? I understand that traders can protect themselves by trading with low slippage, using smaller volumes, and/or avoiding low-liquidity markets, but this doesn't do anything for the integrity of the network which is the real issue here. Is there an existing mechanism to disincentivise validators from doing this? Is there a public repository to report these transactions?

2 Answers 2

3

Since the leader that proposes the block has final say in the ordering of transactions, there's very little that a user can do to protect themselves from sandwich attacks.

Priority fees are not required to be honored at the protocol level, they're just an extra tip to the validator. So even with high priority fees, the leader has the right to put any of their own transactions around a user transaction.

This is designed into the network, so your best bet is to work directly with trusted validators to process your transactions. The Jito client mentioned in Jonas's answer will certainly help a bit with that, but a validator could run the Jito client with other modifications.

2

There is a second validator client called Jito which allows transaction bundling for MEV. But I am not sure if this could be used for sandwich attacks. Jito has around 30% stake so every third transaction is performed by a leader that runs jito. Here is their repository: https://github.com/jito-foundation/jito-solana. Another way would be to just spam transactions in the same block an hope they land before the transaction that you want to sandwich attack probably.

Your Answer

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

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