Macro brontes_inspect::define_mev_precedence

source ·
macro_rules! define_mev_precedence {
    ($($($subordinate_mev_type:ident),+ => $dominant_mev_type:ident;)+) => { ... };
}
Expand description

Defines precedence rules among different MEV types for the purpose of deduplication.

This macro creates a static reference (MEV_DEDUPLICATION_FILTER) that maps a list of subordinate MEV types to each dominant MEV type. These rules are used to determine which MEV types should be considered for deduplication when multiple types are present for overlapping transactions.

§Usage

define_mev_precedence!(
    SubordinateMevType1, SubordinateMevType2 => DominantMevType;
);

In this example, DominantMevType takes precedence over SubordinateMevType1 and SubordinateMevType2 for deduplication purposes.

Example of defining multiple precedence rules:

define_mev_precedence!(
    Backrun => Sandwich;
    Backrun => Jit;
    Backrun => JitSandwich;
);

In these examples, Backrun is considered subordinate to Sandwich, Jit, JitSandwich.