Git Product home page Git Product logo

flashbots-recovery's Introduction

Example exit queue tickets recovery

This script was used to rescue funds waiting to be withdrawn on the Kiln Onchain V2 Exit Queue to recover $7K worth of ETH from a compromised wallet.

The Problem

  • The compromised wallet has had it's private key leaked, a malicoius individual set up a bot to monitor for incoming transactions and to steal tokens as soon as they are deposited to the compromised address.
  • To claim the ETH from the exit queue the compromised wallet needs to be seeded with enough ETH to pay for the gas fees (without the bots stealing the ETH as soon as it is deposited).

The solution is to send transactions to seed + claim + withdraw all in the same block. We can do this by sending these transactions as a bundled to the flashbot network using the ethers-provider-flashbots-bundle package.

Transactions

  1. Send funds from funding_wallet to compromised_wallet to cover gas for claiming + transfering
  2. Claim the exit queue ticket from compromised_wallet
  3. Transfer claimed ETH tokens from compromised_wallet to ledger_wallet

Proof Of Transactions

The transactions can be seen bundled together in block 19663505 Transactions In Block 19663505

Transaction Hashes

Transaction Hash
Funding compomised_wallet using funding_wallet 0xba0c37...1da10e
Claiming the exit ticket to compromised_wallet 0x4e6945...013470
Withdrawing ETH from compromised_wallet to ledger_wallet 0x172b1a...5bf065

Contracts/Addresses In Play

Contract/Account Name Address
Exit queue contract 0x8d6Fd650500f82c7D978a440348e5a9b886943bF
Compromised Wallet 0xffCB8D87dAcc4BDE40Dda52b5a81eB25d094091e
Funding Wallet 0x7E72F7856465f64908C9a9c000E133ACb128F979

flashbots-recovery's People

Contributors

mouseless-eth avatar 0xvv avatar

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.