Skip to main content

Prerequisites

Before using Borrow Recovery, ensure you have the necessary tools and understand the supported chains and protocols.

Required Tools

Node.js and npm

For local development or self-hosting:
  • Node.js: Version 20 or higher (>=20)
  • npm: Comes bundled with Node.js
Verify your installation:
node --version  # Should show v20.x.x or higher
npm --version   # Should show 9.x.x or higher
If you’re using the hosted version of Borrow Recovery, you don’t need to install Node.js - you only need a compatible wallet.

Browser Wallet

You need a browser wallet that supports EIP-1193:
  • MetaMask (recommended)
  • Rabby
  • Coinbase Wallet
  • Any other EIP-1193 compatible wallet
You must import the same private key that was used to create your loan positions. Using a different wallet will result in mismatched addresses and you won’t be able to access your loans.

ZeroDev Project ID

Required for submitting rescue operations (repay, withdraw, transfer):
  1. Create a free account at https://dashboard.zerodev.app
  2. Create a new project or use an existing one
  3. Copy your Project ID from the project dashboard
You don’t need a ZeroDev Project ID for read-only operations like scanning wallets or viewing positions. It’s only required when executing rescue actions.

WalletConnect Project ID (Optional)

Only needed if you want WalletConnect support in the UI:
  1. Create a project at https://cloud.walletconnect.com
  2. Copy your Project ID
  3. Set NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID in .env.local
Injected wallets (MetaMask, Rabby) work without WalletConnect.

Supported Chains

Borrow Recovery supports the following EVM chains:

Ethereum

Chain ID: 1
Native Token: ETH
Explorer: etherscan.io
RPC: https://rpc.ankr.com/eth

Base

Chain ID: 8453
Native Token: ETH
Explorer: basescan.org
RPC: https://mainnet.base.org

Arbitrum

Chain ID: 42161
Native Token: ETH
Explorer: arbiscan.io
RPC: https://arb1.arbitrum.io/rpc

BNB Chain

Chain ID: 56
Native Token: BNB
Explorer: bscscan.com
RPC: https://bsc-dataseed.binance.org
Solana Not Supported: This recovery UI only supports EVM chains. Solana loans cannot be recovered using this tool.

Supported Protocols

Aave V3

Full support for Aave V3 on all supported chains:
  • Read loan positions (debt, collateral, health factor)
  • Repay debt operations
  • Withdraw collateral operations
  • Support for all Aave V3 markets on Ethereum, Base, Arbitrum, and BNB Chain

Morpho Blue

Support for specific Morpho Blue market:
  • Read loan positions
  • Repay debt operations
  • Withdraw collateral operations
  • Supported Market ID: 0x9103c3b4e834476c9a62ea009ba2c884ee42e94e6e314a26f04d312434191836
  • Available on all supported chains where Morpho Blue is deployed

Smart Account Standard

All loan wallets use:
  • ZeroDev Kernel v3.3: Deterministic smart account addresses
  • ERC-4337 EntryPoint v0.7: UserOperation standard for rescue actions

What You Need to Know

Your Wallet Index

Each loan position is associated with a unique wallet index. You can:
  • Scan to discover: Use the /scan page to find all deployed wallets
  • Use from email: Check your loan activation email for the wallet ID
  • Direct access: Go to /wallet/<index> if you know the index

Gas Requirements

All rescue operations require gas. You must fund your loan wallet with native tokens:
  • Ethereum, Base, Arbitrum: Fund with ETH
  • BNB Chain: Fund with BNB
Estimated gas costs vary by operation:
  • Withdraw: ~200k-300k gas
  • Repay: ~400k-600k gas (approve + repay)
  • Transfer: ~100k-200k gas

Repay Token Requirements

To repay debt, you need to fund the loan wallet with the borrowed asset:
  • USDC
  • USDT
  • DAI
  • Or whichever token you borrowed
Keep slightly more than the exact debt amount in the wallet because interest accrues in real-time.

Local Setup (Self-Hosting)

If you want to run Borrow Recovery locally:
1

Clone and Install

git clone <repository-url>
cd satsterminal-recovery
npm install
2

Configure Environment

cp .env.example .env.local
Optionally set in .env.local:
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id
3

Run Development Server

npm run dev
Open http://localhost:3000
4

Optional Verification

npm run lint
npm run build

No API Keys Required

No API keys are required for reading onchain positions. The app reads directly from blockchain RPCs.
You only need:
  • ZeroDev Project ID (when submitting rescue UserOperations)
  • WalletConnect Project ID (optional, for WalletConnect support)

Security Checklist

Before using Borrow Recovery, verify:
  • You have exported your private key from Sats Terminal dashboard
  • Your private key is imported into a secure wallet (MetaMask, Rabby)
  • You understand that you will sign all transactions in your wallet
  • You have sufficient gas tokens for rescue operations
  • You are prepared to validate all addresses and amounts before signing
Never paste private keys into the recovery UI. Private keys should only be imported in your wallet application. All transaction signing happens in your connected wallet.

Next Steps

Quickstart Guide

Ready to start? Follow the quickstart guide

Wallet Scanning

Learn how to discover your deployed loan wallets

Build docs developers (and LLMs) love