meva

uniswap v4 hook that taxes mev bots and redistributes profits as dividends to lps & victims

meva

Created At

HackMoney 2026

Project Description

meva flips the mev game. instead of fighting sandwich bots (which always fails), we tax them and share the profits.

our uniswap v4 hook detects bots using on-chain signals: high gas prices, contract callers, known addresses, and rapid-fire swaps. detected bots pay 10-50% tax on their trades. normal users pay standard 0.3% fees.

captured mev flows to a dividend vault and splits: 50% to liquidity providers as extra yield, 30% as rebates to sandwich victims, 20% to protocol stakers.

bots can self-register as "licensed" (0.1 eth fee) for lower 10% tax—civilizing mev instead of eliminating it.

result: bots still profit (less), users get compensated, lps earn more, everyone wins.

How it's Made

core is a uniswap v4 hook (MevaHook.sol) using beforeSwap to analyze transactions and override fees dynamically. bot detection scores addresses based on: known registry match (+100), gas price vs rolling average (+35 if 3x), extcodesize check for contracts (+25), swap size (+15), same-block swaps (+20). score ≥60 triggers bot tax.

built with foundry + solidity 0.8.26. extends BaseHook from v4-periphery, uses LPFeeLibrary.OVERRIDE_FEE_FLAG for dynamic fees. MevaVault handles dividend distribution with masterchef-style accounting (accDividendPerShare pattern) for gas-efficient claims.

BotRegistry allows self-licensing via payable function—bots register to pay lower taxes, creating protocol revenue. 61 unit tests covering detection logic, vault accounting, and edge cases.

hacky bit: test harness overrides validateHookAddress() to bypass v4's address-based permission system during testing.

background image mobile

Join the mailing list

Get the latest news and updates

meva | ETHGlobal