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

cancelations/replacementUuid/revertMode for sbundles update #566

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions docs/flashbots-auction/advanced/bundle-cancellations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Bundles can be replaced and canceled using a unique identifier (`replacementUuid
maxTimestamp,
revertingTxHashes,
replacementUuid, // UUIDv4 to uniquely identify submission
builders,
}
]
}
Expand All @@ -36,6 +37,7 @@ To replace a bundle, send the new bundle via `eth_sendBundle` with the same `rep
### Canceling bundles

Canceling a bundle will prevent Flashbots builders from including it on-chain. To cancel a bundle, call the [`eth_cancelBundle`](/flashbots-auction/advanced/rpc-endpoint#eth_cancelbundle) endpoint, or use the `cancelBundle` function in your preferred [Flashbots library](/flashbots-auction/libraries/bundle-relay).
It is important to use the same set of builders as the original bundle submission to achieve a successful cancellation.

```json
{
Expand All @@ -45,6 +47,7 @@ Canceling a bundle will prevent Flashbots builders from including it on-chain. T
"params": [
{
replacementUuid, // UUIDv4 to uniquely identify submission
builders,
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,16 @@ MEV-Share bundles can share hints with searchers, which can be used to backrun t

Searchers can share hints to give other searchers information about their bundle that would allow them to be backrun. If your bundle gets backrun by another searcher, you get paid a cut of the MEV they extract!

## Revert mode
Revert mode field is optional, if set - it is preferred over `canRevert` field. Revert mode `allow` corresponds to `canRevert: true`, `fail` corresponds to `canRevert: false`.
Revert mode `drop` is preferred in most scenarios, since it allows for your tx to be dropped if it can't be included in the block, which is used to merge multiple backruns for the same bundle.

## Builders
MEV-Share bundles can be sent to multiple builders at once. This is done by setting the `builders` field in the `privacy` parameter of `mev_sendBundle`.

### Replacement uuid
If `replacementUuid` is set, only builders that support cancellations will be processed. You can check list of builders [here](https://github.com/flashbots/dowg/blob/main/builder-registrations.json)

## Bundle composition (backrunning other bundles)
With the `privacy` parameter in `mev_sendBundle` you can share select information about your bundle with other searchers, who can then use that to try to extract MEV. Should they succeed, you get paid some of the MEV they extracted!

Expand Down
3 changes: 2 additions & 1 deletion docs/specs/mev-share/_mev_sendBundle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
method: "mev_sendBundle",
params: [{ /* MevSendBundleParams */
version: "v0.1",
replacementUuid?: string,
inclusion: {
block: string, // hex-encoded number
maxBlock?: string, // hex-encoded number
},
body: Array<
{ hash: string } |
{ tx: string, canRevert: boolean } |
{ tx: string, canRevert: boolean, revertMode?: "allow" | "drop" | "fail" } |
{ bundle: MevSendBundleParams }
>,
validity?: {
Expand Down
Loading