diff --git a/BEPs/BEP322.md b/BEPs/BEP322.md index 0f60d0d4..66ec1593 100644 --- a/BEPs/BEP322.md +++ b/BEPs/BEP322.md @@ -288,6 +288,60 @@ Response: } ``` +##### 4.4.1.3 Query Bundle Data + +This API enables MEV data analysts to query bundle information from builders. +It is particularly useful for MEV data providers who need to analyze market trends and create analytics dashboards. +For instance, to accurately measure MEV market activity, providers can use this API to display metrics such as +daily bundle counts and bundles per block in their analytics panels. + +Request: + +```json +{ + "jsonrpc": "2.0", + "method": "eth_bundles", + "params": [ + "0x1", + "0x3" + ], + "id": 1 +} +``` + +Params: + +1. String - `FromBlock`, It is the hex value of a block number. +2. String - `ToBlock`, It is either the hex value of a block number OR block tags: "latest", "pending". It should be +no less than `FromBlock` and less than `FromBlock+100`. + +Response: + +* Return bundles whose first-received-height(`receivedBlock`) is within the block range [`FromBlock`, `ToBlock`]. + +```json +{ + "jsonrpc": "2.0", + "result": [ + { + "receivedBlock": "0x1", + "bundles": [ + ["0x88...44b", "0x89..45b"], // tx hase list in the bundle + ["0x90...46b"] + ] + }, + { + "receivedBlock": "0x2", + "bundles": [ + ["0x23...24b", "0x39..45b"], + ["0x43...55a", "0x45..33a", "0x39..45b"] // it is possible that a same tx hash exists in different block + ] + } + ], + "id": 1 +} +``` + #### 4.4.2 Validator APIs The following APIs should be implemented on the validator side or BSC clients.