Skip to content

Commit e49049b

Browse files
authored
Use BuilderNet docs for refund rule (#614)
* Protect gas fee refunds come from BuilderNet * Use BuilderNet docs for refund rule * Add link to BuilderNet website
1 parent 2858e9b commit e49049b

File tree

2 files changed

+19
-67
lines changed

2 files changed

+19
-67
lines changed

docs/flashbots-auction/advanced/gas-fee-refunds.md

Lines changed: 11 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@ title: Gas Fee Refunds
44

55
## Introduction
66

7-
Searchers and private transaction API users are automatically eligible to receive gas fee refunds. If Flashbots can include a bundle on chain for a lower price, you are eligible to receive a refund.
7+
Searchers and private transaction API users are automatically eligible to receive gas fee refunds. If a bundle can be included on chain for a lower price, you are eligible to receive a refund.
88

99
Gas fee refunds do not change how bundles are executed and searchers do not need to make any changes to be eligible for them.
1010

1111
## Where do refunds come from
1212

1313
Gas fee refunds include both priority fees and coinbase transfers.
1414

15-
In an optimal case, searchers are refunded the difference between their bid and the bid of the next-best bundle or transaction targeting the same state. Ie. the refund effectively results in the searcher paying the second price. In practice, searchers will receive some fraction of this amount depending on how much profit the Flashbots builder makes.
15+
In an optimal case, searchers are refunded the difference between their bid and the bid of the next-best bundle or transaction targeting the same state. Ie. the refund effectively results in the searcher paying the second price. In practice, searchers will receive some fraction of this amount depending on how much profit BuilderNet makes.
1616

1717
## Which bundles receive refunds
1818

19-
Flashbots provides refunds for bundles in blocks landed by the Flashbots block builder. Whether a bundle receives a refund depends on a few factors that vary from block to block:
19+
Flashbots provides refunds for bundles in blocks landed by [BuilderNet](https://buildernet.org/). Whether a bundle receives a refund depends on a few factors that vary from block to block:
2020
* How much network congestion and competition there was
21-
* Whether the Flashbots builder made a profit and how much
21+
* Whether BuilderNet made a profit and how much
2222
* How much the specific bundle contributed to the value of the block
23-
* If the bundle was sent directly to Flashbots, or shared with other block builders by the searcher
23+
* If the bundle was sent directly to Flashbots or BuilderNet, or shared with other block builders by the searcher
2424

2525
Note that transactions seen in the public mempool are excluded and bundles containing only public mempool transactions do not receive refunds.
2626

2727
## How to maximize both refunds and speed
2828

29-
Transactions which are sent directly to the Flashbots Builder via the Bundle Relay, and not multiplexed _by the searcher_ to other block builders, are likely to receive higher refunds. This is because they increase the profit of the Flashbots builder which is used to provide refunds.
29+
Transactions which are sent directly to the Flashbots Bundle Relay or BuilderNet, and not multiplexed _by the searcher_ to other block builders, are likely to receive higher refunds. This is because they increase the profit of BuilderNet which is used to provide refunds.
3030

31-
The Flashbots block builder does not land 100% of blocks. In order to land bundles in all blocks, searchers can ask Flashbots to share their bundles with other block builders in cases where the Flashbots builder does not win a block. Flashbots will automatically share with all specified builders on the searcher's behalf.
31+
BuilderNet does not land 100% of blocks. In order to land bundles in all blocks, searchers can ask Flashbots to share their bundles with other block builders in cases where BuilderNet does not win a block. Flashbots will automatically share with all specified builders on the searcher's behalf.
3232

3333
### Smart multiplexing
3434

3535
To share bundles with other builders, add the `builders` field to your `eth_sendBundle` request. The `builders` field accepts a list of strings which correspond to the "name" tags of [registered builders](https://github.com/flashbots/dowg/blob/main/builder-registrations.json).
3636

37-
All `eth_sendBundle` requests are shared with the Flashbots builder. They are multiplexed to other block builders at the end of the slot if the Flashbots builder determines it will not win that block.
37+
All `eth_sendBundle` requests are shared with BuilderNet. They are multiplexed to other block builders at the end of the slot if BuilderNet determines it will not win that block.
3838

3939
For example:
4040

@@ -55,7 +55,7 @@ For example:
5555
}
5656
```
5757

58-
Searchers can also use `mev_sendBundle` to multiplex bundles if they prefer. Though this method is more complex and not necessary for gas fee refunds.
58+
Searchers can also use `mev_sendBundle` to multiplex bundles if they prefer. This method is more complex and not necessary for gas fee refunds.
5959

6060
_Note: Smart multiplexing has a 1% rate of false positives, meaning that in 1% of MEV-Boost blocks there is a risk that searcher bundles will not be landed._
6161

@@ -65,63 +65,15 @@ To view bundle stats on multiplexed `eth_sendBundle` requests, use the `flashbot
6565

6666
## How are refunds calculated
6767

68-
The Flashbots builder uses a refund rule to retroactively calculate refunds for all bundles landed in its blocks.
69-
70-
The refund rule aims to have bundles make the minimum net payment so that bidding optimally is as straight forward as possible. We do this by measuring the contribution of bundles above the other bundles the builder has received, and refunding as much of that as possible.
71-
72-
Bundles sent by the same signer will be treated as non-competitive.
73-
74-
See the [explainer](https://collective.flashbots.net/t/refund-rule-wat-dis-how-to-and-faq/4049/2) for more details about how to bid and interact with the refund rule.
75-
76-
### The Flat Tax Rule
77-
78-
- **$B(T)$** is the most profitable block produced from bundles in $T$.
79-
- **$v(T)$** is the value of $B(T)$.
80-
- **$b_i(T)$** is the payment of all bundles sent by identity $i$ if block $B(T)$ is realized.
81-
- **$\mu_i(T) = \min\{b_i(T), v(T) - v(T \setminus \{i\})\}$** is the marginal contribution of all bundles sent by identity $i$ if $B(T)$ is realized. We bound the marginal contribution so that the net payment can't be negative.
82-
- **$c$** is the amount the builder pays to the proposer to win the block.
83-
84-
$$
85-
\phi_i(T, c) = \frac{\mu_i(T)}{\sum_j \mu_j(T)} \min\{v(B(T)) - c, \sum_j \mu_j(T)\}
86-
$$
87-
88-
So the net payment per identity (assuming it's included) is $p_i(T) = b_i(B(T)) - \phi_i(T, c)$.
89-
90-
Notice that if the block generates enough value after paying the proposer, everyone should be refunded their contribution, meaning everyone pays the minimum they need to pay to beat competition.
91-
92-
### Identity constraint
93-
94-
To avoid the rule being gamed by submitting bundles from multiple identities, we impose an additional constraint that no set of identities can receive in total more refunds than they contribute to the block.
95-
96-
For each set of identities $I$ we define
97-
98-
$$
99-
\mu_I(T) = \min\{\sum_{i\in I} b_i(T), v(T) - v(T \setminus I)\},
100-
$$
101-
102-
to be the joint marginal contribution of the identities in $I$ to the block. Then we choose rebates that are minimally different from the flat-tax rule subject to the constraint that they don't rebate a set of bundles more in total than its joint marginal contribution. This means the vector of rebates $\psi(T, c)$ solves
103-
104-
$$
105-
\min_{r\in\mathbb{R}^n_+} \sum_i (r_i - \phi_i(T, c))^2
106-
$$
107-
108-
$$
109-
\text{subject to} \sum_{i\in I} r_i \leq \mu_I(T) \text{ for each } I \subseteq B(T),
110-
$$
111-
112-
$$
113-
\sum_i r_i \leq v(T) - c
114-
$$
115-
116-
where $\phi(T, c)$ are the orginal flat-tax rebates as defined above.
68+
BuilderNet uses a refund rule to retroactively calculate refunds for all bundles landed in its blocks. For more information, see the [BuilderNet docs](https://buildernet.org/docs/refunds).
11769

11870
## Who receives refunds
11971

12072
By default, the refund recipient is the signer used on the `eth_sendBundle`, `mev_sendBundle`, or `eth_sendPrivateTransaction` request. You can delegate your recipient to a different address using the `flashbots_setFeeRefundRecipient` API.
12173

12274
## How to track refunds
12375

124-
Refunds are tracked from a start date of July 8, 2024. Refunds are sent to recipients in batches, the first batch originated from our builder address `0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555` while newer batches originate from [`refunds.buildernet.eth`](https://etherscan.io/address/0x62a29205f7ff00f4233d9779c210150787638e7f).
76+
Refunds are tracked from a start date of July 8, 2024. Refunds are sent to recipients in batches, the first batch originated from the Flashbots builder address `0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555` while newer batches originate from [`refunds.buildernet.eth`](https://etherscan.io/address/0x62a29205f7ff00f4233d9779c210150787638e7f).
12577

12678
Track your refunds using the [`flashbots_getFeeRefundTotalsByRecipient`](/flashbots-auction/advanced/rpc-endpoint#flashbots_getfeerefundtotalsbyrecipient) RPC method or the [refund dashboard](https://app.hex.tech/9eb1e790-53f7-4c16-be76-4a22c1aa7d17/app/0c2d34ef-1304-481a-b3d6-b773ce9e0e19/latest) on Dune.
12779

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,33 @@ title: Gas Fee Refunds
44

55
## Introduction
66

7-
Flashbots Protect users are automatically eligible to receive gas fee refunds. If Flashbots can include your transaction on chain for a lower price, you are eligible to receive a refund. This applies to both the RPC and the private transaction API.
7+
Flashbots Protect users are automatically eligible to receive gas fee refunds, if a transaction can be landed onchain for a lower price. This applies to both the RPC and the private transaction API.
88

99
Gas fee refunds do not change how transactions are executed and users do not need to make any changes to be eligible for them. Gas fee refunds are calculated separately, and applied in addition to, MEV refunds from [MEV-Share](/flashbots-protect/mev-refunds).
1010

1111
## Where do refunds come from
1212

1313
Users and orderflow providers (like wallets) often pay high priority fees to land transactions on chain. Many of these transactions could be executed just as quickly for a fraction of the gas cost.
1414

15-
It can be difficult to estimate gas correctly when sending a transaction. The Flashbots block builder calculates this on behalf of users and automatically refunds transactions that overpay.
15+
It can be difficult to estimate gas correctly when sending a transaction. Flashbots Protect sends all transactions to [BuilderNet](https://buildernet.org/), which calculates the optimal fee on your behalf and refunds transactions that overpay.
1616

1717
Gas fee refunds include both priority fees (more common in user transactions) and coinbase transfers (less common).
1818

1919
## Which transactions receive refunds
2020

21-
Flashbots provides refunds for transactions in blocks landed by the Flashbots block builder. Whether a transaction receives a refund depends on a few factors that vary from block to block:
21+
Flashbots Protect provides refunds for transactions in blocks landed by BuilderNet. Whether a transaction receives a refund depends on a few factors that vary from block to block:
2222
* How much network congestion and competition there was
23-
* Whether the Flashbots builder made a profit and how much
23+
* Whether BuilderNet made a profit and how much
2424
* How much the specific transaction contributed to the value of the block
25-
* If the transaction was sent directly to Flashbots, or shared with other RPCs and block builders
25+
* If the transaction was sent directly to Flashbots Protect, or shared with other RPCs and block builders
2626

2727
Note that transactions seen in the public mempool are excluded and do not receive refunds.
2828

2929
## How to maximize both refunds and speed
3030

31-
Transactions which are sent directly to the Flashbots RPC or API, and not multiplexed _by the user_ to other RPCs or block builders, are likely to receive higher refunds. This is because they increase the profit of the Flashbots builder which is used to provide refunds.
31+
Transactions which are sent directly to the Flashbots RPC or API, and not multiplexed _by the user_ to other RPCs or block builders, are likely to receive higher refunds. This is because they increase the profit of BuilderNet which is used to provide refunds.
3232

33-
The Flashbots block builder does not land 100% of blocks. In order to improve inclusion speed, users can ask Flashbots to share their transactions with other block builders in cases where the Flashbots builder does not win a block. Flashbots will automatically share with all specified builders on the user's behalf.
33+
BuilderNet does not land 100% of blocks. In order to improve inclusion speed, users can ask Flashbots to share their transactions with other block builders in cases where BuilderNet does not win a block. Flashbots will automatically share with all specified builders on the user's behalf.
3434

3535
There are two ways to share with other builders:
3636
* Use [fast mode](/flashbots-protect/quick-start#faster-transactions) to share with all registered builders
@@ -44,7 +44,7 @@ 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. Refunds are sent to recipients in batches, the first batch originated from our builder address `0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555` while newer batches originate from [`refunds.buildernet.eth`](https://etherscan.io/address/0x62a29205f7ff00f4233d9779c210150787638e7f). The recipient can track the status of their refunds using the [`flashbots_getFeeRefundTotalsByRecipient`](/flashbots-auction/advanced/rpc-endpoint#flashbots_getfeerefundtotalsbyrecipient) RPC method.
47+
Refunds are tracked from a start date of July 8, 2024. Refunds are sent to recipients in batches, the first batch originated from the Flashbots builder address `0xdf99A0839818B3f120EBAC9B73f82B617Dc6A555` while newer batches originate from [`refunds.buildernet.eth`](https://etherscan.io/address/0x62a29205f7ff00f4233d9779c210150787638e7f). The recipient can track the status of their refunds using the [`flashbots_getFeeRefundTotalsByRecipient`](/flashbots-auction/advanced/rpc-endpoint#flashbots_getfeerefundtotalsbyrecipient) RPC method.
4848

4949
## Distributed refunds
5050

0 commit comments

Comments
 (0)