> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vanna.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# How Vanna Works

> Where your tokens go when you lend, borrow, swap and farm on Vanna's Stellar testnet.

Vanna has two sides that meet in its lending pools:

* **Lenders** supply assets to a Vanna lending pool and receive **vTokens** (vXLM, vBLUSDC, vAqUSDC, vSoUSDC) that grow in value as borrowers pay interest.
* **Traders** open a **margin account**, a personal Soroban smart contract. They deposit collateral, borrow from the pools and use the borrowed funds in Stellar DeFi.

## Follow the tokens

| You do | Tokens move | Where they count |
| - | - | - |
| Supply on **Earn** | Wallet → Vanna lending pool. You get vTokens in your wallet. | Your lending position, not margin collateral |
| Deposit on **Margin** | Wallet → your margin account | Collateral |
| Borrow on **Margin** | Lending pool → your margin account, plus debt | Collateral **and** debt |
| Swap on **Spot** | One token → another, inside the margin account | Still collateral |
| Supply / add LP on **Farm** | Margin account → Blend, Soroswap or Aquarius | Still collateral (as a Blend receipt or LP position) |
| Repay | Margin account → lending pool | Lowers debt |
| Transfer to wallet | Margin account → wallet (health-checked) | Leaves the account |

Borrowed funds never go straight to your wallet. They stay in the margin account, where the protocol can see and value them.

## One account, one health factor

Every position in a margin account (tokens, Blend supply and LP shares) backs every loan in it. The **health factor** compares the account's total collateral value with its total debt:

```text theme={null}
Health factor = total collateral (USD) / total debt (USD)
```

Above **1.10** the account is healthy. At **1.10 or below** anyone can liquidate it. See [Health Factor](https://docs.vanna.finance/stellar/guides/margin/health-factor.md).

## The pieces

> **Account Manager**
>
> The entry point for every margin action: create, deposit, borrow, repay, withdraw and route to external protocols.

> **Risk Engine + Oracle**
>
> Values every position with Reflector prices and blocks actions that would leave the account at 1.10 or below.

> **Controllers**
>
> Approved adapters for Blend, Soroswap and Aquarius. Your margin account can only call what the Registry allows.

## What's in the app

Earn, Margin, Spot, Farm, Portfolio, Analytics and Copilot. Spot is the only trading surface on Stellar; there are no perps or options. Rewards is marked **Soon**.

See [Core Concepts](https://docs.vanna.finance/stellar/learn/overview.md) for the accounting model and [Developers](https://docs.vanna.finance/stellar/developers/overview.md) for the contracts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.