Giter Site home page Giter Site logo

zzzuhaibmohd / 0xflashbots Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 3.0 647 KB

The project demonstrates the use of the flashbots to send bundled transactions in order to hide them from the public mempoool.

Solidity 8.52% JavaScript 91.48%
flashbots hardhat solidity

0xflashbots's Introduction

0xFlashBots

Imagine your private key has been compromised and the ETH has been completely drained from your wallet by the attacker. You have some other valuable tokens still in the wallet of which the attacker is not aware. You need to send some ETH to transfer these tokens but the attacker is listening to the mempool for any incoming ETH deposits to the wallet and transfers the ETH to their account as soon as you make a deposit.ย 

Flashbots provides a solution to this problem by hiding these transactions from the public mempool and also bundling the transactions. So, a user can basically fund the wallet in the first transaction and then transfer the tokens in the second transaction. Flashbots makes sure that these bundled transactions are executed in the same block.

Fundme.sol is the attacker's malicious smart contract where the users funds are being sent. LolCoin.sol is the ERC20 token I created using Openzeppelin Contracts Wizard.

deployAttackerContract.js and deployERC20Token.js are the deploy scripts for the above mentioned contracts.

To run the attacker bot, execute the below command. Any ETH sent to the compromised address is drained.

node src/bot.js

To run the flashBot bundled transaction, execute the below command.

node src/flashbot.js

0xflashbots's People

Contributors

zzzuhaibmohd avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

0xflashbots's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.