diff --git a/docs/flashbots-mev-share/searchers/cancelling-bundles.mdx b/docs/flashbots-mev-share/searchers/cancelling-bundles.mdx new file mode 100644 index 00000000..577d8f48 --- /dev/null +++ b/docs/flashbots-mev-share/searchers/cancelling-bundles.mdx @@ -0,0 +1,26 @@ +--- +title: Cancelling Bundles +--- + +import CancelBundleRpc from '@site/docs/specs/mev-share/_mev_cancelBundle.mdx' + + +In case original bundle contained `replacementUuid` you can cancel it using this endpoint. +Note, cancelling a bundle via replacing it with incorrect bundle with the same `replacementUuid` is not guaranteeing that +the original bundle will be cancelled. + +## Cancel bundle endpoint + + + +### Example body + +```json +{"id":1,"jsonrpc":"2.0","method":"mev_cancelBundle","params":[{"replacementUuid":"123"},["beaverbuild.org","titan","rsync"]]} +``` + + +## Builders +It is encouraged to use the same set of builders as the original bundle. This is to ensure that the bundle is cancelled correctly. +In case you omitted second argument, bundle will still be cancelled but underlying operation will be less performant. +List of builders that support bundle cancellation can be found [here](https://github.com/flashbots/dowg/blob/main/builder-registrations.json) diff --git a/docs/flashbots-mev-share/searchers/understanding-bundles.mdx b/docs/flashbots-mev-share/searchers/understanding-bundles.mdx index 74469ab8..54b52742 100644 --- a/docs/flashbots-mev-share/searchers/understanding-bundles.mdx +++ b/docs/flashbots-mev-share/searchers/understanding-bundles.mdx @@ -37,6 +37,10 @@ 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`. diff --git a/docs/sidebars.js b/docs/sidebars.js index 274c93e9..c4f4cca9 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -128,6 +128,7 @@ module.exports = { 'flashbots-mev-share/searchers/event-stream', 'flashbots-mev-share/searchers/understanding-bundles', 'flashbots-mev-share/searchers/sending-bundles', + 'flashbots-mev-share/searchers/cancelling-bundles', 'flashbots-mev-share/searchers/debugging', { 'Tutorials': [ diff --git a/docs/specs/mev-share/_mev_cancelBundle.mdx b/docs/specs/mev-share/_mev_cancelBundle.mdx new file mode 100644 index 00000000..cfccd2cb --- /dev/null +++ b/docs/specs/mev-share/_mev_cancelBundle.mdx @@ -0,0 +1,13 @@ +```typescript +{ + jsonrpc: "2.0", + id: string | number, + method: "mev_cancelBundle", + params: [ + { + replacemendUuid: string, + }, + Array, /* Array of builders, optional argument */ + ] +} +``` diff --git a/docs/specs/mev-share/_mev_sendBundle.mdx b/docs/specs/mev-share/_mev_sendBundle.mdx index 335f599f..59384490 100644 --- a/docs/specs/mev-share/_mev_sendBundle.mdx +++ b/docs/specs/mev-share/_mev_sendBundle.mdx @@ -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?: {