ohaddahan / solana-sandwich

1 stars 0 forks source link

How would this prevent being sandwiched? #1

Closed pointer212 closed 4 months ago

pointer212 commented 4 months ago

Hi, im wondering how exactly would this program prevent one from having their transaction sandwiched? The way sandwich attacks work is they bundle the target transaction inbetween their own via Jito, they dont interact with your program. For example when trading on raydium, they would just call raydium buy and sell directly. Hope u can help me understand. Thanks!

ohaddahan commented 4 months ago

Hi, im wondering how exactly would this program prevent one from having their transaction sandwiched? The way sandwich attacks work is they bundle the target transaction inbetween their own via Jito, they dont interact with your program. For example when trading on raydium, they would just call raydium buy and sell directly. Hope u can help me understand. Thanks!

Different type of sandwich. Someone can detect a vulnerability in your program that exists only if they run within the same transaction as you. So they can sandwich instructions from your program to take advantage of them.

A classic one, is assuming an account is close and abusing that to "fool" your program.