Purpose
Each borrower gets a dedicated Credit Account on the programmable layer. It:- Holds the user’s deposited margin and borrowed funds as a smart wallet.
- Executes swaps and other onchain interactions through whitelisted adapters while keeping collateral inside the account.
- Enables “undercollateralized” usage relative to the initial deposit, while remaining overcollateralized within the account because borrowed funds never leave it.
- Enforces a health check: swaps or withdrawals execute only if the post-trade Health Factor stays above 1.
How It Works
Credit Accounts are managed by two layers:- User-facing interface: Handles opening accounts, depositing collateral, borrowing, multicall execution, and closing.
- Risk engine: Tracks balances, enforces health checks, manages adapter permissions, and handles liquidations.
Permitted Assets
A Credit Account is scoped to a single market. It may only hold the market’s collateral tokens plus its debt token. Example: if a market allows borrowing USDC against BTC and ETH, that Credit Account can only hold BTC, ETH, and USDC. Restricting the asset universe simplifies risk management and enables precise liquidation threshold tuning per asset.Adapters
Interactions with external protocols happen through adapters — whitelisted contracts that translate protocol-specific calls into Credit Account-safe operations. Adapters enable:- Token swaps via DEXs
- Yield vault deposits to convert assets into yield-bearing tokens
- Liquidity provision to DeFi protocols
Health Factor
An account is liquidatable when . Define, at time :- : quantity of asset
- : price of asset
- : liquidation threshold of asset
- : outstanding principal debt
- : accrued interest