Overview
Borrow Recovery’s wallet scanner helps you discover your per-loan ZeroDev Kernel smart accounts across multiple chains. Each loan is associated with a unique index, and the scanner derives the corresponding Kernel address and checks if it has been deployed.How Wallet Scanning Works
Kernel wallet addresses are deterministically derived from your EOA (Externally Owned Account) and an index using the CREATE2 opcode. This means you can predict the address of a Kernel wallet before it’s deployed.Address Derivation
The derivation process uses the following components:The same owner address and index will always produce the same Kernel wallet address, making it possible to predict and scan for wallets without prior deployment.
Using the Scanner
Connect Your Wallet
Click the “Connect Wallet” button in the top right corner. This is the EOA that was used to create your loan wallets.
Configure Scan Settings
Set your scan parameters:
- Start index: The first index to scan (typically 0)
- End index: The last index to scan (max range: 2,000 indices per scan)
- Chains: Select which chains to scan (Ethereum, Base, Arbitrum, BSC)
Run the Scan
Click “Start scan” to begin. The scanner will:
- Derive Kernel addresses for each index in the range
- Switch your wallet to each selected chain
- Check if each address is deployed using
eth_getCode - Display results in real-time
Scan Process Details
Batched RPC Calls
The scanner processes addresses in batches of 12 to optimize performance:Multi-Chain Detection
The scanner automatically checks each selected chain by:- Requesting a network switch via your wallet provider
- Confirming the switch was successful
- Querying contract code for each derived address
- Marking addresses as “deployed” if code is present (not
0x)
Interpreting Results
Result Table Columns
- Index: The sequential index used to derive the Kernel address
- Kernel address: The derived smart account address (truncated for display)
- Chain columns: One column per selected chain showing deployment status
Deployment Status
- deployed badge: The Kernel wallet exists on this chain and may hold positions
- —: The wallet address has not been deployed on this chain
Filtering Results
Toggle “Show only deployed wallets” to hide addresses with no deployments across any selected chain. This is useful when scanning large ranges.Scan Limits
The maximum scan range is 2,000 indices per scan. This prevents browser timeouts and excessive RPC requests.
- Run multiple scans with different ranges (e.g., 0-1999, 2000-3999)
- Use the “Show only deployed wallets” filter to focus on active addresses
- Note which indices have deployments for further investigation
Next Steps
Once you’ve identified deployed wallets:- Click any table row to view that wallet’s details
- Load positions to see balances and loan data
- Execute rescue operations to repay debt or withdraw collateral
Code Reference
- Scan UI:
app/scan/page.tsx - Address derivation:
lib/kernel/deriveKernelAddress.ts - Kernel constants:
@zerodev/sdk/constants