Crypto Newbie

Crypto Cho Người Mới / Mô phỏng / Gas Market (EIP-1559)

Simulator Ethereum Gas Market (EIP-1559)

Trước EIP-1559 (8/2021), Ethereum gas là first-price auction — user guess bid và often overpay wildly. EIP-1559 introduced base fee + tip: base fee adjust algorithmically mỗi block dựa demand, và BURNED (không pay validator). Simulator này chạy 15-50 block dưới các demand pattern khác nhau để bạn thấy base fee evolve sao, khi nào tip compete, và transaction bạn thực sự cost bao nhiêu.

Config block sequence

Result qua block mô phỏng

Final base fee

15.74 gwei

Final cost (op bạn)

$9.36

Block-by-block

BlockBase fee (gwei)UtilizationMedian tipTotal (gwei)Cost (USD)
#120.00106%2.2822.28$11.70
#220.14105%2.2322.37$11.75
#320.2680%0.9021.16$11.11
#419.7470%0.8520.59$10.81
#519.0061%0.8019.80$10.40
#618.07105%2.2420.31$10.66
#718.1889%0.9519.12$10.04
#817.94102%2.0920.03$10.52
#917.9868%0.8418.82$9.88
#1017.25105%2.2419.49$10.23
#1117.3594%0.9718.32$9.62
#1217.2269%0.8518.07$9.49
#1316.5697%0.9817.54$9.21
#1416.4964%0.8217.31$9.09
#1515.74102%2.0917.83$9.36

Formula adjustment base fee

Mỗi Ethereum block target 50% utilization (15M gas của 30M block limit). Khi block exceed target, base fee block tiếp tăng up to 12.5% (proportional với overshoot). Khi block undershoot, base fee decrease up to 12.5%. Nghĩa: demand high sustained có thể rapidly push base fee từ 20 gwei → 200 gwei trong ~30 block (~6 phút). Nhưng idle block rapidly bring back down. Result: base fee track demand smoothly without 100x spike.

Sao base fee BURNED (không pay validator)

Khi EIP-1559 launch, đây là phần controversial. Validator trước kept mọi fee; giờ chỉ keep tip. Reasoning: separate base fee khỏi validator payment remove incentive cho validator manipulate gas (e.g., empty block drive up price block tiếp). Burning base fee cũng tạo ETH supply pressure — trong activity cao, ETH burned exceed ETH issued, làm ETH net DEFLATIONARY. Kể từ merge + EIP-1559, ETH supply roughly flat (~120M).

Khi nào tip thực sự matter

Dưới normal demand, tip ≈ 1-2 gwei đủ — transaction bạn included nhanh. Dưới high demand (NFT mint, popular DEX launch, market crash), tip spike về 50-200 gwei vì user compete bid vào limited block space. Block builder pick transaction by tip-per-gas, transaction high-tip go first. Nếu bạn không vội, set low tip và wait — base fee + low tip bạn likely đủ trong vài block.

Total cost = base fee + tip + gas units

Total cost bạn = (base_fee_gwei + tip_gwei) × gas_units_used. ETH transfer = 21,000 gas. ERC-20 transfer = ~65k. Uniswap swap = ~150k. NFT mint = ~200k. Aave deposit = ~250k. Complex DeFi tx = 500k+. Nên nếu base fee 30 gwei + 2 gwei tip + ETH at $3500: transfer = (32 × 21000 × 10^-9) × 3500 = $2.35. Uniswap swap = (32 × 150000 × 10^-9) × 3500 = $16.80. NFT mint = $22.40. Complex tx (multi-hop swap + LP deposit) = $55+.

Câu hỏi thường gặp

+Sao base fee trên simulator khác etherscan?

Real-time base fee tùy actual block utilization trên mainnet. Simulator dùng synthetic pattern (low/normal/high/spike/volatile) show cách math work. Real mainnet dưới normal hover ở 10-40 gwei. Trong spike (NFT drop, DeFi launch, market crash) spike về 100-500 gwei. Pattern 'spike-then-fall' của simulator mimic this best.

+Khác nhau giữa gas LIMIT và gas USED là gì?

Gas LIMIT là max bạn authorize transaction consume. Gas USED là gì actually consumed. Bạn charged cho USED, không LIMIT (trừ tx revert — pay gas spent trước revert, không unused portion). Always set LIMIT slight trên expected USED (e.g., 200k cho Uniswap swap dùng ~150k) ensure transaction có room complete.

+Tôi avoid EIP-1559 fee entirely được không?

Trên Ethereum L1, no. Nhưng L2 rollup (Arbitrum, Optimism, Base) có own fee mechanism — Arbitrum charge L1 publication cost + L2 execution cost, often < $0.10 per swap. Layer 2 là câu trả lời cho đa số user; Ethereum L1 cho high-value transaction nơi security matter hơn cost (institutional flow, settlement-layer op).

+Sao vài block fully empty nhưng base fee still chỉ fall 12.5%?

12.5% adjustment cap intentional — prevent oscillation. Nếu base fee drop 100% trong one empty block rồi spike 1000% trong one full block, market sẽ chaotic. Capped adjustment nghĩa base fee change smooth qua multiple block, cho user react. Trade-off: dưới extreme idleness (e.g., Christmas Day no activity), base fee stay artificially high cho many block trước normalize.

+Khác nhau giữa EIP-1559 và proposer-builder split (PBS) là gì?

Layer khác. EIP-1559 (2021): fix fee market — base fee + tip + burn. PBS / MEV-Boost (2022): separate block construction khỏi block proposing — proposer receive block từ professional block builder optimize cho MEV extraction. EIP-1559 changed FEE. PBS changed WHO ASSEMBLES BLOCK. Both still active hôm nay.