# Searcher ### Introduction Searcher can subscribe [Private Mempool](../../../streams/mempool/private-mempool/) to execute the backrun strategy, and then send the [backrun bundles](searcher.md#request-parameters) to BlockRazor RPC to obtain benefits via backrun auction. In addition, Searcher can also skip bundle subscription and send the raw bundle directly to BlockRazor RPC. With the high-performance network, BlockRazor can forward the bundle to mainstream builders with extremely low latency, eliminating the need for repeated integrations with each builder. ### Auction Mechanism

bundle flow

#### Bidding timing Searcher can continuously submit bundles (repeated submissions are not allowed), and BlockRazor RPC will choose the best time to submit winning bundles to top builders. If the bundle has been included in the block or has expired, it will stop being disclosed in the data stream. #### Auction rules BlockRazor RPC conducts English bidding based on the bid value, of which the receipt and distribution([click](https://blockrazor.gitbook.io/blockrazor/tc/scutummev-bao-hu-rpc#ge-ge-jue-se-jian-de-li-run-fen-pei-bi-li-shi-zen-mo-yang-de) to see details) is realized via smart contract. #### Bidding method When constructing a backrun transaction, the backrun contract could call the proxyBid method of the bidding proxy contract as follows. ``` interface IProxyBid { function proxyBid(address refundAddress, uint256 refundCfg) external payable; } ``` The biding proxy contract address (proxyBidContract), refundAddress and refundCfg can be obtained from Private Mempool and msg.value(the biding value) must be greater than 0. The correctness of the parameters will be strictly verified by BlockRazor RPC. Please do not directly transfer to the refundAddress and the address of bidding proxy contract or perform other operations that may cause changes to the balance of the above account. ### RPC Endpoint {% hint style="info" %} Please keep the domain for subscribing to the bundle consistent with the domain for sending the bundle. For example, if subscribing to https://jp-bscscutum.blockrazor.xyz/stream, then send the bundle to https://jp-bscscutum.blockrazor.xyz {% endhint %}
RegionEndpoint
Tokyohttps://jp-bscscutum.blockrazor.xyz
New Yorkhttps://us-bscscutum.blockrazor.xyz
Frankfurthttps://ger-bscscutum.blockrazor.xyz
Dublinhttps://ire-bscscutum.blockrazor.xyz
### Request Parameters #### **Bundle**
ParametersMandatoryFormatExampleRemark
hashoptionalhash"0xa06b……f7e8ec"The bundle hash received from the data stream, that is, the object being backrun
txsmandatory[]bytes[ "0xf84a……e54284" ]raw tx. If the hash is empty, up to 50 raw txs are allowed to set up, and if the hash is not empty, only 1 raw tx is allowed to set up
revertingTxHashesoptional[]hash["0x1f23……0abb1e"]Transactions that allow to be reverted, a subset of txs
maxBlockNumberoptionaluint6439177941The maximum block number for the bundle to be valid, with the default set to the current block number + 100
hintoptionalmap[string]boolSee hint for details
refundAddressoptionaladdress"0x9abae1b279a4be25aeae49a33e807cdd3ccffa0c"If there is a field with a value of true in hint, this field should be set to EOA.
#### hint The disclosure for the transaction data in field `txs`is set by hint. If it is set to true, it will be regarded as disclosing the corresponding transaction field. If it is false, it will be regarded as not disclosing the corresponding transaction field. If it is not set, the default is false.
ParametersMandatoryFormatExampleRemark
hashoptionalbooltruetransaction hash
fromoptionalboolfalsesender of the transaction
tooptionalbooltruereceiver of the transaction
valueoptionalboolfalsevalue being transacted
nonceoptionalboolfalsenonce
calldataoptionalbooltruecalldata
functionSelectoroptionalbooltruethe first 4 bytes of the contract function signature hash
logsoptionalbooltrueevent logs emitted during transaction execution(this field synchronously sets whether to disclose state changes in the state object)
### Request Example #### **Raw Bundle** There is no backrun object so the hash field should not be set. The txs in the bundle come from the public mempool or are self-constructed, and up to 50 rawtransactions can be set. Searchers can authorize the disclosure of txs in raw bundles to allow other Searchers to backrun, or they can keep transactions private and Scutum will forward the raw bundles to mainstream builders. ```json curl -X POST -H "Content-Type: application/json" --data'{ "id": 1, "jsonrpc": "2.0", "method": "eth_sendMevBundle", "params": [{ "txs": ["0xf84a8080808080808193a0437a5584216e68d1ff5bd7803161865e058f9bf4637fd1391213eac03ae64444a00df12bffe475d5dd8cc1544b72ee280471f1dcb5173827ba41eb25cfc3e54284"], "revertingTxHashes": [], "maxBlockNumber": 39177941, "hint": { "hash": true, "from": false, "to": false, "value": false, "nonce": false, "calldata": false, "functionSelector": false, "logs": true }, "refundAddress": "0x9abae1b279a4be25aeae49a33e807cdd3ccffa0c" }] }' ``` #### First Backrun Bundle Searcher executes the backrun strategy on Raw Bundle, and can choose to continue to disclose the bundle to other Searchers to execute nested backrun strategies. The overall structure of First Backrun Bundle is generally \[Raw Bundle tx1, backrun tx1]. Searcher executes the backrun strategy on the raw bundle to form the first backrun bundle. The `hash` field sets the raw bundle hash received in the data stream, and `txs` field sets the backrun tx. Searchers can disclose the backrun bundle to other Searchers to execute nested backrun strategy. The overall structure of the backrun bundle in the data stream is generally \[raw bundle txs…, backrun tx]. ```json curl -X POST -H "Content-Type: application/json" --data'{ "id": 1, "jsonrpc": "2.0", "method": "eth_sendMevBundle", "params": [{ "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "txs": ["0xf84a8080808080808193a0437a5584216e68d1ff5bd7803161865e058f9bf4637fd1391213eac03ae64444a00df12bffe475d5dd8cc1544b72ee280471f1dcb5173827ba41eb25cfc3e54284"], "revertingTxHashes": [], "maxBlockNumber": 39177941, "hint": { "hash": true, "from": false, "to": true, "value": false, "nonce": false, "calldata": true, "functionSelector": true, "logs": true }, "refundAddress": "0x9abae1b279a4be25aeae49a33e807cdd3ccffa0c" }] }' ``` #### Second Backrun Bundle Searcher can execute the backrun strategy again on the first backrun bundle submitted by other Searchers, forming a nested bundle that is backrun twice. The `hash` field sets the hash of the first backrun bundle, and `txs` sets the second backrun tx. The overall structure of the second backrun bundle is generally \[raw bundle txs…, first backrun tx, second backrun tx]. {% hint style="info" %} The second backrun bundle will no longer be disclosed to other Searchers, and the parameters hint, refundRecipient will be invalid. {% endhint %} ```json curl -X POST -H "Content-Type: application/json" --data'{ "id": 1, "jsonrpc": "2.0", "method": "eth_sendMevBundle", "params": [{ "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "txs": ["0xf84a8080808080808193a0437a5584216e68d1ff5bd7803161865e058f9bf4637fd1391213eac03ae64444a00df12bffe475d5dd8cc1544b72ee280471f1dcb5173827ba41eb25cfc3e54284"], "revertingTxHashes": [], "maxBlockNumber": 39177941, }] }' ``` ### Response Example **normal** ```json {"jsonrpc":"2.0","id":1,"result": "0x11111111..."} ``` **abnormal** ```json {"jsonrpc":"2.0","id":1,"jsonerror":{"code":-38000,"message":"nonce too low: address 0x9Abae1b279A4Be25AEaE49a33e807cDd3cCFFa0C, tx: 0 state: 45"}} ``` ### FAQ **What is the difference between sending Bundle to BlockRazor RPC and Block Builders?** * In BSC, BlockRazor RPC will forward the bundle to mainstream builders, and Block Builders will send the bundle to BlockRazor Builder