finds.dev← search

// the find

bertmiller/sMEV

★ 494 · Solidity · updated Sep 2021

A searcher bot built to backrun a single Synthetix governance transaction in 2021, liquidating sETH/sUSD loans on dYdX the moment they became liquidatable. It's for people who want to study a real, documented MEV extraction case rather than use the code for anything live — the author says so outright in the README.

The write-up linked from the README actually explains the mempool-watching and backrun strategy, which is rarer than the code itself; most MEV repos ship with zero rationale. The contracts split cleanly into a custom oracle (sAssetsOracle.sol) for cheaper on-chain data reads and a dedicated liquidator contract, so you can see how the author optimized gas and data freshness separately. The data/ directory keeps real loan IDs and optimal liquidation ordering from the actual event, so you're looking at the output of genuine research, not a contrived demo.

The hardhat test setup is explicitly called 'messy' by the author and was never cleaned up, so there's no real test suite to learn from or trust. Everything is hardcoded to one historical event — addresses, loan IDs, configs are flat JSON dumps specific to the Synthetix deprecation, giving you nothing reusable for a different liquidation target. The core execution logic in index.js has no inline comments explaining the backrun timing or bundle construction; you're entirely dependent on the external blog post to understand what the code is doing. Five years stale (last push 2021), so the hardhat/ethers dependencies and the dYdX integration are almost certainly broken against current infrastructure.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →