Skip to content

Commit 0561a08

Browse files
fee refunds: document new fee refund by recipient RPCs (#582)
* Apply suggestions from code review
1 parent 0dfc20f commit 0561a08

File tree

2 files changed

+90
-1
lines changed

2 files changed

+90
-1
lines changed

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

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,85 @@ where
838838
- `consideredByBuildersAt`: indicates time at which each builder selected the bundle to be included in the target block
839839
- `sealedByBuildersAt`: indicates time at which each builder sealed a block containing the bundle
840840

841+
### flashbots_getFeeRefundTotalsByRecipient
842+
843+
The `flashbots_getFeeRefundTotalsByRecipient` JSON-RPC method returns the total amount of fee refunds that have been earned by a specific address. Our refund process calculates these values weekly.
844+
845+
```json
846+
{
847+
"jsonrpc": "2.0",
848+
"id": 1,
849+
"method": "flashbots_getFeeRefundTotalsByRecipient",
850+
"params": [
851+
{
852+
recipient, // String, the address to query for fee refunds
853+
}
854+
]
855+
}
856+
```
857+
858+
The response contains three fields:
859+
860+
```json
861+
{
862+
"pending":"0x17812ea4fbbe314",
863+
"received":"0x108d1b27b63a213",
864+
"maxBlockNumber":"0x13ddb08"
865+
}
866+
```
867+
868+
- `pending`: the total amount of fee refunds that have been earned but not yet received by the recipient
869+
- `received`: the total amount of fee refunds that have been received by the recipient
870+
- `maxBlockNumber`: the highest block number for which fee refunds have been processed
871+
872+
### flashbots_getFeeRefundsByRecipient
873+
874+
The `flashbots_getFeeRefundsByRecipient` JSON-RPC method returns detailed information about [fee refunds](/flashbots-protect/gas-fee-refunds) that have been earned by a specific address. Our refund process calculates these values weekly.
875+
876+
```json
877+
{
878+
"jsonrpc": "2.0",
879+
"id": 1,
880+
"method": "flashbots_getFeeRefundsByRecipient",
881+
"params": [
882+
{
883+
recipient, // String, the address to query for fee refunds
884+
cursor, // [optional] String, the cursor to continue from
885+
}
886+
]
887+
}
888+
```
889+
890+
Responses are paginated and contain the following fields:
891+
892+
```json
893+
{
894+
"refunds": [
895+
{
896+
"hash": "0x...",
897+
"amount": "0x...",
898+
"blockNumber": "0x13ddaa4",
899+
"status": "pending",
900+
"recipient": "0x..."
901+
},
902+
...
903+
],
904+
"cursor": "0x..."
905+
}
906+
```
907+
908+
The `"refunds"` field contains an array of per-order fee refunds, each with the following fields:
909+
910+
- `hash`: the bundle hash or transaction hash associated with the fee refund
911+
- `amount`: the amount of the fee refund, in wei
912+
- `blockNumber`: the block number the order was contained in
913+
- `status`: the status of the fee refund, either "pending" or "received"
914+
- `recipient`: the address the fee refund is credited to, either the bundle signer or transaction sender
915+
916+
The `"cursor"` field is only included if there are more fee refunds to fetch. To continue fetching fee refunds, include the cursor as the second argument in the next request.
917+
918+
NOTE: This API currently only returns details for bundles included in block 20802497 and later. To see total fee refunds processed for a specific address since inception, use the `flashbots_getFeeRefundTotalsByRecipient` method.
919+
841920
### flashbots_setFeeRefundRecipient
842921

843922
The `flashbots_setFeeRefundRecipient` JSON-RPC method allows a user to "delegate" their [fee refunds](/flashbots-auction/advanced/gas-fee-refunds) to a specific wallet address. Two addresses must be provided, the first is the address associated with the signing key used to authenticate your request, while the second is the address to send refunds to.

docs/flashbots-protect/gas-fee-refunds.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,14 @@ For the private transaction API: The refund recipient is the signer used on the
4444

4545
## How to track refunds
4646

47-
Refunds are tracked from a start date of July 8, 2024. Users wil be able to view refund amounts via an upcoming API.
47+
Refunds are tracked from a start date of July 8, 2024. Refunds are sent to recipients in batches, and originate from our builder address `0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555`. The recipient can track the status of their refunds using the [`flashbots_getFeeRefundTotalsByRecipient`](/flashbots-auction/advanced/rpc-endpoint#flashbots_getfeerefundtotalsbyrecipient) RPC method.
48+
49+
## Distributed refunds
50+
51+
Refunds have been sent as part of the following on-chain transactions:
52+
53+
| Block Number | Sender | Transaction Hash | Refunded Amount |
54+
|--------------|--------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
55+
| 20728671 | 0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555 | [0xe4c242dbaf75b0c72bf061cb0b24dfb2ac9b889c8312f85502b819c522143475](https://etherscan.io/tx/0xe4c242dbaf75b0c72bf061cb0b24dfb2ac9b889c8312f85502b819c522143475) | `0.005350659617303609` ETH |
56+
| 20730702 | 0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555 | [0x7f4b2747bca62e7cb30595bc8fd597d00b111f6e30836f90420a5f596fe6fb20](https://etherscan.io/tx/0x7f4b2747bca62e7cb30595bc8fd597d00b111f6e30836f90420a5f596fe6fb20) | `2.178974530716050227` ETH |
57+
| 20737357 | 0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555 | [0xa975df43bd397f2a6776811c46d8208df5833b4800f152d5e7df2f96fc20d560](https://etherscan.io/tx/0xa975df43bd397f2a6776811c46d8208df5833b4800f152d5e7df2f96fc20d560) | `1.012930151524122284` ETH |

0 commit comments

Comments
 (0)