From 824d17415cee2b687ff7c007f4d8f31ea5205a64 Mon Sep 17 00:00:00 2001 From: George Zhang Date: Wed, 12 Nov 2025 03:57:52 +0800 Subject: [PATCH] Remove deprecated bundle stats API methods from documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes five bundle stats API methods that were fully deprecated on June 9th: - flashbots_getUserStats - flashbots_getBundleStats - flashbots_getUserStatsV2 - flashbots_getBundleStatsV2 - flashbots_getSbundleStats These APIs now return 403 errors and are no longer functional. Additional changes: - Removed references to deprecated APIs in quick-start.mdx, reputation.md, and gas-fee-refunds.md - Updated Go example to demonstrate eth_sendBundle instead of deprecated flashbots_getUserStats - Removed reference to flashbots_getSbundleStats in eth_sendBundle documentation Fixes issue reported by Egor on Slack regarding 403 errors on Sepolia. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../advanced/gas-fee-refunds.md | 4 - docs/flashbots-auction/advanced/reputation.md | 2 - .../advanced/rpc-endpoint.mdx | 301 +----------------- docs/flashbots-auction/quick-start.mdx | 27 +- 4 files changed, 16 insertions(+), 318 deletions(-) diff --git a/docs/flashbots-auction/advanced/gas-fee-refunds.md b/docs/flashbots-auction/advanced/gas-fee-refunds.md index 7fe9c4dbf..12a0af4e9 100644 --- a/docs/flashbots-auction/advanced/gas-fee-refunds.md +++ b/docs/flashbots-auction/advanced/gas-fee-refunds.md @@ -59,10 +59,6 @@ Searchers can also use `mev_sendBundle` to multiplex bundles if they prefer. Thi _Note: Smart multiplexing has a 1% rate of false positives, meaning that in 1% of MEV-Boost blocks there is a risk that searcher bundles will not be landed._ -### Bundle stats for multiplexed bundles - -To view bundle stats on multiplexed `eth_sendBundle` requests, use the `flashbots_getSbundleStats` API. You will see a new "smart" field in the response to multiplexed `eth_sendBundle` which indicates that the sbundle stats endpoint should be used. - ## How are refunds calculated BuilderNet uses a refund rule to retroactively calculate refunds for all bundles landed in its blocks. For more information, see the [BuilderNet docs](https://buildernet.org/docs/refunds). diff --git a/docs/flashbots-auction/advanced/reputation.md b/docs/flashbots-auction/advanced/reputation.md index e1fd2128d..da35c009f 100644 --- a/docs/flashbots-auction/advanced/reputation.md +++ b/docs/flashbots-auction/advanced/reputation.md @@ -27,8 +27,6 @@ $\Delta_{coinbase_T}$: coinbase difference from direct payment in transaction $T Flashbots uses a dynamic threshold to classify users between the high reputation and low reputation queue. The dynamic variables are: 1) the historical time period considered to calculate reputation, 2) the cutoff reputation score which classifies a searcher as "high reputation". Using a dynamic threshold allows the builder to adapt in periods of high demand and maintain high reliability for top searchers. -A searcher can query their current reputation status using the [`flashbots_getUserStatsV2` RPC method](/flashbots-auction/advanced/rpc-endpoint#flashbots_getuserstatsv2). - ## Building reputation Searcher reputation is associated with the signing key used to authenticate with Flashbots. That is, the ethereum address associated with the `X-Flashbots-Signature` field of your bundle submission. diff --git a/docs/flashbots-auction/advanced/rpc-endpoint.mdx b/docs/flashbots-auction/advanced/rpc-endpoint.mdx index 6e633a961..957d9f3db 100644 --- a/docs/flashbots-auction/advanced/rpc-endpoint.mdx +++ b/docs/flashbots-auction/advanced/rpc-endpoint.mdx @@ -80,7 +80,7 @@ example response: } ``` -If `builders` are specified, the response will include an additional `smart` field. Use the `flashbots_getSbundleStats` API to look up stats for smart bundles. +If `builders` are specified, the response will include an additional `smart` field. example with `builders`: @@ -536,305 +536,6 @@ example response: } ``` -### flashbots_getUserStats - -:::caution - -flashbots_getUserStats will be deprecated soon, use [flashbots_getUserStatsV2](/flashbots-auction/advanced/rpc-endpoint#flashbots_getuserstatsv2) - -::: - -The `flashbots_getUserStats` JSON-RPC method returns a quick summary of how a searcher is performing in the Flashbots ecosystem, including their [reputation-based priority](/flashbots-auction/advanced/reputation). It is currently updated once every hour and has the following payload format: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "flashbots_getUserStats", - "params": [ - blockNumber, // String, a hex encoded recent block number, in order to prevent replay attacks. Must be within 20 blocks of the current chain tip. - ] -} -``` - -example response: - -```json -{ - "is_high_priority": true, - "all_time_miner_payments": "1280749594841588639", - "all_time_gas_simulated": "30049470846", - "last_7d_miner_payments": "1280749594841588639", - "last_7d_gas_simulated": "30049470846", - "last_1d_miner_payments": "142305510537954293", - "last_1d_gas_simulated": "2731770076" -} -``` - -where - -- `is_high_priority`: boolean representing if this searcher has a high enough reputation to be in the high priority queue -- `all_time_miner_payments`: the total amount paid to validators over all time -- `all_time_gas_simulated`: the total amount of gas simulated across all bundles submitted to Flashbots. This is the actual gas used in simulations, not gas limit - -:::note - -Parameters with `miner` in the name are retrofitted with Flashbots block builder data to maintain backwards compatibility. This nomenclature will be changed in a future release to accurately reflect PoS Ethereum architecture. - -::: - -### flashbots_getBundleStats - -:::caution - -flashbots_getBundleStats will be deprecated soon, use [flashbots_getBundleStatsV2](/flashbots-auction/advanced/rpc-endpoint#flashbots_getbundlestatsv2) - -::: - -The `flashbots_getBundleStats` JSON-RPC method returns stats for a single bundle. You must provide a blockNumber and the bundleHash, and the signing address must be the same as the one who submitted the bundle. - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "flashbots_getBundleStats", - "params": [ - { - bundleHash, // String, returned by the flashbots api when calling eth_sendBundle - blockNumber, // String, the block number the bundle was targeting (hex encoded) - } - ] -} -``` - -example response: - -```json -{ - "isSimulated": true, - "isSentToMiners": true, - "isHighPriority": true, - "simulatedAt": "2021-08-06T21:36:06.317Z", - "submittedAt": "2021-08-06T21:36:06.250Z", - "sentToMinersAt": "2021-08-06T21:36:06.343Z", - "receivedAt": "2022-10-06T21:36:06.250Z", // Added for POS, will be included as part of V2 - "consideredByBuildersAt": [ - { - "pubkey": "0x81babeec8c9f2bb9c329fd8a3b176032fe0ab5f3b92a3f44d4575a231c7bd9c31d10b6328ef68ed1e8c02a3dbc8e80f9", - "timestamp": "2022-10-06T21:36:06.343Z" - }, - { - "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", - "timestamp": "2022-10-06T21:36:06.394Z" - }, - { - "pubkey": "0xa1dead1e65f0a0eee7b5170223f20c8f0cbf122eac3324d61afbdb33a8885ff8cab2ef514ac2c7698ae0d6289ef27fc", - "timestamp": "2022-10-06T21:36:06.322Z" - } - ], // Added for POS, will be included as part of V2 - "sealedByBuildersAt": [ - { - "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", - "timestamp": "2022-10-06T21:36:07.742Z" - } - ] // Added for POS, will be included as part of V2 -} -``` - -### flashbots_getUserStatsV2 - -The `flashbots_getUserStatsV2` JSON-RPC method returns a quick summary of how a searcher is performing in the Flashbots ecosystem, including their [reputation-based priority](/flashbots-auction/advanced/reputation). It is currently updated once every hour and has the following payload format: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "flashbots_getUserStatsV2", - "params": [ - { - blockNumber // String, a hex encoded recent block number, in order to prevent replay attacks. Must be within 20 blocks of the current chain tip. - } - ] -} -``` - -example response: - -```json -{ - "isHighPriority": true, - "allTimeValidatorPayments": "1280749594841588639", - "allTimeGasSimulated": "30049470846", - "last7dValidatorPayments": "1280749594841588639", - "last7dGasSimulated": "30049470846", - "last1dValidatorPayments": "142305510537954293", - "last1dGasSimulated": "2731770076" -} -``` - -where - -- `isHighPriority`: boolean representing if this searcher has a high enough reputation to be in the high priority queue -- `allTimeValidatorPayments`: the total amount paid to validators over all time -- `allTimeGasSimulated`: the total amount of gas simulated across all bundles submitted to Flashbots. This is the actual gas used in simulations, not gas limit - -### flashbots_getBundleStatsV2 - -The `flashbots_getBundleStatsV2` JSON-RPC method returns stats for a single bundle. You must provide a blockNumber and the bundleHash, and the signing address must be the same as the one who submitted the bundle. - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "flashbots_getBundleStatsV2", - "params": [ - { - bundleHash, // String, returned by the flashbots api when calling eth_sendBundle - blockNumber, // String, the block number the bundle was targeting (hex encoded) - } - ] -} -``` - -example response when bundle relay has simulated the bundle and the target block has been reached: - -```json -{ - "isHighPriority": true, - "isSimulated": true, - "simulatedAt": "2022-10-06T21:36:06.317Z", - "receivedAt": "2022-10-06T21:36:06.250Z", - "consideredByBuildersAt": [ - { - "pubkey": "0x81babeec8c9f2bb9c329fd8a3b176032fe0ab5f3b92a3f44d4575a231c7bd9c31d10b6328ef68ed1e8c02a3dbc8e80f9", - "timestamp": "2022-10-06T21:36:06.343Z" - }, - { - "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", - "timestamp": "2022-10-06T21:36:06.394Z" - }, - { - "pubkey": "0xa1dead1e65f0a0eee7b5170223f20c8f0cbf122eac3324d61afbdb33a8885ff8cab2ef514ac2c7698ae0d6289ef27fc", - "timestamp": "2022-10-06T21:36:06.322Z" - } - ], - "sealedByBuildersAt": [ - { - "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", - "timestamp": "2022-10-06T21:36:07.742Z" - } - ] -} -``` - -when relay has not seen the bundle yet: - -```json -{ - "isSimulated": false, -} -``` - -when relay has seen the bundle but has yet to simulate it: - -```json -{ - "isSimulated": false, - "isHighPriority": true, - "receivedAt": "2022-10-06T21:36:06.250Z", -} -``` - -when relay has simulated the bundle but the target block has not been reached: - -```json -{ - "isSimulated": true, - "isHighPriority": true, - "simulatedAt": "2022-10-06T21:36:06.317Z", - "receivedAt": "2022-10-06T21:36:06.250Z" -} -``` - -where - -- `isHighPriority`: boolean representing if this searcher has a high enough reputation to be in the high priority queue -- `isSimulated`: boolean representing whether the bundle gets simulated. All other fields will be omitted except simulated field if API didn't receive bundle -- `simulatedAt`: time at which the bundle gets simulated -- `receivedAt`: time at which the bundle API received the bundle -- `consideredByBuildersAt`: indicates time at which each builder selected the bundle to be included in the target block -- `sealedByBuildersAt`: indicates time at which each builder sealed a block containing the bundle - -### flashbots_getSbundleStats - -The `flashbots_getSbundleStats` JSON-RPC method returns stats for a single [sbundle](/flashbots-mev-share/searchers/understanding-bundles). You must provide `bundleHash`, and the signing address must be the same as the one who submitted the bundle. -Only bundles that do not contain user's private transactions are supported (so no backrun bundles) - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "flashbots_getSbundleStats", - "params": [ - { - bundleHash, // String, returned by the flashbots api when calling eth_sendBundle with builders field or mev_sendBundle - } - ] -} -``` - -example response when bundle relay has simulated the bundle and the target block has been reached: - -```json -{ - "isHighPriority": true, - "isSimulated": true, - "simulatedAt": "2022-10-06T21:36:06.317Z", - "receivedAt": "2022-10-06T21:36:06.250Z", - "consideredByBuildersAt": [ - { - "pubkey": "0x81babeec8c9f2bb9c329fd8a3b176032fe0ab5f3b92a3f44d4575a231c7bd9c31d10b6328ef68ed1e8c02a3dbc8e80f9", - "timestamp": "2022-10-06T21:36:06.343Z" - }, - { - "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", - "timestamp": "2022-10-06T21:36:06.394Z" - }, - { - "pubkey": "0xa1dead1e65f0a0eee7b5170223f20c8f0cbf122eac3324d61afbdb33a8885ff8cab2ef514ac2c7698ae0d6289ef27fc", - "timestamp": "2022-10-06T21:36:06.322Z" - } - ], - "sealedByBuildersAt": [ - { - "pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f", - "timestamp": "2022-10-06T21:36:07.742Z" - } - ] -} -``` - -Only responds with success when sbundle is already simulated. - -When bundle-relay has simulated the bundle but the target block (or maxBlock) has not been reached: - -```json -{ - "isSimulated": true, - "isHighPriority": true, - "simulatedAt": "2022-10-06T21:36:06.317Z", - "receivedAt": "2022-10-06T21:36:06.250Z" -} -``` - -where - -- `isSimulated`: boolean representing whether the bundle gets simulated. All other fields will be omitted except simulated field if API didn't receive bundle -- `simulatedAt`: time at which the bundle gets simulated -- `receivedAt`: time at which the bundle API received the bundle -- `consideredByBuildersAt`: indicates time at which each builder selected the bundle to be included in the target block -- `sealedByBuildersAt`: indicates time at which each builder sealed a block containing the bundle - ### flashbots_getFeeRefundTotalsByRecipient The `flashbots_getFeeRefundTotalsByRecipient` JSON-RPC method returns the total amount of fee refunds that have been earned by a specific address. Our refund process calculates these values weekly. diff --git a/docs/flashbots-auction/quick-start.mdx b/docs/flashbots-auction/quick-start.mdx index 89195dd7b..90ec3c105 100644 --- a/docs/flashbots-auction/quick-start.mdx +++ b/docs/flashbots-auction/quick-start.mdx @@ -113,7 +113,6 @@ import ( "encoding/json" "fmt" "io/ioutil" - "math/big" "net/http" "time" @@ -123,14 +122,13 @@ import ( ) const ( - j = "application/json" flashbotURL = "https://relay.flashbots.net" - stats = "flashbots_getUserStats" flashbotXHeader = "X-Flashbots-Signature" - p = "POST" ) var ( + // authSigner is an Ethereum private key that does NOT store funds and is NOT your bot's primary key. + // This is an identifying key for signing payloads to establish reputation and whitelisting privateKey, _ = crypto.HexToECDSA( "2e19800fcbbf0abb7cf6d72ee7171f08943bc8e5c3568d1d7420e52136898154", ) @@ -142,27 +140,32 @@ func flashbotHeader(signature []byte, privateKey *ecdsa.PrivateKey) string { } func main() { + // Example: create a Flashbots authenticated request mevHTTPClient := &http.Client{ Timeout: time.Second * 3, } - currentBlock := big.NewInt(12_900_000) + + // Prepare your RPC request (e.g., eth_sendBundle, eth_callBundle, etc.) params := map[string]interface{}{ "jsonrpc": "2.0", "id": 1, - "method": stats, - "params": []interface{}{ - fmt.Sprintf("0x%x", currentBlock.Uint64()), - }, + "method": "eth_sendBundle", // or other Flashbots RPC methods + "params": []interface{}{ /* your bundle params */ }, } + payload, _ := json.Marshal(params) - req, _ := http.NewRequest(p, flashbotURL, bytes.NewBuffer(payload)) + req, _ := http.NewRequest("POST", flashbotURL, bytes.NewBuffer(payload)) + + // Sign the payload for Flashbots authentication headerReady, _ := crypto.Sign( accounts.TextHash([]byte(hexutil.Encode(crypto.Keccak256(payload)))), privateKey, ) - req.Header.Add("content-type", j) - req.Header.Add("Accept", j) + + req.Header.Add("content-type", "application/json") + req.Header.Add("Accept", "application/json") req.Header.Add(flashbotXHeader, flashbotHeader(headerReady, privateKey)) + resp, _ := mevHTTPClient.Do(req) res, _ := ioutil.ReadAll(resp.Body) fmt.Println(string(res))