Skip to content
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

feat(loadtest): implement uniswapv3 loadtest #122

Closed
wants to merge 137 commits into from
Closed

Conversation

leovct
Copy link
Member

@leovct leovct commented Sep 19, 2023

##j Description

This PR implements uniswapv3-like loadtest against RPC endpoints.

  • Add a new subcommand of the loadtest command called uniswapv3.
  • Chose to deploy the full UniswapV3 contract suite or use pre-deployed contracts to speed up the process.
  • Perform any number of swaps on a ERC20 pool.

On top of that, the PR fixes an issue with the blockUntilSuccessful method. When the waiting period exhausts (see the default case), the method returns nil instead of an error.

Jira / Linear Tickets

Testing

❌ At the moment, we can deploy the contracts, create and initialise a pool but when trying to provide liquidity, we get an execution reverted msg. This happens even after the waiting period of 30 blocks (around 60 seconds with a local geth dev node).

  • Uniswap swap loadtest with contract deployments
$ go run main.go loadtest uniswapv3 http://localhost:8545 --verbosity 700
  • Uniswap swap loadtest with pre-deployed contracts
$ go run main.go loadtest uniswapv3 http://localhost:8545 \
  --uniswap-factory-v3-address 0xc5f46e00822c828e1edcc12cf98b5a7b50c9e81b \
  --uniswap-migrator-address 0x24951726c5d22a3569d5474a1e74734a09046cd9 \
  --uniswap-multicall-address 0x0e695f36ade2a12abea51622e80f105e125d1d6e \
  --uniswap-nft-descriptor-lib-address 0x23050ec03bb24308c788300428a8f9c247f28b25 \
  --uniswap-nft-position-descriptor-address 0xea43847a98b671211b0e412849b69bbd7d53fd00 \
  --uniswap-non-fungible-position-manager-address 0x58eabc23408fb7896b7ce943828cc00044786449 \
  --uniswap-proxy-admin-address 0xdba55eb96288eac85974376b25b3c3f3d67399b7 \
  --uniswap-quoter-v2-address 0x91464a00c4aae9dca6d503a2c24b1dfb8c279e50 \
  --uniswap-staker-address 0xc87383ece9ee3ad3f5158998c4fc04833ba1336e \
  --uniswap-swap-router-address 0x46096eb627d30125f9eaaeefeecaa4e237a04a97 \
  --uniswap-tick-lens-address 0xc73dfb5055874cc7b1cf06ae83f7fe8f6facdb19 \
  --uniswap-upgradeable-proxy-address 0x28656635b0ecd600801600475d61e3ec1534de6e \
  --weth9-address 0x5570d4fd7cce73f0135536d83b8d49e6b77bb76c \
  --uniswap-pool-token-0-address 0x1ce270d0380fbbead12371286aff578a1227d1d7 \
  --uniswap-pool-token-1-address 0x060f7db3146f3d6748822fb4c69489a04b5f3278 \
  --verbosity 700
...

@leovct leovct changed the title feat: uniswapv3 loadtest feat(loadtest): uniswapv3 loadtest Oct 12, 2023
@leovct leovct changed the title feat(loadtest): uniswapv3 loadtest feat(loadtest): implement uniswapv3 loadtest Oct 12, 2023
@leovct leovct closed this Oct 18, 2023
@leovct leovct deleted the feat/uniswap-loadtest branch October 24, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant