> For the complete documentation index, see [llms.txt](https://singularityzk.gitbook.io/singularity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://singularityzk.gitbook.io/singularity/for-developers/defi-integrations/uniswap-v3.md).

# Uniswap V3

These integrations provide users with an additional layer of privacy when handling their funds and performing trades via 3rd party liquidity protocols. All transactions on-chain appear to be performed solely by the singularity contract making identification of traders behind actions such as large buy or sell orders via Uniswap more challenging.

### **Swap**

A trader generates a proof that encompasses their signature and gives permission for the singularity to exchange the value tied to a note for another asset via Uniswap.

Signature comes from cryptographically signing a message with the parameters:

```
[
    in_note,              // Note being spent
    in_nullifier,         // Corresponding nullifer to the note being spent
    out_note_footer,      // Note footer for newly formed note
    out_asset,            // Address of the asset being received in exchange
    pool_fee,             // Pool fee of the swap (Uniswap)
    amount_out_min,       // Minimum qty of the asset being received in exchange
    relayer               // Gas fee for the relayer
]
```

**“I warrant for in\_note to be spent and swapped out for** a minimum of **amount\_out\_min** qty of **out\_asset stored as a newly created** **out\_note that I own.”**

Right now the Singularity provides support for single swaps that are performed via the `exactInputSingle` method call on the Uniswap V3 `ISwapRouter` interface.

### **Liquidity Provision Management**

The Singularity allows traders to create and manage Uniswap V3 LP positions anonymously. Ownership of LP positions are tracked in the Singularity using notes in the form of NFTs that Uniswap issues for LP positions.

Initially, Singularity provides support for users to:

* Provision liquidity
* Collect fees on existing liquidity positions
* Remove liquidity


---

# 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://singularityzk.gitbook.io/singularity/for-developers/defi-integrations/uniswap-v3.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.
