Illuvium sILV2 - Don’t Get Sandwiched!

By Deraji | ILVFi | 7 Mar 2022


In my past several articles, I’ve highlighted the issuance of the new Illuvium gift card, sILV2.  Here, I want to give a quick warning to another issue with trading this new token in the Uniswap pool, sandwich attacks.

What is a sandwich attack?

Due to everything being transparent on the blockchain, bots are able to detect incoming orders in the pool.  Due to low liquidity, these malicious actors are able to front run orders, profiting by knowing a larger order is incoming which will raise the price of the token, buying the token first, and then selling immediately after the large transaction settles for a small profit.  For the original buyer, this costs them money by raising the price, causing them to receive fewer tokens than initially expected due to the bot's purchase.  Here’s an article that describes the process in more detail, and a website where you can check your wallet to see if you’ve been sandwiched.

54bd2063645ab570f9cca4a8bf1242530a3b5c5028db1ef461d023430a3d7bcd.png

What does a sandwich attack look like?

Dextools.io does a nice job highlighting such attacks, as well as calculating the impact.  Below is an example that happened in the sILV2/ETH pool today. 

6b3a16b5bc70c690002176b6966f065a19da882fe8d8e094570516b016843525.png

An order was placed by our victim to buy 205 sILV2 when the price was at $181.69.  The buyer entered a max priority fee of 2 and max total fee of 38.7 Gwei.  A bot noticed this large order, and placed a buy order for 105 sILV2 with a priority of 1321 Gwei.  The bot’s transaction was processed first (costing $369 in transaction fees), raising the price to $189.13 for the original buyer.  Now that the price was higher, the bot sold with a more normal transaction fee, selling at $187.17.  

a1bfe6ae50dce2e2db64a71a6c25df3e1691188dfe9a5444c1eda3b80ce7aa5c.png

For the bot, all this effort netted a profit of $16.38 after fees.  The original buyer paid a bit higher price for their sILV2 as a result.    

As you can see, the bot does a lot of work for minimal profit, but done enough, this can be a very lucrative strategy.  This also only works for a pool with low liquidity, where the price moves quite quickly with orders, particularly larger ones.  The transaction fees are also critical - the higher the transaction costs, the lower the profit.  With that, how do you avoid getting sandwiched?

How to avoid sandwich attacks

If you’re trading in the sILV2 pool, there is a chance to be sandwiched, as it’s honestly a bot’s dream at the moment - low liquidity, intermittently high volume, some larger transactions.  Here’s a few tips on how to avoid being sandwiched.

  1. Use faster transaction speeds - in order to profit from sandwiching, the bot needs to get their order in first to take a position in the pool.  By setting a higher gas and priority fee (such as selecting “Fast” or even higher priority manually in Metamask), you can eliminate the opportunity for the bot to front run you, or reduce the profitability of the maneuver.  A slightly higher cost for you, but less than you would have paid if you get sandwiched.  This is a key reason to not set very low transaction priority when using a decentralized exchange.  The more time you give the bot and the lower you make the cost of cutting in line, the more likely you are to be sandwiched.
  2. Set low slippage ranges - The second thing you can do is to set a relatively low slippage range.  Slippage is the difference in the amount you expect at the time you place a transaction and what you receive.  By setting a high slippage, you’re willing to accept a smaller number of tokens for your order.  The higher you set the slippage, the better it is for the bot, as they can move the price more while front-running you, increasing their profit.  Keeping slippage low limits the bot’s ability to make a profitable trade at your expense.
  3. Trade in smaller amounts - particularly for low liquidity pools, submitting your transaction in one large move saves you fees, but becomes a much bigger (and more profitable) target for sandwiching.  By breaking up into smaller chunks, you are less likely to be front run.  An example of this technique also happened today.  These wallets bought 15 ETH worth of sILV2 in quick succession, but in 5 sILV2 chunks.  Not bot to be seen - not profitable for them and unaware there were multiple buy orders coming to raise the price.  

919627ca447f7aac24cd8b2a7591be992c8505b024c59aef45a2843a5f867266.png

So far, the bot has only been able to profitably sandwich transactions over 8.6 ETH, but watch out in the future, particularly if network fees are low, if liquidity drops, or if you set high slippage.  Be careful out there and avoid the sandwich!

Thanks for reading and safe trading.

How do you rate this article?


21

0

Deraji
Deraji

Crypto curious thinker, amateur economist, geriatric millennial gamer passionate about Illuvium. Happy to share my economic and financial assessment of this unique blockchain NFT Play-to-Earn project. patreon.com/ilvfi


ILVFi
ILVFi

ILVFI focuses on the upcoming P2E game, Illuvium, the first proposed AAA-quality video game based on blockchain technology and NFT ownership. We'll focus on both the game play, as well as the in-game and ILV governance token economics.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.