# ๐นโ mev toolkit
## tl; dr
#### ๐พ maximal extractable value (MEV) encompasses the profits generated by participant parties in the block production supply chain. for searchers, this revenue can be generated from arbitrage when reducing the price spread between markets (which is also reflected in impermanent loss of liquidity providers), slippage loss of swap users, frontrunning users' transactions, among other [strategies](MEV_strategies).
#### ๐พ the public discussion around MEV started by [pmcgooohan](https://twitter.com/pmcgoohancrypto?lang=en) on [e/ethereum](https://www.reddit.com/r/ethereum/comments/2d84yv/miners_frontrunning/), and it was formalized by [phildaiann et. al](https://twitter.com/phildaian)'s paper [flash boys 2.0](https://arxiv.org/abs/1904.05234).
#### ๐พ MEV extraction can be a force of good in a non-predatory and [fair](https://twitter.com/bertcmiller/status/1456346690164768770) blockspace free-market as an incentive for economic security. every actor in the supply chain is relevant. order flow toxicity is a trader's exposure to counter-parties that possess private informational advantages. as everything in life, *the most valuable commodity is information*.
#### โ ๏ธ this repository is an ongoing boundless catalog from my own research. therefore, no guarantees, use it at your own risk.
---
## ๐ notes && code in this repo
### extraction strategies
* [sniping](MEV_strategies/sniping)
* [longtails](MEV_strategies/longtails)
* [arbitrage](MEV_strategies/arbitrage)
* [sandwich](MEV_strategies/sandwich)
* [flashloans](MEV_strategies/flashloans)
* [jit liquidity](MEV_and_trading/protocols/uniswap/uniswap-v3/just-in-time.md)
* [liquidation](MEV_strategies/liquidations)
* [frontrunning](MEV_strategies/frontrunning)
* [backrunning](MEV_strategies/backrunning)
* [oracles and twamm](MEV_strategies/oracles)
* [statistical approaches](MEV_strategies/statistical)
### mev on the chains
* [mev on solana](MEV_by_chains/MEV_on_Solana)
* [mev on cosmos](MEV_by_chains/MEV_on_Cosmos)
* [mev on polygon](MEV_by_chains/MEV_on_Polygon)
* [mev on arbitrum](MEV_by_chains/MEV_on_Arbitrum)
* [mev on optimism](MEV_by_chains/MEV_on_Optimism)
* [mev on ethereum](MEV_by_chains/MEV_on_Ethereum)
* [mev on bsc chain](MEV_by_chains/MEV_on_BSC)
* [mev on avalanche](MEV_by_chains/MEV_on_Avalanche)
### building a toolkit
* [mev projects](MEV_projects)
* [defi and trading](MEV_and_trading)
* [build your mev bot](MEV_searchers)
* [cross-domain mev](MEV_searchers/cross_domain_mev)
* [latency optimization](MEV_searchers/latency)
* [exclusive order flows](MEV_searchers/private_order_flows)
---
## ๐ seacher tools
### tx && signature explorers
* [bloxy, by bitquey](https://bloxy.info/)
* [tx.eth.samczsun.com](https://tx.eth.samczsun.com/)
* [tx explorer, by blocksec](https://phalcon.blocksec.com/)
* [zero mev, by pmcgoohan](https://www.zeromev.org/)
* [ethvm ethereum explorer](https://www.ethvm.com/)
* [mev explorer, by eigenphi](https://www.eigenphi.io/)
* [signature database import](https://openchain.xyz/signatures)
* [ethtx transaction decoder](https://ethtx.info/)
* [abi for unverified contracts](https://abi.w1nt3r.xyz/)
* [bundle explorer, by flashbots](https://flashbots-explorer.marto.lol/)
* [explorer and txs, by anyblock](https://explorer.anyblock.tools/)
* [txn finance, by band protocol](https://txn.finance/)
* [block explorer, by blockchair](https://blockchair.com/ethereum)
* [block explorer, by blockscout](https://blockscout.com/eth/mainnet/)
* [mev dashboard, by metablock](https://mev.metablock.dev/1/dashboard)
* [ethereum signature database](https://www.4byte.directory/)
* [address explorer, by breadcrumbs](https://www.breadcrumbs.app/home)
* [ethereum token explorer, by diem](https://ethplorer.io/)
* [public mev explorer, by metablock](https://metablock.dev/tools/mev/)
* [block and tokens explorer, by oklink](https://www.oklink.com/en/eth)
### data && analytics
* [parsec.finance](https://parsec.finance/)
* [token terminal](https://tokenterminal.com/terminal)
* [nansen analytics](https://www.nansen.ai/)
* [flashloans, by blocksec](https://tools.blocksec.com/flashloan/eth)
* [etherscan data on flashbots](https://etherscan.io/blocks/label/flashbots)
* [mev live-stream, by eigenphi](https://eigenphi.io/)
* [mev dashboard, by flashbots](https://explore.flashbots.net/)
* [mev data corpus, by manifold](https://github.com/manifoldfinance/mev-corpus)
* [ethereum datafarm, by nerolation](https://github.com/Nerolation/ethereum-datafarm)
* [cross-domain arbitrage tracker, by odos](https://www.odos.xyz/arbitrage)
##### dune boards
* [solana mev data](https://dune.com/chorus_one_research/solana-mev-data)
* [ethereum tx reverts](https://dune.com/kroeger0x/ethereum-transaction-reverts)
* [mev flashbots unleashed](https://dune.com/ivanmolto/mev-flashbots-unleashed)
* [dune board for gas prices](https://dune.com/kroeger0x/gas-prices)
* [flashbots data for extracted good mev](https://dune.com/chorus_one/ethereum-mev-data)
* [sleuthing hashed function and event signatures](https://dune.com/agaperste/event-and-function-signature-sleuthing?)
* [just-in-time liquidity sandwich large trades in uniswap v3](https://dune.com/ChainsightAnalytics/Uniswap-v3-Just-in-Time-(JIT)-Liquidity-MEV)
* [all uniswap v3 mev activity](https://dune.com/alexth/uniswap-v3-mev-activity) and [all uniswap v2 mev activity](https://dune.com/alexth/uniswap-v2-mev)
* [mev-boost blocks w/ last tx w/ transfer from fee receiver to validator address](https://dune.com/ChainsightAnalytics/mev-after-ethereum-merge)
### other resources
* [dapp.tools](https://dapp.tools/)
* [back run me](https://backrunme.com/swap)
* [revoke.cash](https://revoke.cash/)
* [eth detective](https://www.ethtective.com/address/)
* [eth converter](https://eth-converter.com/)
* [calldata decoder](https://tools.deth.net/calldata-decoder)
* [ankr rpc endpoints](https://www.ankr.com/rpc/)
* [contracts diff checker](https://etherscan.io/contractdiffchecker)
* [token security detector](https://gopluslabs.io/token-security/)
* [ultrasound money dashboard](https://ultrasound.money/)
* [smart contract allowance checker](https://app.unrekt.net/)
* [whatsabi: guess an abi for ethereum contracts](https://github.com/shazow/whatsabi)
* [source of deployed ethereum contracts in vscode](https://github.com/dethcrypto/dethcode)
##### gas trackers
* [gastrology](https://dethgasstation.eth.link/)
* [gas price io](https://www.gasprice.io/)
* [eth gas alert](https://ethgasalerts.xyz/)
* [nansei gas tracker](https://pro.nansen.ai/gas-tracker)
* [gas fee prediction](https://www.blocknative.com/gas-estimator)
* [ethereum gas tracker](https://www.useweb3.xyz/gas)
##### news and alerts
* [highgwei bot](https://twitter.com/HighGwei)
* [eigenphi bot](https://twitter.com/EigenPhi_Alert)
* [mevwatch bot](https://twitter.com/mevwatchbot)
* [mevboost bot](https://twitter.com/MevBoostBot)
* [mevrefund bot](https://twitter.com/MevRefund)
* [eigenphi mirror](https://mirror.xyz/0xc19565163aFdEe3783FC970E4Bd0275B11848d34)
* [mev proposer bot](https://twitter.com/mevproposerbot)
* [flashbots discourse](https://collective.flashbots.net/)
---
## ๐ฟ canonical readings
- [mev and me, by paradigm](https://research.paradigm.xyz/MEV)
- [return to the dark forest, by rekt](https://rekt.news/return-to-the-dark-forest/)
- [hiding in plain sight, by samczsun](https://samczsun.com/hiding-in-plain-sight/)
- [we live in a mempool, by tom schmidt](https://medium.com/dragonfly-research/we-live-in-a-mempool-backrunning-the-mev-crisis-a4ea0b493b05)
- [escaping the dark forest, by samczsun](https://samczsun.com/escaping-the-dark-forest/)
- [ethereum is a dark forest, by paradigm](https://www.paradigm.xyz/2020/08/ethereum-is-a-dark-forest)
- [how to light up the dark forest, by robert miller](https://writings.flashbots.net/writings/the-anatomy-of-an-inspector/)
- [the 0 to 1 guide to mev, by blockchain at berkeley](https://calblockchain.mirror.xyz/c56CHOu-Wow_50qPp2Wlg0rhUvdz1HLbGSUWlB_KX9o)
- [how to build an ethereum mining pool, by dragonfly](https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a)
- [how i learned to stop worrying and love mev, by sreeni](https://medium.com/dragonfly-research/dr-reorg-or-how-i-learned-to-stop-worrying-and-love-mev-2ee72b428d1d)
- [the enemy of your enemy is not your friend, by kobayashi](https://fiona.mirror.xyz/QXdCOAggA5g_j5R_JpO-V5LqK89EbimnYIV6c2rOsT0)
- [wrecking sandwich traders for fun and profit, by n. worsley](https://github.com/Defi-Cartel/salmonella)
- [foundations of blockchains and mev, by tim roughgarden](https://timroughgarden.github.io/fob21/)
- [tricking frontrunners into being transaction relayers, by sankar4033](https://ethresear.ch/t/surrogeth-tricking-frontrunners-into-being-transaction-relayers/6937/1)
- [implementing ethereum trading front-runs on the bancor exchange, by ivan bogatyy](https://hackernoon.com/front-running-bancor-in-150-lines-of-python-with-ethereum-api-d5e2bfd0d798)
### ideas and wikis
* [the daily ape on mev](https://thedailyape.notion.site/MEV-8713cb4c2df24f8483a02135d657a221)
* [mev.day amsterdam 2022](https://mevday.org/)
* [mev research, by eigenphi](https://www.eigenphi.io/mev/research)
* [mev wiki, by automata network](https://www.mev.wiki/)
* [mev extraction strategies, by r. miller](https://docs.google.com/presentation/d/1YVFLnh_MnDtDDQjucW-UKxLD28iGlyi_Pj1ri_hGqRs/edit#slide=id.g124f588a727_0_51)
* [mev auction, by the ethereum foundation](https://ethresear.ch/t/mev-auction-auctioning-transaction-ordering-rights-as-a-solution-to-miner-extractable-value/6788)
* [cryptocurrency historical data snapshot](https://coinmarketcap.com/historical/)
* [mempool privacy research list, by a. obadia](https://collective.flashbots.net/t/bookmarks-relevant-for-mempool-privacy-researchers/1091)
### research papers
- [flash boys 2.0, by p. daian et al.](https://arxiv.org/pdf/1904.05234.pdf)
- [combining ghost and casper, by vitalik et al.](https://arxiv.org/abs/2003.03052)
- [towards a theory of mev I, by diamandis et al.](https://people.eecs.berkeley.edu/~ksk/files/MEV_CFMM.pdf)
- [mev on ethereum: a policy analysis, by m. barczentewicz](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4332703)
- [two attacks on pos ghost/ethereum, by joachim neu et al.](https://arxiv.org/abs/2203.01315)
- [censorship resistance in on-chain auctions, by m. pai et al.](https://github.com/eljhfx/Decentralized-Auctions/blob/main/Censorship_Resistance_in_On-Chain_Auctions.pdf)
- [three attacks on pos ethereum, by caspar schwarz-schilling et al.](https://arxiv.org/abs/2110.10086)
- [quantifying blockchain extractable value: how dark is the forest?, by kaihua qin et al.](https://arxiv.org/pdf/2101.05511.pdf)
- [transparent dishonesty: front-running attacks on blockchain, by shayan eskandari et al.](https://arxiv.org/pdf/1902.05164.pdf)
---
## ๐ญ [bonus] ๐ฅ๐๐ ๐๐๐๐ ๐ ๐ ๐ ๐๐ช๐ก๐๐๐ฃ๐ก๐ฆ๐๐
* [teal organizations wiki](https://reinventingorganizationswiki.com/)
* [the hacker manifest, by the mentor](http://phrack.org/issues/7/3.html)
* [bitcoin whitepaper by satoshi nakamoto](https://bitcoin.org/bitcoin.pdf)
* [the cypherpunk manifest, by eric hughes](https://activism.net/cypherpunk/manifesto.html)
* [the meaning of decentralization, by vitalik](https://medium.com/@VitalikButerin/the-meaning-of-decentralization-a0c92b76a274)
* [the crypto anarchist manifest, by timothy c. may](https://nakamotoinstitute.org/crypto-anarchist-manifesto/)
* [a graduate course in applied cryptography, by dan boneh](http://toc.cryptobook.us/)