Skip to content

⚡🤖Avoid sandwich attack using flashbot 🤖⚡

Notifications You must be signed in to change notification settings

Aboudoc/hello-flashbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

npm install @types/node ts-node tslib typescript --save-dev
npm install @flashbots/ethers-provider-bundle
npm install ethers@^5.5.2

Run

env $(cat .env) npx ts-node src/index.ts

Note

Deployed contract (GOERLI): 0x04b10028affBB22Ae6d98efFFfAb2FEF18e65958

If the simulation returns the following error

simulation error: err: max fee per gas less than block base fee

You need to increase the maxFeePerGas in you tx. You submitted it with less than the baseFee, so nodes will reject it to mitigate DoS attacks.

If you use provider.getFeeData, you will get recommended fee suggestions.

About

⚡🤖Avoid sandwich attack using flashbot 🤖⚡

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published