Skip to content

Commit

Permalink
chore: v2 router docs (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
simplyoptimistic authored Jan 18, 2024
1 parent d90976a commit d6e7371
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Universal Router

The Uniswap Universal Router was adapted to work with the Velodrome ecosystem. This router allows a single swap to be routed through both Velodrome Finance V2 pools and Slipstream (CL) pools.

To see the commit of the smart contracts that was used in the latest deployment, see branch `deployed-commit`. To see the addresses of this latest deployment on each network, see folder `deploy-addresses`.

## High-Level Overview
Expand Down Expand Up @@ -134,6 +136,14 @@ The inputs for `V3_SWAP_EXACT_IN` is the encoding of 5 parameters:
- `bytes` The UniswapV3 path you want to trade along
- `bool` A flag for whether the input funds should come from the caller (through Permit2) or whether the funds are already in the UniversalRouter

Support for V2 pools has been added. For `V2_SWAP_EXACT_IN` The following parameters are required:

- `address` The recipient of the output of the trade
- `uint256` The amount of input tokens for the trade
- `amountOutMin` The minimum amount of output tokens the user wants
- `Route[]` The route struct representing the V2 pool (address from, address to, bool stable)
- `bool` A flag for whether the input funds should come from the caller

Whereas in contrast `CRYPTOPUNKS` has just 3 parameters encoded:

- `uint256` The ID of the punk you wish to purchase
Expand Down

0 comments on commit d6e7371

Please sign in to comment.