Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp protect docs with new settings guide #578

Merged
merged 4 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/flashbots-auction/advanced/rpc-endpoint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ example response:

#### `privacy`

By default, transactions are sent to the Flashbots MEV-Share Node with the default [Stable](/flashbots-protect/mev-share#stable-configuration) configuration. The `privacy` parameter allows you to specify your own privacy parameters.
By default, transactions are sent to the Flashbots MEV-Share Node with the default [Stable](/flashbots-protect/mev-refunds#stable-configuration) configuration. The `privacy` parameter allows you to specify your own privacy parameters.

| Param | Type Info | Description |
| --- | --- | --- |
Expand Down
2 changes: 1 addition & 1 deletion docs/flashbots-mev-share/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Users send their transactions to a specialized actor called a MEV-Share Node. Th
At the moment, MEV-Share Nodes ony accept backruns.

## How do I use MEV-Share?
The most simple way to use MEV-Share is by sending transactions to [Flashbots Protect](/flashbots-protect/quick-start), which leverages the [Flashbots MEV-Share Node](/flashbots-protect/mev-share). Wallet and application developers should check out the [Flashbots Protect MEV-Share section](/flashbots-protect/mev-share) for information about integrating and configuring the Flashbots MEV-Share Node.
The most simple way to use MEV-Share is by sending transactions to [Flashbots Protect](/flashbots-protect/quick-start), which leverages the [Flashbots MEV-Share Node](/flashbots-protect/mev-refunds). Wallet and application developers should check out the [Flashbots Protect MEV-Share section](/flashbots-protect/mev-refunds) for information about integrating and configuring the Flashbots MEV-Share Node.

## How do I search on MEV-Share?
Searchers should see the [Getting Started](/flashbots-mev-share/searchers/getting-started) guide for a walkthrough of MEV-Share and how it differs from traditional searching.
2 changes: 1 addition & 1 deletion docs/flashbots-mev-share/orderflow-providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
title: For Orderflow Providers
---

Flashbots runs a MEV-Share Node that can be used by sending transactions to [Flashbots Protect](/flashbots-protect/quick-start). Wallets and application developers should see the [Protect MEV-Share Node guide](/flashbots-protect/mev-share) to configure your integration.
Flashbots runs a MEV-Share Node that can be used by sending transactions to [Flashbots Protect](/flashbots-protect/quick-start). Wallets and application developers should see the [Protect MEV-Share Node guide](/flashbots-protect/mev-refunds) to configure your integration.
4 changes: 2 additions & 2 deletions docs/flashbots-mev-share/release-notes/2023-07.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## customized refunds

Configure the percent(s) and recipient(s) for MEV-Share refunds by adding the [`refund`](/flashbots-protect/mev-share#refunds) query parameter to Protect RPC requests
Configure the percent(s) and recipient(s) for MEV-Share refunds by adding the [`refund`](/flashbots-protect/settings-guide#refunds) query parameter to Protect RPC requests
or by adding `preferences.validity.refund` argument to the `eth_sendPrivateTransaction` JSON-RPC [method](/flashbots-auction/advanced/rpc-endpoint#eth_sendprivatetransaction).

## builder sharing
Share transactions and bundles with additional builders for faster inclusion.

- Users: [Opt in to share with registered builders](/flashbots-protect/mev-share#builders)
- Users: [Opt in to share with registered builders](/flashbots-protect/settings-guide#builders)
- Builders: [Register to receive bundles](https://github.com/flashbots/dowg#builders)

## debugging guide
Expand Down
2 changes: 1 addition & 1 deletion docs/flashbots-mev-share/release-notes/2023-09.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## default logs hint

A new hint which shares a subset of logs, as described in the [stable configuration](/flashbots-protect/mev-share#stable-configuration).
A new hint which shares a subset of logs, as described in the [hints] settings(/flashbots-protect/settings-guide#hints).

Previously these logs were shared by default. Now, users of the private transaction API, Protect RPC, and bundle relay can also request to share these logs when customizing their settings.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Client libraries have been developed for the following programming languages (mo

To reiterate our goal, we need to find pending transactions from other Ethereum users and backrun them (send our transaction immediately after the user's transaction). If the user's trade moves the price enough, we'll arbitrage the trading pair between two exchanges for a profit.

As MEV-Share receives new transactions, it broadcasts them to searchers via the [Event Stream](/flashbots-mev-share/searchers/event-stream). Each transaction shares varying amounts of data via [hints](/flashbots-protect/mev-share#hints), but by default, transactions that trade on Uniswap, Balancer, or Curve will expose the trading pair's contract address in the log topics.
As MEV-Share receives new transactions, it broadcasts them to searchers via the [Event Stream](/flashbots-mev-share/searchers/event-stream). Each transaction shares varying amounts of data via [hints](/flashbots-protect/mev-refunds#hints), but by default, transactions that trade on Uniswap, Balancer, or Curve will expose the trading pair's contract address in the log topics.

Here's an example of an event generated by a user who's (most likely) using MEV-Share's default privacy settings:

Expand Down Expand Up @@ -141,7 +141,7 @@ _To read more about how the SSE stream works, see the [Event Stream docs](/flash

## Filtering Relevant Transactions

MEV-Share uses [**hints**](/flashbots-protect/mev-share#hints) to selectively share information about a transaction. Based on the hint preferences specifies by the user when connecting, the transactions (or bundles) they send will trigger events containing information about their transaction which is filtered according to their hint preferences.
MEV-Share uses [**hints**](/flashbots-protect/mev-refunds#hints) to selectively share information about a transaction. Based on the hint preferences specifies by the user when connecting, the transactions (or bundles) they send will trigger events containing information about their transaction which is filtered according to their hint preferences.

In this guide, we're only concerned with the fields in `logs`: `address` and `topics`. Other fields not covered in this guide are detailed in the [Event Scheme docs](/flashbots-mev-share/searchers/event-stream#event-scheme).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Once all the transactions you want to include in your bundle are added to the qu

If you're being helped with a whitehat recovery, we may provide a web interface for you to do this.

If you want to send a bundle directly, check out the [Flashbots Auction Docs](/flashbots-auction/quick-start#how-to-send-your-first-flashbots-bundle) for instructions on how to do this.
If you want to send a bundle directly, check out the [Flashbots Builder Docs](/flashbots-auction/quick-start#how-to-send-your-first-flashbots-bundle) for instructions on how to do this.

## Fake Funds

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ example response:

#### Privacy options

By default, transactions are sent to the Flashbots MEV-Share Node with the default [Stable](/flashbots-protect/mev-share#stable-configuration) configuration. The `privacy` parameter allows you to customize privacy settings:
By default, transactions are sent to the Flashbots MEV-Share Node with the default [Stable](/flashbots-protect/mev-refunds#stable-configuration) configuration. The `privacy` parameter allows you to customize privacy settings:

| Parameter | Type | Description |
| ---------- | ------------ | -------------------------------------------------------------------- |
Expand Down
6 changes: 3 additions & 3 deletions docs/flashbots-protect/gas-fee-refunds.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Gas Fee Refunds

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.

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, refunds from [MEV-Share](/flashbots-protect/mev-share).
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).

## Where do refunds come from

Expand Down Expand Up @@ -34,11 +34,11 @@ The Flashbots block builder does not land 100% of blocks. In order to improve in

There are two ways to share with other builders:
* Use [fast mode](/flashbots-protect/quick-start#faster-transactions) to share with all registered builders
* Choose [specific builders](/flashbots-protect/mev-share#builders) to share transactions with
* Choose [specific builders](/flashbots-protect/settings-guide#builders) to share transactions with

## Who receives refunds

For the RPC: The refund recipient is the address specified in the first [refund parameter](/flashbots-protect/mev-share#refunds) on an RPC request, if one is provided. Otherwise, refunds are sent to the transaction originator (`tx.origin`) by default.
For the RPC: The refund recipient is the address specified in the first [refund parameter](/flashbots-protect/settings-guide#refunds) on an RPC request, if one is provided. Otherwise, refunds are sent to the transaction originator (`tx.origin`) by default.

For the private transaction API: The refund recipient is the signer used on the `eth_sendPrivateTransaction` request.

Expand Down
2 changes: 1 addition & 1 deletion docs/flashbots-protect/large-transactions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Large transaction allowlist
title: Large Transaction Allowlist
---

Some projects may need to post larger transactions (measured in bytes) than the transaction pool allows. Flashbots bundles are not subject to the transaction pool size constraints. However, at the RPC level only transactions to certain contracts are allowed to be over 128kb.
Expand Down
50 changes: 50 additions & 0 deletions docs/flashbots-protect/mev-refunds.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: MEV Refunds
---

import ProtectButton from '@site/src/components/ProtectButton';

## Introduction

Flashbots Protect users are automatically eligible to receive MEV refunds from [MEV-Share](/flashbots-mev-share/introduction). If your transaction (eg. a large DEX swap) generates MEV, MEV-Share can help you reclaim a significant portion of this value. The remainder is split with searchers and validators to facilitate transaction inclusion.

By default, all Protect transactions use the [default](/flashbots-protect/settings-guide#default) privacy setting which is continuously optimized by Flashbots to balance efficient execution and protection against harmful MEV. Advanced users can customize their settings when configuring their RPC or by manually editing the query parameters their Protect RPC request.

<ProtectButton />

## Common privacy settings

You can customize how much information is shared about your transactions in MEV-Share. Each piece of information is called a "hint". Sharing more hints can increase refunds, while sharing fewer hints can increase privacy. Below are some common hint choices for different levels of privacy. See the complete [settings page](/flashbots-protect/settings-guide) for a full list of all settings you can apply to your RPC request.

### Default

To use the default privacy settings, you don't need to specify any query parameters.

```url
https://rpc.flashbots.net
```

Currently, this configuration shares the following information:

- The `hash` of all transactions
- `default_logs` Partial logs (the pool id and the fact that a swap was made) for curve, balancer, and uniswapV2/V3-style trades

### Max Privacy

To use Protect with full privacy, set _only_ the `hash` hint in your Protect RPC URL:

```url
https://rpc.flashbots.net?hint=hash
```

This configuration ensures that all identifiable transaction data sent to the MEV-Share Node is concealed from searchers. However, it's important to note that this could make it more challenging for searchers to spot MEV opportunities, leading to a very likely decrease in your MEV refund.

### Max Refund

To use Protect with the maximum refund, set _all_ hints in your Protect RPC URL:

```url
https://rpc.flashbots.net?hint=calldata&hint=contract_address&hint=function_selector&hint=logs
```

This configuration provides searchers with comprehensive details about your transaction, giving them a better chance to identify more MEV opportunities and return MEV refunds.
119 changes: 0 additions & 119 deletions docs/flashbots-protect/mev-share.mdx

This file was deleted.

Loading
Loading