Skip to content

Commit e8c0cf1

Browse files
authored
Unpaginated MEV refund APIs (#583)
* Add MEV refund aggregate APIs * Add docs for getMevRefundsByHash * Explain sbundle hash
1 parent 0561a08 commit e8c0cf1

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

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

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,99 @@ If the first address matches the authentication signature, then a response with
948948

949949
If the signature is invalid or does not match the first address, an appropriate error will be returned instead.
950950

951+
### flashbots_getMevRefundTotalByRecipient
952+
953+
Returns the total amount of [MEV refunds](/flashbots-protect/mev-refunds) that have been paid to a specific recipient address. This API not require authentication.
954+
955+
#### Request
956+
957+
```json
958+
{
959+
"jsonrpc": "2.0",
960+
"id": 1,
961+
"method": "flashbots_getMevRefundTotalByRecipient",
962+
"params": ["0xDCDDAE87EDF1D9F62AE2F3A66EB2018ACD0B2508"]
963+
}
964+
```
965+
966+
#### Response
967+
968+
```json
969+
{
970+
"jsonrpc": "2.0",
971+
"id": 1,
972+
"result": {
973+
"total": "0xeff5f44e097dcfac"
974+
}
975+
}
976+
```
977+
978+
Note: The total is returned as a hexadecimal string representing the amount in wei.
979+
980+
### flashbots_getMevRefundTotalBySender
981+
982+
Returns the total amount of [MEV refunds](/flashbots-protect/mev-refunds) that have been generated on transactions or bundles from a specific sender address. The sender is the `tx.origin` for individual transactions or bundles of size 1, or the Flashbots signer for bundles of size > 1. It may be different from the recipient if the recipient has been delegated to another address.
983+
984+
This API does not require authentication.
985+
986+
#### Request
987+
988+
```json
989+
{
990+
"jsonrpc": "2.0",
991+
"id": 1,
992+
"method": "flashbots_getMevRefundTotalBySender",
993+
"params": ["0xDCDDAE87EDF1D9F62AE2F3A66EB2018ACD0B2508"]
994+
}
995+
```
996+
997+
#### Response
998+
999+
```json
1000+
{
1001+
"jsonrpc": "2.0",
1002+
"id": 1,
1003+
"result": {
1004+
"total": "0x4a817c800"
1005+
}
1006+
}
1007+
```
1008+
1009+
### flashbots_getMevRefundsByHash
1010+
1011+
Returns detailed information about the [MEV refunds](/flashbots-protect/mev-refunds) generated by a specific transaction or sbundle hash. An sbundle hash is a bundle hash for a bundle that was submitted to MEV-Share via `mev_sendBundle`. This API does not require authentication.
1012+
1013+
#### Request
1014+
1015+
```json
1016+
{
1017+
"jsonrpc": "2.0",
1018+
"id": 1,
1019+
"method": "flashbots_getMevRefundsByHash",
1020+
"params": ["0x8A29C254B498E0757FF93B3E8424225DC441C24AC5C6A2F8CC9925D36E0CDB86"]
1021+
}
1022+
```
1023+
1024+
#### Response
1025+
1026+
```json
1027+
{
1028+
"jsonrpc": "2.0",
1029+
"id": 1,
1030+
"result": {
1031+
"refunds": [
1032+
{
1033+
"txHash": "0xeb81e87b450f83a5e1a08033ea51bbb6a4b5b706eb629fbb1ed8e81d173207fe",
1034+
"amount": "0x95dc82ca0cb6b",
1035+
"recipient": "0xa34c84ed07fdf0c92858e364cfcdfa1e47fe5369"
1036+
}
1037+
]
1038+
}
1039+
}
1040+
```
1041+
1042+
Note: The total is returned as a hexadecimal string representing the amount in wei.
1043+
9511044
### API Response
9521045

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

0 commit comments

Comments
 (0)