For the complete documentation index, see llms.txt. This page is also available as Markdown.

Technical Documentation

High-level overview of how borrowing and lending works

Overview

All ether.fi users have a non-custodial Safe deployed on their behalf when they create an account. Eligible assets held by this Safe can be supplied to the ether.fi-managed on-chain lending protocol and used as collateral when Borrow is enabled.

When assets are used as collateral, this results in a USD-valued borrowing power. Users are able to borrow select assets directly, or use their card in Borrow Mode which borrows USDC at the time of purchases.

The Lending Protocol is an ether.fi-managed Aave v4 instance on Optimism.

Asset types

There are three types of assets with respect to the Lending Protocol and non-custodial ether.fi accounts:

  1. Collateral assets

  2. Borrowable assets

  3. Non eligible assets

Collateral assets

These assets can be used to increase borrowing power. If the account is opted in to Borrow, eligible assets are automatically supplied to the Lending Protocol. Each collateral asset has a Product LTV that limits how much it contributes to borrowing power. The separate collateral factor is used to calculate health factor and determine whether a position can be liquidated. See Borrowing Power, Health Factor, and Liquidation.

Borrowable assets

A small subset of assets that can be borrowed. This is currently limited to USDC and ETH.

Suppliers of borrowable assets accrue an interest rate, and borrowers of the asset pay an interest rate. Borrowable assets are always collateral assets as well (i.e. users can both deposit USDC to be used as collateral, and borrow USDC).

Non eligible assets

Some assets are supported on ether.fi but are neither collateral nor borrowable assets. Primarily these are assets that can be purchased through the Swap feature but are not listed as collateral on the Lending Protocol.

For the documented list of supported assets, see Lending Market Parameters. The app shows the current assets and amounts available to each user.

Lending protocol structure

The ether.fi-managed Lending Protocol currently consists of a single Liquidity Hub and a single Spoke that interfaces with the Liquidity Hub. The Lending Protocol is permissioned so that only ether.fi Safes can borrow assets, but anyone can supply to the Liquidity Hub.

Assets used in the Lending Protocol are held in the Liquidity Hub, which is the central source of liquidity for borrows.

Position and balance tracking is managed on-chain through internal accounting. Read more about how the lending market works in the Aave v4 documentation.

User actions

  • Supply → tokens flow from the Cash Safe into the Hub; the Spoke credits the user's supplied balance. Hub liquidity grows.

  • Borrow → the Hub pays tokens out to the borrower. The debt is recorded as shares against a continuously growing index: amount owed = shares × index.

  • Repay → tokens return to the Hub, debt shares are burned, liquidity is restored.

  • Withdraw collateral → the Hub pays supplied tokens back out, reducing the user's supplied balance and Hub liquidity.

  • Opt out → a user can disable Borrowing functionality in settings. This prevents their assets from being used as collateral (and if assets are supplied they will be withdrawn)

Last updated