Name Is concentrated liquidity? Router contract address A pool address
Trader Joe Yes 0xb4315e873dbcf96ffd0acd8ea43f689d8c20fb30 0xF8a60082039A1Acbe43b045f87AA0c5f24a358a4
Camelot 3 Yes 0x1F721E2E82F6676FCE4eA07A5958cF098D339e18 0xB1026b8e7276e7AC75410F1fcbbe21796e8f7526
Uniswap 3 Yes 0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45 0xcda53b1f66614552f834ceef361a8d12a0b8dad8
Sushi Yes 0xfc506aaa1340b4dedffd88be278bee058952d674, 0x09bd2a33c47746ff03b86bce4e885d03c74a8e8c
Ramses Yes 0x2c9a8c5814bbd8eb4f3531efb836f3d1fa185f38
Uniswap V2 No 0x4c60051384bd2d3c01bfc845cf5f4b44bcbe9de5
Camelot V2 No

Superposition AMM gas analysis (randomly generated)

Trades were randomly generated using a sizeable dataset.

Description Median L1 posting fee Median L2 computation fee Full gas amount
Random single pool trades with a 1e6 asset versus a 1e18 asset 68,703 262,737 331,440

Methodology for comparison (IGNORE ME - NOT USED IN PRACTICE)

  1. The random dataset was generated with some Q code. We had some issues with abi.q, so we used an intermediate step of converting it to a CSV to stdout, to be handled by a Go program. This is the creation of the liquidity amounts for stresstesting.
/ you would need to invoke this script with q -q -S 123, then \\l superposition_data.q

calcdelta:... / stubbed (IGNORE ME)

length:10000000

gentick:{[] {(rand 1774544) - 887272}@'length?1}
amount0MaxAmt:10000*1e6 / per trade!
amount1MaxAmt:100000*1e18

main:{
	c:update l:?[l>u;u;l], u:?[l>u;l;u] from([] amount0:length?amount0MaxAmt; amount1:length?amount1MaxAmt; l:gentick[]; u:gentick[]);
	-1","0:update delta:{calcdelta[x`amount0;x`amount1]}@'c from c;
	exit 0}

main[]
  1. A local Stylus instance needs to be run locally.
  2. This is a Go program that reads from the CSV file using mmap, sending it out to specific goroutines that execute the calldata sequentially. It first allocates the “buckets” of liquidity that will need to be minted using a specific token, first transferring the amounts to the addresses derived from the private keys. It then begins to distribute the tasks to the workers given. Gist here
  3. This is a program that generates public/private keys that can be used to create the LP positions with. Gist here . It could be composed into function arguments using $(tail -n +2 addresses-used.csv | cut -f 1)
  4. You would then need to call the function on the AMM createPool .
  5. This program should be run against the local Stylus instance to populate the ticks. This will populate the liquidity to facilitate the swaps we’ll make. This will stress the local environment, and will take time.

Uniswap 3 gas analysis (from 71876737 to 169909567)

Description Median L1 posting fee Median L2 computation fee Full gas amount USD gas cost
Every single swap transaction interacting with a pool that went through the Uniswap V3 SwapRouterV2 with the supported list of functions 555,737 701,895 1,258,228

Specific approach taken for comparison

  1. Functions exactInput(tuple params) (0xb85818), exactInputSingle(tuple params) (0x04e45a ), exactInputSingle(tuple params) (0x414bf3), exactInput(tuple params) (0xc04b8d), exactOutput(tuple params) (0x09b813), exactOutputSingle(tuple params) (0x5023b4) that interacted with the SwapRouter02 were selected for in the final dataset.
  2. The pools were found using Arbiscan’s transaction history on the factory contract, then taking those transaction hashes, and going through the topics/data that was created. Using that as a frame of reference was the approach that was taken. Then some scripting was used to get the address of the pool was used (ie, jq -r '.[] | [.tx.hash, .receipt.logs[0].topics[0], .receipt.logs[0].data] | @csv' | grep 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118 | sed 's/"//g' | cut -f3 -d, | cut -c91-)
  3. Each pool was scanned using a filter log query the same way as before. These were then filtered for the Swap event.

Camelot V3 gas analysis (from 103164316 to 178277479)

Description L1 posting fee L2 computation fee Full gas amount USD gas cost
Every transaction that interacted with a pool that was a Swap using the Algebra Router directly (150 transactions) 691,306 989,492 1,682,032