Code Monkey home page Code Monkey logo

friendrekt's Introduction

friend.tech mempool sniper bot

⚠️ The mempool bug is patched so this bot will not work ⚠️

mempool sniper bot for new friend.tech joiners. context:

  • op-stack is supposed to be blind mempool. but base node default config had txpool+ws rpcs open (see the patch notes)
  • friend.tech uses blast-api rpc
  • blast-api used base node default config for their backend nodes

important parts

  1. friendrekt-rs
    • rust bot for finding new joiners, caching follow count and sniping
  2. friendrekt-contracts
    • solidity contract for sniping w/ fail-safes
  3. twt-follower-api
    • python http api for retrieving follower count

algo

/*
    here's a brief overview of the sniper:
    there are two tokio threads. 

    1. listen to every block.
        for every ETH transfer or bridge relays:
            reverse search the addresses involved on friend.tech
            find the number of followers
            if the address is not cached:
                cache the address

    2. listen to blast-api eth_newPendingTransactions
        there are multiple (4?) backend nodes so subscribe a few times
            (afaict its mostly rng which stream you get)
            (also run this bot on several geo-distributed servers)
            if its a first-share-buy (a signup):
                if the address is cached:
                    if follow count > 20k: send snipe tx
                otherwise:
                    do a live lookup of follow count
                    if follow count > 20k: send snipe tx
*/

devs

friendrekt's People

Contributors

evmcheb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

friendrekt's Issues

contract compile failed due to version incompatible

forge test
[⠃] Compiling...2023-10-19T02:29:04.379870Z ERROR ethers_solc::resolver: failed to resolve versions
[⠊] Compiling...
Error:
Discovered incompatible solidity versions in following
: src/Guard.sol (^0.8.19) imports:
Discovered incompatible solidity versions in following
: src/Sniper.sol (^0.8.13) imports:
src/Guard.sol (^0.8.19)
lib/solmate/src/tokens/ERC20.sol (>=0.8.0)
lib/solmate/src/utils/SafeTransferLib.sol (>=0.8.0)
src/IFriendTech.sol (^0.8.10)
lib/solmate/src/tokens/ERC20.sol (>=0.8.0)

Subscription method newPendingTransactions is unsupported on Base

Cost for 1 shares @ 38: 0.09025
Cost for 1 shares @ 39: 0.0950625
Found debuho1 with 25552 followers
Cached (from) debuho1 with 25552 followers 0x31fbf6a04ea9d36a9d49c8079323eae09665e011
thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: JsonRpcClientError(JsonRpcError(JsonRpcError { code: 400, message: "Subscription method newPendingTransactions is unsupported on Base. Please see https://docs.alchemy.com for more information.", data: None }))', src/main.rs:274:61
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace  
```   , 
so now this method disabled by default ?  is there any alternative method🤔🙄

Newbie question

I'm trying to get started in MEV, and I've never used Rust, but: Is this complete code?

I only see one rust file build.rs with 10 lines of code.

Build and deploy hints would be very useful in case you have time for that.

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.