# Architecture

### Components

*marginfi has two major components, the global margin account and the liquidity pool.*

![](/files/CfpCb9jE8Q6k1GheAkdI)

#### Margin Account

This is the main venue you use to interact with marginfi and the underlying trading markets. Together with the underlying trading accounts (UTPs) acts as a unified isolated margin account.

Read more [here](/marginfi/protocol/margin-account.md).

#### Liquidity Pool

All liquidity in marginfi exists in either user owned UTP accounts or the [liquidity pool](/marginfi/protocol/liquidity-pool.md). The liquidity pool is a shared borrow-lend pool from which margin accounts can access liquidity for trading.

Traders can automatically access liquidity in the pool based on their accounts [aggregate available margin](/marginfi/protocol/margin-engine.md).

### UTPs

marginfi currently enables traders to access perpetual futures markets on both [Mango Markets](/marginfi/protocol/utps/mango-markets.md) and the [01 Protocol](/marginfi/protocol/utps/01-protocol.md).

### Protocol Operations

A network of bots real-time observe on-chain data, and use [multiple cranking systems](/marginfi/protocol/operations.md) to keep your margin accounts safe and the protocol solvent.


---

# Agent Instructions: 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:

```
GET https://marginfi.gitbook.io/marginfi/protocol/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
