Skip to content

Commit

Permalink
Add MEV refund aggregate APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
sketsdever authored Oct 4, 2024
1 parent 0561a08 commit 0c14649
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/flashbots-auction/advanced/rpc-endpoint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,66 @@ 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.

### flashbots_getMevRefundTotalByRecipient

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.

#### 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

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 either the `tx.origin` or the Flashbots signer (for bundles), and may be different from the recipient if the recipient has been delegated to another address.

This API does not require authentication.

#### 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).
Expand Down

0 comments on commit 0c14649

Please sign in to comment.