MCPcopy Index your code
hub / github.com/evmcheb/friendrekt

github.com/evmcheb/friendrekt @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
117 symbols 143 edges 10 files 32 documented · 27%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Core symbols most depended-on inside this repo

clone
called by 19
friendrekt-rs/src/bindings/shares.rs
insert
called by 13
friendrekt-rs/src/bset.rs
reverse_search
called by 4
friendrekt-rs/src/main.rs
contains
called by 2
friendrekt-rs/src/bset.rs
make_headers
called by 2
friendrekt-rs/src/fasthttp.rs
get_followers
called by 1
friendrekt-rs/src/main.rs
send_request
called by 1
friendrekt-rs/src/fasthttp.rs
wei_to_eth
called by 1
friendrekt-rs/src/math.rs

Shape

Class 51
Method 51
Function 10
Enum 4
Route 1

Languages

Rust98%
Python2%

Modules by API surface

friendrekt-rs/src/bindings/shares.rs65 symbols
friendrekt-rs/src/bindings/sniper.rs29 symbols
friendrekt-rs/src/fasthttp.rs7 symbols
friendrekt-rs/src/main.rs4 symbols
friendrekt-rs/src/bset.rs4 symbols
friendrekt-rs/src/prod_kosetto.rs3 symbols
twt-follower-api/app.py2 symbols
friendrekt-rs/src/math.rs2 symbols
friendrekt-rs/build.rs1 symbols

For agents

$ claude mcp add friendrekt \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact