# 金库账户（Vault Account）

**金库账户（Vault Account）**&#x662F;frxlend对中用于记账的结构：

```solidity
struct VaultAccount {
    uint128 amount;
    uint128 shares;
}
```

金库账户The **Vault Account** cont包含两个元素

1. **`amount`** - 表示总数
2. **`shares`** - 表示可以申领的份额

#### **借款会计**

在借出中，**`amount`**&#x4EE3;表存款的资产总额和应计利息。

当出借人存入资产时，存入的资&#x4EA7;**`amount`**&#x589E;加，**`shares`**&#x4EF7;值也增加一定数量，但数量与股票的比率不变。

当产生利息时， **`amount`**&#x589E;加，**`shares`**&#x4FDD;持不变。每个出借人在基础资产中的份额以股份来衡量。

当贷款机构消除流动性时，他们赎回相关资产的股票。**`shares数量`**&#x5C06;根据赎回的股票数量而减少，**`amount`**&#x5C06;减少，&#x4F46;**`amount`**/**`shares`**&#x7684;比率保持不变。

**贷款会计**

贷款时，**`amount`** 代表贷款资产总额和应计利息。

当贷款人收到资产时，收到的代&#x5E01;**`amount`**&#x589E;加，**`shares`**&#x4EF7;值也增加了一定值，&#x4F7F;**`amount`**/**`shares`**&#x4E4B;间的比率保持不变。

当产生利息时，**`amount`**&#x589E;加，**`shares`**&#x4FDD;持不变。每个贷款人的债务都以股份来衡量。

当贷款人偿还债务时， **`amount`**&#x51CF;去归还的资产数量，**`shares`**&#x51CF;少一定数额，&#x4F7F;**`amount`**/**`shares`**&#x7684;比率保持不变。单个贷款人的股份余额按此数量递减。


---

# 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://docs.frax.finance/zh/fraxlend/gao-ji-gai-nian/jin-ku-zhang-hu-vault-account.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.
