> For the complete documentation index, see [llms.txt](https://docs.lifinity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lifinity.io/dex/v2.md).

# v2

v2 is a major upgrade to Lifinity’s market making algorithm with wide-reaching benefits.

The key innovation behind v2 is that pools target the initially deposited amount of the base asset rather than a 50/50 ratio between the two assets. The target amount of the base asset is only updated when the price changes by a predetermined amount, at which point the pool rebalances to a 50/50 ratio at the new price.&#x20;

Additionally, through its unique property of targeting a fixed amount of an asset in the pool, v2 enables price risk to be neutralized by borrowing the base asset or shorting its perp.

{% hint style="info" %}
For a deeper dive on our v2, please see our [Medium article on this topic](https://medium.com/@lifinity.io/lifinity-v2-introducing-the-delta-neutral-market-maker-5e4e42107860).
{% endhint %}


---

# 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://docs.lifinity.io/dex/v2.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.
