-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6b1f64
commit 5444ca3
Showing
49 changed files
with
257 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: v4-versus-v3 | ||
--- | ||
|
||
While Uniswap v4's underlying concetrated liquidity is the same as Uniswap v3, there are some key differences in the architecture | ||
and accounting. | ||
|
||
# Singleton Design | ||
|
||
### Pool Creation | ||
|
||
(TODO: talk about singleton vs factory, state vs contract/V3Pool) | ||
|
||
### Flash Accounting | ||
|
||
(TODO: talk about flash accounting, multi-hop swaps) | ||
|
||
# Liquidity Fee Accounting | ||
|
||
(TODO: talk about how fees must be collected on liquidity operation) | ||
|
||
(TODO: talk about fees are automatically credited in increase liquidity) | ||
|
||
(TODO: talk about salts) | ||
|
||
# Native ETH | ||
|
||
(TODO: talk about native ETH vs WETH) | ||
|
||
# Subscribers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Flash Accounting | ||
--- | ||
|
||
# Flash Accounting | ||
|
||
## Deltas | ||
|
||
(TODO: explain deltas / net deltas) | ||
|
||
## Swapping | ||
(TODO: talk about flash accounting, multi-hop swaps) | ||
|
||
## Liquidity Management | ||
(TODO: talk about complex liquidity operations) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: ERC-6909 | ||
--- | ||
|
||
(TODO: talk about ERC-6909 claims / redemptions) | ||
|
||
(TODO: talk about gas benefits, and users i.e. mev bots and high-frequency traders) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: Hooks | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Subscribers | ||
--- | ||
|
||
(TODO: talk abotu liquidity staking / subscribers) | ||
|
||
(TODO: be sure to emphasize that subscribers dont have access to the capital) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Concepts", | ||
"position": 3, | ||
"collapsed": true | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "DEPRECATED", | ||
"position": 1000, | ||
"collapsed": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Uniswap V4 - Hooks | ||
|
||
Welcome to the Uniswap V4 developer documentation. | ||
|
||
Uniswap V4 is designed to enhance the way liquidity is provided and tokens are traded on-chain. It aims to broaden the | ||
scope of decentralized trading. The project welcomes community participation, providing a platform for developers and | ||
enthusiasts to contribute to this new version of the Uniswap Protocol. | ||
|
||
A significant feature in Uniswap V4 is the introduction of "hooks." These contracts operate at different stages in a | ||
pool action's lifecycle, allowing for a high degree of customization. | ||
|
||
Pool creators have the option to maintain the tradeoff decisions available in V3 or to explore new features. | ||
Uniswap V4 pools can support dynamic fees, on-chain limit orders, or act as a time-weighted average market | ||
maker (TWAMM) to spread large orders over time. The architecture has been updated, including a new "singleton" | ||
contract where all pools are contained within a single smart contract, enhancing the platform's efficiency and | ||
reducing costs. | ||
|
||
The integration of hooks with the singleton architecture is expected to make the platform more powerful and | ||
versatile, ensuring fast, secure, and efficient customization and routing across various pools. | ||
|
||
Note: V4 is currently in development, and changes are ongoing in the contracts. Updates to the documentation | ||
will be provided accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Create Pool | ||
--- | ||
|
||
(TODO: document manager.initialize() and its parameters) | ||
|
||
(TODO: mention multicall posm.intializePool) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Manage Liquidity", | ||
"collapsed": true | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Swap | ||
--- | ||
|
||
(TODO: reference universal router?) | ||
|
||
# Single Swap | ||
|
||
# Multihop Swap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Hooks", | ||
"collapsed": true | ||
} | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Subscriber | ||
--- | ||
|
||
(TODO: explain ISubscriber) | ||
|
||
(TODO: unsubscribe gas limit) | ||
|
||
(TODO: explain how LP tokens need to subscribe) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Unlock Callback & Deltas | ||
--- | ||
|
||
(TODO: explain) | ||
|
||
1. unlock() | ||
|
||
2. operations | ||
|
||
3. settle/take, burn/mint, clear, & deltas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Reading Pool State | ||
--- | ||
|
||
(TODO: explain StateLibrary and TransientStateLibrary) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Testing | ||
--- | ||
|
||
(TODO: explain Deployers / setUp() / common operations) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Guides", | ||
"position": 4, | ||
"collapsed": false | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Technical Reference", | ||
"position": 5, | ||
"collapsed": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: Overview | ||
--- | ||
|
||
# Overview | ||
|
||
(TODO: explain core contracts, and how users should expect to use them) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Core", | ||
"position": 1, | ||
"collapsed": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Libraries", | ||
"position": 0, | ||
"collapsed": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: StateLibrary.sol | ||
--- | ||
|
||
(TODO: state library) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: PoolManager.sol | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Periphery", | ||
"position": 2, | ||
"collapsed": false | ||
} |
5 changes: 5 additions & 0 deletions
5
docs/contracts/v4/reference/periphery/libraries/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Libraries", | ||
"position": 0, | ||
"collapsed": true | ||
} |
5 changes: 5 additions & 0 deletions
5
docs/contracts/v4/reference/periphery/libraries/action-constants.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: ActionConstants.sol | ||
--- | ||
|
||
(TODO: explain gas optimizations of using special constants) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
title: Actions.sol | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Overview | ||
--- | ||
|
||
(TODO: explain periphery and how its contracts are used) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: PositionManager.sol | ||
--- | ||
|
||
(TODO: posm) |