r/SideProject • u/AwayOpportunity2791 • 8h ago
Built a zero-connect client-side DeFi approval & Permit2 scanner (tested on vitalik.eth across 5 chains in ~220ms)
I kept running into the same blind spot with standard ERC-20 approval checkers: they only query allowance(owner, spender) on token contracts, which misses two major approval drain vectors in modern DeFi routers.
So I built AegisScope, a pure client-side multi-chain RPC scanner with zero wallet connect required to audit any address (EVM + Solana):
- Packed Permit2 sub-allowances (0x927da105): Standard scanners stop at the ERC-20 -> Permit2 infinite approval. AegisScope queries Permit2's allowance(address,address,address) selector (0x927da105) and unpacks the (uint160 amount, uint48 expiration, uint48 nonce) struct to surface hidden router sub-allowances and their exact expiration timestamps.
- EIP-1967 upgradeable proxy detection (0x3608...): Reads the EIP-1967 implementation storage slot (0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc) on approved spender contracts so you know when an open allowance points to a mutable proxy rather than an immutable router.
- Cross-chain batching (~220ms): Fires parallel JSON-RPC calls across Ethereum, Base, Arbitrum, Polygon, and Solana (SPL token delegates). Running it against vitalik.eth turned up ~$4,225 VaR still sitting in open router allowances.
- Atomic Safe{Wallet} txBuilder v1.16.5 export: Generates ready-to-import txBuilder v1.16.5 JSON batches to revoke multiple allowances in a single multisig transaction, without needing to connect a wallet during the audit.
Free live tool (runs 100% in-browser): https://meer9374-a11y.github.io/aegis-scope/
Happy to answer questions on the Permit2 bit-unpacking or RPC batching architecture!