What are Kernel Smart Accounts?
Borrow Recovery uses ZeroDev Kernel v3.3 smart accounts for all loan wallets. These are ERC-4337 compatible smart contract wallets that:- Follow the account abstraction standard
- Support modular validation logic
- Enable gasless transactions (with paymasters)
- Provide enhanced security features
Kernel v3.3 Architecture
Each Kernel account consists of:- Account Implementation: Core wallet logic (proxy pattern)
- Validator Module: ECDSA signature validation
- EntryPoint: ERC-4337 EntryPoint v0.7 contract
Key Addresses
Fromlib/kernel/deriveKernelAddress.ts:
ECDSA Validator
The app uses the standard ECDSA validator for signature verification:Deterministic Address Derivation
Kernel addresses are derived deterministically using CREATE2, which means:- The same owner + index always produces the same address
- Addresses can be computed before deployment
- No need to store or sync address databases
Derivation Process
The derivation happens in three steps:1. Create Initialization Data
initialize() call that will be executed when the Kernel proxy is deployed.
The
owner parameter is your connected wallet’s address (EOA).2. Compute Salt
The salt combines initialization data with the wallet index:index is what makes each loan wallet unique (0, 1, 2, …).
3. Apply CREATE2
Finally, compute the deterministic address:This function is the core of wallet recovery - given an EOA and index, it always returns the same Kernel address.
Wallet Scanning
The/scan page uses this derivation to search for deployed wallets:
- User specifies a range (e.g., index 0-100)
- App derives addresses for each index
- Check each address for deployed bytecode (
eth_getCode) - Display deployed wallets with their positions
Example Derivation
For owner0x742d35Cc6634C0532925a3b844Bc454e4438f44e and index 42:
Kernel Execution Model
Kernel accounts execute calls via theexecute() function:
lib/protocols/kernel.ts:
Deployment Status
Kernel accounts may or may not be deployed:- Undeployed: Address is computed but no bytecode exists
- Deployed: Factory has created the proxy at the address
lib/accountAbstraction/submitUserOpV07.ts:236.
Benefits for Recovery
Using Kernel accounts for loans provides:- Deterministic recovery: No database needed to find wallets
- Isolation: Each loan is in its own smart account
- Flexibility: Can add custom logic (e.g., session keys)
- Standard compliance: Works with any ERC-4337 bundler
Next Steps
Account Abstraction
Learn how UserOperations enable execution
Protocol Integration
See how Kernel wallets interact with Aave and Morpho