# 금고 계정(Vault Account)

금고 계정은 Fraxlend 쌍의 회계에 사용되는 구조이다:

struct VaultAccount { uint128 amount; uint128 shares; }

금고 계정에는 두 가지 요소가 있다.

1\. 금액 - 총 금액을 나타낸다.

2\. 주식 - 금액에 대한 청구를 나타낸다.

\
**대출 계산**

대출에서, 금액은 예치된 자산의 총 금액과 발생한 이자를 나타낸다.

채권자가 자산을 예치할 때, 예치된 자산의 양이 증가하면, 주식 가치도 금액/주식 간 비율이 변하지 않을 정도로 증가한다.

이자가 발생하면 금액이 증가하고 주식은 그대로 유지된다. 각 채권자가 기초자산에서 차지하는 비중은 주식으로 측정한다.

채권자들이 청산할 때, 그들은 기초 자산을 위해 주식을 상환한다는 것이다. 주식 금액은 상환된 주식 수만큼 감소하며, 금액/주식 비율이 변하지 않도록 감소한다.

&#x20;

**차입 계산**

차입금에서, 금액은 차입된 자산의 총액과 발생한 이자를 나타낸다.

채무자가 자산을 받으면 받은 토큰의 수가 증가하고, 주식 가치도 금액/주식 비율이 변하지 않도록 금액만큼 증가한다.

이자가 발생하면 금액이 증가하고 주식은 그대로 유지된다. 각 채무자의 부채는 주식으로 측정된다.

채무자의 상환채무가 자산의 반환금액만큼 감소하는 경우, 주식은 금액/주식의 비율이 변하지 않을 정도로 감소한다. 개별 채무자의 주식 잔액은 이 주식 수만큼 감소한다.

<br>


---

# 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/ko/fraxlend/undefined-1/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.
