diff --git a/docs/flashbots-auction/advanced/rpc-endpoint.mdx b/docs/flashbots-auction/advanced/rpc-endpoint.mdx index 09f15a1c..118d0570 100644 --- a/docs/flashbots-auction/advanced/rpc-endpoint.mdx +++ b/docs/flashbots-auction/advanced/rpc-endpoint.mdx @@ -869,6 +869,167 @@ If the first address matches the authentication signature, then a response with If the signature is invalid or does not match the first address, an appropriate error will be returned instead. +### MEV Refund JSON-RPC API Documentation + +Below we will document set of endpoints to track MEV Refunds generated by MEV-Share. All of these endpoints do not require signature + +### flashbots_getMevRefundsByRecipient + +Retrieves all refunds sent to a specific recipient address. + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "flashbots_getMevRefundsByRecipient", + "params": ["0x7642259CD28C04F75EB4C00785F95461434101C0"] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "refunds": [ + { + "txHash": "0x0eee857653a726179a8dd0a9f2f58351ba1e25acae6844e45faee2250275fa8d", + "amount": "0x9f458e97b818c", + "recipient": "0x7642259cd28c04f75eb4c00785f95461434101c0" + } + ] + } +} +``` + +### flashbots_getMevRefundsByHash + +Retrieves refunds associated with a specific transaction or `sbundle` hash. + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "flashbots_getMevRefundsByHash", + "params": ["0x8A29C254B498E0757FF93B3E8424225DC441C24AC5C6A2F8CC9925D36E0CDB86"] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "refunds": [ + { + "txHash": "0xeb81e87b450f83a5e1a08033ea51bbb6a4b5b706eb629fbb1ed8e81d173207fe", + "amount": "0x95dc82ca0cb6b", + "recipient": "0xa34c84ed07fdf0c92858e364cfcdfa1e47fe5369" + } + ] + } +} +``` + +### flashbots_getMevRefundsBySender + +Retrieves all refunds sent by a specific sender address (for transactions) or signer address (for `sbundles`) + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "flashbots_getMevRefundsBySender", + "params": ["0x7642259CD28C04F75EB4C00785F95461434101C0"] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "refunds": [ + { + "txHash": "0x0eee857653a726179a8dd0a9f2f58351ba1e25acae6844e45faee2250275fa8d", + "amount": "0x9f458e97b818c", + "recipient": "0x7642259cd28c04f75eb4c00785f95461434101c0" + } + ] + } +} +``` + +### flashbots_getMevRefundTotalByRecipient + +Retrieves the total amount of MEV refunds received by a specific recipient address. + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "flashbots_getMevRefundTotalByRecipient", + "params": ["0xDCDDAE87EDF1D9F62AE2F3A66EB2018ACD0B2508"] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "total": "0xeff5f44e097dcfac" + } +} +``` + +Note: The total is returned as a hexadecimal string representing the amount in wei. + +### flashbots_GetMevRefundTotalBySender + +Retrieves the total amount of MEV refunds sent by a specific sender address. + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "flashbots_getMevRefundTotalBySender", + "params": ["0xDCDDAE87EDF1D9F62AE2F3A66EB2018ACD0B2508"] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "total": "0x4a817c800" + } +} +``` + +Note: The total is returned as a hexadecimal string representing the amount in wei. + ### API Response - All method supports JSON-RPC standards for success response and not supported for error response(V2 methods are exceptions).