poly-flash icon indicating copy to clipboard operation
poly-flash copied to clipboard

Frontrunning protection

Open yuichiroaoki opened this issue 2 years ago • 2 comments

Anyone can interact with your contract with this current version, so it is theoretically vulnerable to frontrunning attacks

Ideas

  • Add something like the ownable modifier from OpenZeppelin to the flashloan function This doesn't solve the issue because some could have its own clone of your contract and if it detects a profitable transaction, create a new one against his own contract instance with a higher fee.

yuichiroaoki avatar Jun 04 '22 02:06 yuichiroaoki

That's why many are changing from ETH and BSC to polygon and etc. First of all anyone trying to take profit needs a personal contract which is at least slightly different to this one which is of course a template. Since deploying it just on new address keeps the same ABI and any frontrunner can listen to its TXs. Other thing that may help is migrating to networks with lesser bots. maybe polygon and the one I'm focusing right now Arbitrum. ARB blocks contain only one TX and is almost immediate.

krshyzdn avatar Jun 09 '22 07:06 krshyzdn

Hi @krshyzdn ! How is arbitrage opportunities at Arbitrum? Thanks!

recidive avatar Jan 02 '23 18:01 recidive