Before You Begin
This app is frontend-only with no backend signer, database, or paymaster abstraction. All signatures happen in your connected wallet.
Recovery Workflow
Export and Import Your Private Key
Before you can use the recovery app, you need to set up your wallet:
- Export your private key from the Sats Terminal dashboard
- Import that private key into MetaMask, Rabby, or another EIP-1193 compatible wallet
- Important: Never connect a different wallet, or the derived Kernel addresses will not match your loan
Connect Your Wallet
- Open the Borrow Recovery app
- Click the wallet button in the top-right corner
- Connect the wallet that contains your imported private key
- Ensure you’re connecting the same EOA that was used for your loan
Discover Your Wallet Index
Navigate to the
/scan page to find your loan wallet:Set scan parameters:- Enter a Start index (e.g., 0)
- Enter an End index (e.g., 100)
- Select chain checkboxes for chains you want to scan
- Maximum scan size per run: 2,000 indices
- Click Start scan
- The app will request chain switches while scanning each chain
- Use Show only deployed wallets to filter results
- Click any result row to open
/wallet/<index>
Open Wallet Details
On the
/wallet/<index> page, you’ll see:- The derived Kernel loan wallet address
- A Copy address button
- Chain selector dropdown
- Load positions button
- Native gas token (required for all rescue actions)
- Repay token (USDC/USDT) if you plan to repay debt
Load Positions
- Select the correct chain from the dropdown
- Click Load positions
- Wallet token balances
- Aave V3 loan details (debt, collateral, health factor)
- Morpho Blue loan details (if applicable)
If Morpho USD fields show
—, click Load positions again or check the browser console for error details.Configure Bundler
To execute rescue operations, you need a valid ZeroDev bundler configuration.Get your ZeroDev Project ID:
- Open https://dashboard.zerodev.app/projects/general
- Sign in to your account
- Open your project (or create one if none exists)
- Copy the Project ID from the top-right corner of the project page
- Your ZeroDev Project ID, or
- A full bundler URL:
https://rpc.zerodev.app/api/v3/<project-id>/chain/<chain-id>
Execute Rescue Actions
Now you can perform rescue operations on your loan:For Aave positions:
- Choose Withdraw collateral or Repay debt
- Toggle Withdraw all / Repay all or enter a custom amount
- Click Execute Aave action via Kernel
- Choose Withdraw collateral or Repay debt
- Toggle Withdraw all collateral / Repay all debt or enter a custom amount
- Click Execute Morpho action via Kernel
- In the wallet balances section, click Transfer all to connected wallet for any token
Operational Checklist
Before executing any rescue action, verify:- Connected wallet is on the intended chain
- Loan wallet has enough native gas token
- Repay token is funded to the loan wallet (for repay flows)
- Bundler input is set correctly
- Amount and action type are correct
- Full-withdraw/full-repay toggles are set as intended
Troubleshooting
'Switch your wallet to <chain>' error
'Switch your wallet to <chain>' error
Use the chain selector dropdown and approve the wallet switch prompt in your wallet extension.
Action button is disabled
Action button is disabled
'No gas' warning
'No gas' warning
Send native gas token (ETH, BNB, etc.) to the loan wallet address shown on the page.
Morpho USD fields show '—'
Morpho USD fields show '—'
- Click Load positions again
- Check browser console for
Morpho summary fetch failederror messages - The app tries multiple fallback methods for reading Morpho data
Scan is very slow
Scan is very slow
Reduce the scan range size and/or the number of selected chains. Maximum recommended: 500 indices at a time.
Next Steps
Aave Operations
Learn about Aave V3 rescue actions and health factors
Morpho Operations
Understand Morpho Blue markets and rescue flows
Bundler Configuration
Deep dive into bundler setup and gas estimation