> For the complete documentation index, see [llms.txt](https://zokyo-auditing-tutorials.gitbook.io/zokyo-tutorials/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zokyo-auditing-tutorials.gitbook.io/zokyo-tutorials/tutorial-61-vyper-vulnerable-versions.md).

# Tutorial 61: Vyper Vulnerable Versions

{% hint style="info" %}
[**Book an audit with Zokyo**](https://www.zokyo.io/)
{% endhint %}

On July 30th, 2023, a significant vulnerability was exposed within the Vyper compiler that affected multiple Curve.Fi liquidity pools, leading to substantial financial losses. The issue stemmed from faulty reentrancy guards implemented in Vyper versions 0.2.15, 0.2.16, and 0.3.0. These vulnerabilities allowed malicious actors to bypass reentrancy protections and execute reentrancy attacks, a type of exploit that can drain contracts of funds. The flaw was eventually patched in Vyper version 0.3.1, but the incident raised critical questions about the reliability of reentrancy protections in Vyper.

In this tutorial, we will deep dive into the underlying mechanics of Vyper's reentrancy vulnerability, how reentrancy attacks work, and what the developer community can learn from these exploits. This tutorial will also provide guidance on how to avoid such issues when writing smart contracts in Vyper, as well as best practices for reentrancy protection.


---

# 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, and the optional `goal` query parameter:

```
GET https://zokyo-auditing-tutorials.gitbook.io/zokyo-tutorials/tutorial-61-vyper-vulnerable-versions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
