sambacha / gas-reporting Goto Github PK
View Code? Open in Web Editor NEWReference documentation on every gas price API and all the different formats
Home Page: https://doi.org/10.5281/zenodo.5702504
License: Other
Reference documentation on every gas price API and all the different formats
Home Page: https://doi.org/10.5281/zenodo.5702504
License: Other
Frontends like Uniswap do calculations off chain to compute gas cost, this should be documented to see how APIs are actually used in production
/**
* Computes a gas estimate for a V3 swap using heuristics.
* Considers number of hops in the route, number of ticks crossed
* and the typical base cost for a swap.
*
* We get the number of ticks crossed in a swap from the QuoterV2
* contract.
*
* We compute gas estimates off-chain because
* 1/ Calling eth_estimateGas for a swaps requires the caller to have
* the full balance token being swapped, and approvals.
* 2/ Tracking gas used using a wrapper contract is not accurate with Multicall
* due to EIP-2929. We would have to make a request for every swap we wanted to estimate.
* 3/ For V2 we simulate all our swaps off-chain so have no way to track gas used.
*/
Document zero blob gas yes
Arbitrum gas units are different: opcodes are priced differently, so swaps as an example, cost different amounts.
Arbitrum has 2 separate gas meters- one for compute and one for storage
On Arb its not clear if we capture everything we need by querying eth_gasPrice (also unclear if we need to capture both when estimating gas)
Optimism charges a fee based on the size of the calldata that would need to be sent to L1
On Optimism for example eth_gasPrice always return 1000000
Toodles
Provide machine readable code and eliminate monolithic documentation style in favor of a module based document generation process
https://docs.polygon.technology/docs/develop/tools/polygon-gas-station/
https://gasstation-mainnet.matic.network/v2
Implements the gas oracle
trait
{"safeLow":{"maxPriorityFee":34.244291729400004,"maxFee":36.7755934934},"standard":{"maxPriorityFee":38.49572602446667,"maxFee":41.02702778846667},"fast":{"maxPriorityFee":49.129580522800005,"maxFee":51.6608822868},"estimatedBaseFee":2.531301764,"blockTime":2,"blockNumber":29108660}
provide link to Foundation’s reports
/**
eth_feeHistory
(an EIP-1559 feature) to obtain information about gas fees from a range ofeth_feeHistory
will be made.priorityFeesByPercentile
in each returned block will be formed. When Ethereum runs theeth_feeHistory
method, for each block it is considering, it will first sort all transactions bypriorityFeesByPercentile
represents the priority fees of transactions at keybaseFeePerGas
will be filled in for this block (which isA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.