> For the complete documentation index, see [llms.txt](https://etherfi.gitbook.io/etherfi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://etherfi.gitbook.io/etherfi/products/borrow/technical-documentation.md).

# Technical Documentation

{% hint style="info" %}
This feature is coming soon.
{% endhint %}

## Overview

All ether.fi users have a non-custodial safe deployed on their behalf when they create an account. Assets on this safe address can optionally be used as collateral on an ether.fi managed on-chain lending protocol.

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.

<figure><img src="/files/ZLcgnD0DREHUKwywHGcz" alt=""><figcaption></figcaption></figure>

## Asset types

There are 3 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 the Borrow feature, assets will be automatically deposited into the lending protocol. Each collateral asset has an LTV associated with it.

#### 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 or Borrowable assets. Primarily these are assets that can be purchased through the Swap feature, but they are not listed as collateral on the lending protocol.

For the full list of supported assets see [Lending market parameters](https://etherfi.gitbook.io/etherfi/~/revisions/w7qDylUgT8nLuaijlD8C/products/borrow/lending-market-parameters).

## Lending protocol structure

The ether.fi managed Lending procotol currently consists of a single Liquidity Hub and a single Spoke that interfaces to the Liquiduty Hub. The Lending protocol is permissioned such that only ether.fi Safes can borrow assets, but anyone can supply to Liquidity Hub.

<figure><img src="/files/oVfWLKlZbu9FoOqQRrTe" alt=""><figcaption></figcaption></figure>

Assets used in the Lending Protocol are contains in the Liquidity hub which is the centralised source of all borrows.

Position and balance tracking is managed on-chain through internal accounting. Read more about how the lending market works in the Aave documtation: <https://aave.com/docs/aave-v4>

### 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)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://etherfi.gitbook.io/etherfi/products/borrow/technical-documentation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
