# 开始一笔贷款

## 初始化新贷款 - 资产保险库或单一 NFT

<figure><img src="https://files.readme.io/e92b437-Start_a_Loan.png" alt=""><figcaption></figcaption></figure>

1. 借款人可以选择在保险库或单一NFT上设置 LoanTerms，包括贷款期限、本金、利息、抵押代币 ID、应付货币和分期付款次数。

```sol
createLoanTerms(), createInstallmentLoanTerms()
```

2\. 贷方还可以对未匹配的保险库或单一 NFT发出报价。贷款人必须为贷款本金的贷款协议提供津贴。

3\. 一旦同意报价，确认方（借款人或贷款人）签署贷款条款并使用 OriginationController 初始化贷款。

```sol
initializeLoan(), initializeLoanWithItems()
```

4\. 然后 OriginationController 将借款人和贷款人的资产转移到 LoanCore。

```sol
transferFrom(), safeTransferFrom()
```

5\. LoanCore 开始贷款 - 以 BorrowerNote 和 LenderNote 的形式铸造和分发 PromissoryNotes (ERC721) 给借款人和贷款人。

```sol
mintLoanNotes(), transferFrom(), safeTransferFrom()
```

6\. LoanCore 将商定的本金（扣除费用）转移给借款人。

```sol
safeTransfer(), startLoan()
```


---

# 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://leon2.gitbook.io/arcade.xyz-cn/smart-contracts/kai-shi-yi-bi-dai-kuan.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.
