Can attacker use flash loan callback to make router impersonate arbitrary vault?
Collateral ownership verification
Liquidation/staking operations verify actual NFT/collateral owner?
Cross-contract state dependency
Multi-contract interactions free from intermediate state dependencies?
Cases
:
Code4rena 2024-04-noya H-08
(via
EVMbench Paper §4.2.1, Fig.6, p.8-9
) — PositionRegistry + BalancerFlashLoan pipeline lacked vault-level auth; keeper used flash loan to make router impersonate any vault, draining cross-vault funds via
sendTokensToTrustedAddress
Code4rena 2024-07-benddao
(via
EVMbench Paper Fig.13, p.19
) —
isolateLiquidate
did not verify NFT ownership, allowing attacker to pass others' tokenIds for liquidation
14. State Ordering & Counter Manipulation
Source:
EVMbench Paper Appendix H.1, Fig.19-21
/
Code4rena 2024-08-phi H-06
Check
Detail
Counter/ID increment order
credIdCounter++
or similar ID increments happen before external calls?
Auto-buy in create
create()
functions with auto
buy()
calls execute only after ID/state fully initialized?
Refund timing
ETH refund (excess) happens after all state updates complete?
Bonding curve metadata overwrite
Can attacker reenter to modify bonding curve/pricing params — buy cheap, switch to expensive curve, sell high?
Case
:
Code4rena 2024-08-phi H-06
(via
EVMbench Paper Appendix H.1, p.25-28
) —
_createCredInternal
called
buyShareCred
before incrementing
credIdCounter
;
_handleTrade
refunded excess ETH before updating
lastTradeTimestamp
. Attacker reentered to accumulate shares on cheap curve, overwrote metadata to expensive curve, sold to drain all contract ETH. Fix: add
nonReentrant
to
buyShareCred
/
sellShareCred
.
Infrastructure-Level Vulnerabilities
15. Frontend / UI Injection
Attackers inject malicious code into the dApp frontend or signing interface.
Defense
Verify transaction calldata matches expected function selector and parameters before signing. Use hardware wallet with on-device transaction preview. Audit all frontend dependencies regularly.
Case
:
Bybit (Feb 2025, $1.4B)
— malicious JavaScript injected into Safe{Wallet} UI, tampered with transaction data during signing.
16. Private Key & Social Engineering
Compromised keys remain the #1 loss source in 2025-2026.
Defense
Store keys in HSM or hardware wallet. Use multisig (≥ 3/5) for all treasury and admin operations. Never share seed phrases with any "support" contact. Conduct regular social engineering awareness training.
Case
:
Step Finance (Jan 2026, $30M)
— treasury wallet private keys compromised via device breach.
17. Cross-Chain Bridge
Check
Detail
Inherited code
Audit all bridge logic inherited from third-party frameworks
Message verification
Cross-chain messages validated with proper signatures and replay protection?
Liquidity isolation
Bridge funds separated from protocol treasury?
Case
:
SagaEVM (Jan 2026, $7M)
— inherited vulnerable EVM precompile bridge logic from Ethermint.
18. Legacy / Deprecated Contracts
Old contracts with known bugs remain callable on-chain forever.
Defense
Permanently
pause
or migrate funds from deprecated contracts. Monitor old contract addresses for unexpected activity. Remove mint/admin functions before deprecation.
Step 4: Cross-reference — Slither + manual findings combined into final report
Slither MCP Tools
Tool
Usage
Complements
get_contract_metadata
Extract functions, inheritance, flags
Manual access control review
get_function_source
Get exact source code with line numbers
Faster than grep for locating code
find_implementations
Find all implementations of a function signature
Cross-contract reentrancy analysis
get_detector_results
Run 90+ security detectors, filter by impact/confidence
Automated version of manual checklist
get_detector_metadata
List available detectors with descriptions
Understanding what's being checked
What Slither Catches vs What It Misses
Slither Catches Well
Manual Review Still Needed
Reentrancy patterns
Business logic flaws
Unprotected functions
Economic attack vectors (flash loan combos)
Unused state variables
Cross-protocol composability risks
Shadowing issues
Oracle manipulation scenarios
Incorrect ERC20 interface
Trust boundary architecture issues
Dead code
MEV/front-running specific to business logic
Key Principle
Slither provides ground truth via static analysis — reduces false negatives on known vulnerability patterns. But it cannot reason about protocol-level economic attacks — that's where the manual checklist below is essential.
Graceful degradation
If slither MCP is not configured, skip this section and proceed directly to the manual checklist. All checklist items remain valid and self-contained.
Audit Execution Checklist
When conducting a security audit, check each item:
Reentrancy:
All functions with external calls use
nonReentrant
CEI pattern followed — no state reads after external calls
View functions not used as oracle during state transitions
Access Control:
Every state-changing function has explicit access modifier