# FAQ

<details>

<summary>What are the difference between UniswapV4 Hooks and Algebra Plugins</summary>

First of all, here is the difference in presence of hooks:

| Uniswap Hooks                   | Algebra Hooks                         |
| ------------------------------- | ------------------------------------- |
| beforeInitialize                | beforeInitialize                      |
| afterInitialize                 | afterInitialize                       |
| beforeAddLiquidity              | beforeModifyPosition (positive delta) |
| afterAddLiquidity               | afterModifyPosition (positive delta)  |
| beforeRemoveLiquidity           | beforeModifyPosition (negative delta) |
| afterRemoveLiquidity            | afterModifyPosition (negative delta)  |
| beforeSwap                      | beforeSwap                            |
| afterSwap                       | afterSwap                             |
| beforeDonate                    | -                                     |
| afterDonate                     | -                                     |
| beforeSwapReturnDelta           | -                                     |
| afterSwapReturnDelta            | -                                     |
| afterAddLiquidityReturnDelta    | -                                     |
| afterRemoveLiquidityReturnDelta | -                                     |
| -                               | beforeFlash                           |
| -                               | afterFlash                            |

And then there are the conceptual differences:

* Hooks are not able to define a swap amount.
* In Algebra there is no ERC-6909 functionality or flash accounting. Plugins can only manipulate LP fees and append a plugin fee on top.
* Algebra's approach is that each pool has its own deployed plugin. Therefore, when developing it, there is no need to implement mappings by pools, etc. Instead, you need to develop a simple contract (PluginFactory) that can perform custom plugin deployment when a pool is created. Since Algebra Pools are configurable (it is possible to manually change the fee, tick spacing, and even the plugin), the PluginFactory is used further to manage the pools created through it. More in [this section](https://github.com/cryptoalgebra/algebra-gitbook/blob/main/algebra-integral-technical-reference/guides/plugin-development.md)

</details>


---

# 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.algebra.finance/algebra-integral-documentation/algebra-integral-technical-reference/plugins/faq.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.
