# Flash Loans

Flash loans are innovative financial instruments tailored for developers, allowing the borrowing of assets without collateral, provided the liquidity is returned within a single blockchain transaction.

#### **How Flash Loans Work**

Flash loans necessitate a comprehensive understanding of the Ethereum Virtual Machine (EVM), programming, and smart contracts. They provide pool liquidity for a single transaction, requiring the entire borrowed amount plus an additional fee to be returned by the transaction's conclusion.

#### **To initiate a Flash Loan, follow these steps:**

1. **Build a Smart Contract:** Your contract should be capable of requesting and managing a flash loan.
2. **Execute Operations:** The contract executes the necessary operations and repays the loan with interest and fees within the same transaction.

For detailed guidance on executing flash loans, refer to our developer documentation.

#### **Execution Flow of a Flash Loan**

1. **Contract Request:** Your contract requests a flash loan from the Pool, specifying the amount and reserve.
2. **Funds Transfer:** The Pool transfers the requested funds to your contract and triggers **`executeOperation()`**.
3. **Operation Execution:** Perform your planned operations using the borrowed funds.
4. **Repay the Loan:** Approve the Pool to pull the loan amount plus fees from your contract, completing the transaction in one block.

#### **Applications of Flash Loans**

* **Arbitrage:** Exploit price differences across exchanges without upfront capital.
* **Position Liquidations:** Liquidate positions without needing to front the repayment capital.

#### **Flash Loan Fees**

Flash loan fees start at 0.1% and can be adjusted via Governance Vote. These fees contribute to the protocol's stability and are shared between liquidity providers and the treasury.


---

# 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.yei.finance/developers/flash-loans.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.
