Blockchain Mempool Monitor
Catch phishing before it is mined
Scores pending Ethereum transactions for phishing and bans the sender only after an M-of-N multisig agrees.
Blockchain Mempool Monitor watches pending Ethereum transactions, scores them for phishing before they are mined and explains why each alert fired. Alerts are written to an on-chain audit log, and a ban only takes effect once enough multisig owners confirm it. A live demo on a private test chain shows an attack go from the mempool to a ban in about 10 seconds.
What it does
- Risk model trained on 4,998 real phishing transactions (PTXPhish, NDSS 2025) and random mainnet traffic: ROC-AUC 0.982 on scammers it never saw.
- Two thresholds set from measured false-positive rates: act at about 0.1% (log on-chain and propose a ban), review at about 1% (flag for a human).
- Replaced a v1 model trained on synthetic data that scored ROC-AUC 0.41 on real transactions; every rule was re-measured and noisy ones were demoted to signals.
- Gradient-boosted trees exported to JSON and scored in pure Python: no pickle and no ML framework at runtime.
- Separation of powers: the backend key can record alerts but cannot ban, and its vote is only one of M on the MultiSigWallet.
- Grouped cross-validation keeps test scammers out of training, and on-chain context is fetched at the block before each transaction to avoid leakage.
- Live dashboard over Server-Sent Events with an attack lab, alert explanations and wallet-based multisig governance.
How it works
The monitor polls the node's pending transactions and adds cheap on-chain context such as base fee, callee code size and who receives the rights or assets. The inference service returns a risk score, the reasons and the likely suspect, who is not always the signer. Above the act threshold, the alert is recorded in the AlertManager contract and a ban is proposed to the multisig. The ban executes only after M owners confirm it.
Deployment
The public demo runs as one container: a Hardhat node with interval mining, the contracts, the inference service and the backend serving the built UI. It boots in about 10 seconds and uses about 170 MB. A production path deploys the contracts to a real network and runs each service behind nginx with strict secret and CORS checks.




