-
Notifications
You must be signed in to change notification settings - Fork 617
create v4 data doc #927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
create v4 data doc #927
Conversation
agaperste
commented
Mar 26, 2025
- fix local build for images
- make v1 of data hub doc, along with migrating the data guides over
@agaperste is attempting to deploy a commit to the Uniswap Team on Vercel. A member of the Team first needs to authorize it. |
@saucepoint ready for review 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just reviewed data_hub for now
Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Co-authored-by: saucepoint <98790946+saucepoint@users.noreply.github.com>
Welcome to the Uniswap v4 Data Hub — your central resource for understanding Uniswap v4 metrics, hook data standards, and accessing Uniswap v4 data tools. | ||
|
||
:::info | ||
Join the conversation on v4 hook data standards in our Telegram group: https://t.me/v4_hooks_data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Join the conversation on v4 hook data standards in our Telegram group: https://t.me/v4_hooks_data. | |
Join the conversation on v4 hook data standards in our [Telegram group](https://t.me/v4_hooks_data) |
#### Custom Curve | ||
 | ||
|
||
In v4, developers can bypass the built-in v3 concentrated liquidity by using [custom accounting](https://docs.uniswap.org/contracts/v4/guides/custom-accounting), allowing them to implement their own swap curves. This enables custom liquidity provisioning and swap logic. [Custom curves](https://www.v4-by-example.org/hooks/custom-curve) are enabled through `Hooks.BEFORE_SWAP_FLAG` and `Hooks.BEFORE_SWAP_RETURNS_DELTA_FLAG`. Examples of such curves include: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few more references in this file where we're hard-linking the domain. would just ctrl+F "https://docs.uniswap.org/"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also lets not link v4-by-example, its pretty out of date and dont have bandwidth to maintain 😭
|
||
Now, v4 retains those v3 benefits but layers on new features such as a singleton architecture and hooks, enabling more efficient and creative AMM expression. These innovations also complicate the data landscape: | ||
|
||
- **Singleton [PoolManager](https://docs.uniswap.org/contracts/v4/reference/core/PoolManager)** replaces factory-created pool contracts, changing how we track pool creation and liquidity events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more hard links that we should clean up -- i.e. strip off the domain / base URL
|
||
As we covered in the previous [v4 data guide](https://uniswapfoundation.mirror.xyz/c7LDDTWhC2ry6gp0nGqcSKHvNHosJmhPQ-ZuIxqeB2I), [hooks](https://docs.uniswap.org/contracts/v4/concepts/hooks) are the defining feature of Uniswap v4. They enable developers to customize and extend the behavior of liquidity pools. In this guide, we aim to establish a standard for hook developers, hook data indexers, and analysts, such that all users, from developers and LPs to analysts, can use the same shared framework when it comes to hook data. | ||
|
||
_Want to collect this guide on Mirror? [Click here to grab it](https://uniswapfoundation.mirror.xyz/KGKMZ2Gbc_I8IqySVUMrEenZxPnVnH9-Qe4BlN1qn0g)._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
::: | ||
|
||
## Hooks vs. Uni v4 | ||
But first, let’s clarify how hooks fit into v4. Think of them as plugins or external APIs for the `PoolManager` contract. Each pool can only link to one hook, but a single hook contract can serve multiple pools. Once a pool is initialized with a hook, that pool becomes a “hooked pool” (as opposed to a “vanilla pool”), and the hook itself is then considered “initialized.” By contrast, a hook contract with no pools is just an unused Solidity contract that implements a subset of the [core hook functions](https://docs.uniswap.org/contracts/v4/concepts/hooks#core-hook-functions). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more https://docs.uniswap.org/...
links in this file that should be stripped out
_Want to collect this guide on Mirror? [Click here to grab it](https://uniswapfoundation.mirror.xyz/KGKMZ2Gbc_I8IqySVUMrEenZxPnVnH9-Qe4BlN1qn0g)._ | ||
|
||
:::info | ||
Join the conversation on v4 hook data standards in our Telegram group: https://t.me/v4_hooks_data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Join the conversation on v4 hook data standards in our Telegram group: https://t.me/v4_hooks_data. | |
Join the conversation on v4 hook data standards in our [Telegram group](https://t.me/v4_hooks_data) |
Join the conversation on v4 hook data standards in our Telegram group: https://t.me/v4_hooks_data. | ||
::: | ||
|
||
## Hooks vs. Uni v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Hooks vs. Uni v4 | |
## Hooks vs. Uniswap v4 |
:::info | ||
Join the conversation on v4 hook data standards in our Telegram group: https://t.me/v4_hooks_data. | ||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this if it exists at the top of the page?