Mev Modules
Clanker v4.0.0 introduces the ability to modify a pool's behavior at the time of deployment through different MEV modules. Our long-term goal for these modules is to capture more value from the sniping activity on our pools, but initially they are being utilized to fix negative externalities enabled by our older contracts' usage of Uniswap v3.
When Clanker was initially deployed on v3, searchers caused a spike in the gas price of the network by attempting to search for deployments in the same block (documented here). The solution to this problem was to add a delay between when a pool was deployed and when it is swappable. Our initial MEV module, ClankerMevModuleDelay, is used to add a delay between when a pool is deployed and when it is enabled for searching.
We plan to add more MEV modules in the future to allow for more complex behaviors.
Functionality
MEV modules are specified on pool deployment and are enabled after a token has finished deploying. This happens after extensions have finished executing to allow extensions to either make swaps or add liquidity to the pool.
MEV Modules are active until they disable themselves or expire after 2 minutes. We have this expiry period as a safeguard in case the pool's underlying sequencer environment changes and the MEV module breaks. Additionally, liquidity adds are restricted during the MEV module's operation, as we want to reserve the ability to use the donate()
function to send payments to only the beneficiaries of the original LP position.
Last updated