Skip to content

Commit 2634fb4

Browse files
authored
sbundle stats endpoint (#557)
* sbundle stats endpoint * add more details
1 parent bee8702 commit 2634fb4

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

docs/flashbots-auction/advanced/rpc-endpoint.mdx

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,76 @@ where
768768
- `consideredByBuildersAt`: indicates time at which each builder selected the bundle to be included in the target block
769769
- `sealedByBuildersAt`: indicates time at which each builder sealed a block containing the bundle
770770

771+
### flashbots_getSbundleStats
772+
773+
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.
774+
Only bundles that do not contain user's private transactions are supported (so no backrun bundles)
775+
776+
```json
777+
{
778+
"jsonrpc": "2.0",
779+
"id": 1,
780+
"method": "flashbots_getSbundleStats",
781+
"params": [
782+
{
783+
bundleHash, // String, returned by the flashbots api when calling eth_sendBundle with builders field or mev_sendBundle
784+
}
785+
]
786+
}
787+
```
788+
789+
example response when bundle relay has simulated the bundle and the target block has been reached:
790+
791+
```json
792+
{
793+
"isHighPriority": true,
794+
"isSimulated": true,
795+
"simulatedAt": "2022-10-06T21:36:06.317Z",
796+
"receivedAt": "2022-10-06T21:36:06.250Z",
797+
"consideredByBuildersAt": [
798+
{
799+
"pubkey": "0x81babeec8c9f2bb9c329fd8a3b176032fe0ab5f3b92a3f44d4575a231c7bd9c31d10b6328ef68ed1e8c02a3dbc8e80f9",
800+
"timestamp": "2022-10-06T21:36:06.343Z"
801+
},
802+
{
803+
"pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f",
804+
"timestamp": "2022-10-06T21:36:06.394Z"
805+
},
806+
{
807+
"pubkey": "0xa1dead1e65f0a0eee7b5170223f20c8f0cbf122eac3324d61afbdb33a8885ff8cab2ef514ac2c7698ae0d6289ef27fc",
808+
"timestamp": "2022-10-06T21:36:06.322Z"
809+
}
810+
],
811+
"sealedByBuildersAt": [
812+
{
813+
"pubkey": "0x81beef03aafd3dd33ffd7deb337407142c80fea2690e5b3190cfc01bde5753f28982a7857c96172a75a234cb7bcb994f",
814+
"timestamp": "2022-10-06T21:36:07.742Z"
815+
}
816+
]
817+
}
818+
```
819+
820+
Only responds with success when sbundle is already simulated.
821+
822+
When bundle-relay has simulated the bundle but the target block (or maxBlock) has not been reached:
823+
824+
```json
825+
{
826+
"isSimulated": true,
827+
"isHighPriority": true,
828+
"simulatedAt": "2022-10-06T21:36:06.317Z",
829+
"receivedAt": "2022-10-06T21:36:06.250Z"
830+
}
831+
```
832+
833+
where
834+
835+
- `isSimulated`: boolean representing whether the bundle gets simulated. All other fields will be omitted except simulated field if API didn't receive bundle
836+
- `simulatedAt`: time at which the bundle gets simulated
837+
- `receivedAt`: time at which the bundle API received the bundle
838+
- `consideredByBuildersAt`: indicates time at which each builder selected the bundle to be included in the target block
839+
- `sealedByBuildersAt`: indicates time at which each builder sealed a block containing the bundle
840+
771841
### API Response
772842

773843
- All method supports JSON-RPC standards for success response and not supported for error response(V2 methods are exceptions).

0 commit comments

Comments
 (0)