GitHub - mds1/convex-shutdown-simulation: Simulates a call to Convex Finance's system shutdown method, which uses about 16M gas (original) (raw)

Convex System Shutdown Benchmarks

This repository benchmarks performance of various Ethereum development frameworks by simulating a call to Convex's systemShutdown method. This method uses about 16M gas and performs a number of token transfers

Benchmarks

Benchmarks were run at mainnet block 14,445,961. Blocknative only simulates against the latest block (support for simulation at historical blocks is planned), so the Blocknative simulation was run first and other benchmarks were run against the same block.

Notes on benchmarks:

Framework Version
Blocknative HTTP request on 2021-03-23
Dapptools dapp 0.35.0, hevm 0.49.0
Ganache 7.5.0
Hardhat 2.12.3
Foundry forge 0.2.0 (250cc85 2022-12-02T00🔞26.200251Z)
Tenderly HTTP request on 2021-03-23
Framework Remote RPC Local RPC Cached
Blocknative N/A N/A 0m3.529s
Dapptools 52m17.447s 17m34.869s 3m25.896s
Ganache 7m24.070s 0m29.631s 0m15.665s
Hardhat 6m17.896s 0m25.642s 0m9.110s
Foundry 5m55.141s 0m11.606s 0m0.999s
Tenderly N/A N/A 0m1.9315s

Notes on gas usage:

Framework Gas Used
Blocknative 26,668,845
Dapptools 24,066,128
Ganache 22,580,009
Hardhat 22,580,009
Foundry 22,561,940
Tenderly 22,580,009

Usage

  1. Run cp .env.example .env, and in the resulting .env file enter a URL to an Ethereum archive node in the ETH_RPC_URL environment variable. (Alchemy provides free archive node data). Also fill out the TENDERLY_* variables to benchmark the Tenderly API
  2. Run yarn to install dependencies for Ganache and Hardhat
  3. Install Foundry's forge and Dapptools using the installation instructionshere and here respectively
  4. Run dapp update to install dependencies for Dapptools and Foundry
  5. Run any command in the Makefile to benchmark that tool. For example, use make benchmark-hardhat to run the simulation against Hardhat. Alternatively, run make benchmark-all to run all tools

Tips