Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gas-optimizer

EIP-1559 gas bidding strategy optimizer with historical fee analysis and L2 cost comparison.

Features

  • EIP-1559 Bidder: Adaptive gas bidding based on fee history and trend analysis
  • Timing Optimizer: Time-of-day and day-of-week gas cost patterns
  • L2 Comparator: Cross-chain gas cost comparison (post-EIP-4844 blob support)
  • Wait Advisor: Should you submit now or wait for lower fees?

Usage

from gasopt.strategy import EIP1559Bidder

bidder = EIP1559Bidder(rpc_url="https://eth-mainnet.g.alchemy.com/v2/KEY")
bid = bidder.suggest_bid(urgency="medium", gas_limit=150000)
print(bid)

# should I wait?
wait = bidder.should_wait(target_base_fee_gwei=20.0)
from gasopt.analysis.l2_compare import L2Comparator

comp = L2Comparator()
costs = comp.compare_swap_cost(gas_units=150000, eth_price_usd=3000)
rec = comp.recommend(trade_size_usd=10000)

Tests

python -m pytest tests/ -v

About

EIP-1559 gas bidding strategy optimizer with historical fee analysis

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages