> For the complete documentation index, see [llms.txt](https://docs.evoq.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.evoq.finance/security/general-risks/flash-loan-attack.md).

# Flash Loan Attack

### Overview of Vulnerability

Flash loan attacks involve taking out an uncollateralized loan, manipulating market conditions within the same block, and repaying the loan. These attacks take advantage of discrepancies in market pricing or weaknesses in protocol mechanisms, potentially causing significant financial losses to the platform and its users.

In decentralized finance (DeFi), oracles provide external data, such as asset prices, to smart contracts. Some systems allow permissionless submissions to update oracles, which enhances accessibility but can also create vulnerabilities. Attackers might exploit this feature to temporarily distort asset prices and execute an attack.

### Potential Scenarios of Vulnerability

If users were allowed to perform both borrowing and repayment operations within the same block, attackers could exploit this to disrupt normal protocol operations. They might manipulate rate differences or liquidity pools, potentially causing financial damage. Additionally, attackers could use manipulated oracle updates to distort asset values and gain unfair advantages.

### Evoq’s Preventive Measures

Evoq prevents users from performing both repayment and borrowing operations within the same block. This restriction effectively blocks flash loans and ensures that attackers cannot exploit rapid transactional cycles to manipulate the system.

This approach significantly reduces the risk of flash loan-based exploits, improving the platform’s security and providing stability for both users and the protocol.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.evoq.finance/security/general-risks/flash-loan-attack.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.
