Gas pricing fundamentals
Every MultiversX transaction specifies agasPrice in atomic EGLD units (10^-18 EGLD) and a gasLimit in gas units:
gasPrice of 1,000,000,000 (10^9). Validators prioritize higher-priced transactions, so the minimum price during congestion risks delayed inclusion.
PPU (price per unit) is the effective cost per gas unit. For transactions with a non-empty data field, each byte costs an additional 1,500 gas units. PPU accounts for this overhead, so it compares costs across transaction types more accurately than raw gasPrice.
The sliding window
Gas statistics are computed over a 30-minute sliding window of 10-second buckets (180 buckets total). As time advances, the oldest bucket expires and the window shifts forward.| Metric | Measures | Spam sensitivity |
|---|---|---|
avg | Mean over all transactions in window | Biased low by spam volume |
bucketAvg | Mean of per-bucket averages | Less sensitive to volume spikes |
p50 | 50th percentile gas price | Often at minimum during spam |
p75 | 75th percentile | Spam-resistant; typical legitimate price |
p90 | 90th percentile | Upper bound; high congestion |
p75 percentile filters these out and reflects what legitimate transactions paid, making it a stronger default for most applications.
Choosing the right percentile
| Scenario | Recommended | Rationale |
|---|---|---|
| Background operations | p50 or bucketAvg | Cheapest with historical inclusion |
| Standard user swaps | p75 | Reliable inclusion without overpay |
| Time-sensitive arbitrage | p90 | Competitive even during congestion |
| Mempool pressure > 0.5 | Shift up one tier (e.g., p75 → p90) | Queue is growing; higher price improves ordering |
| Shard has no transactions | 1,000,000,000 (minimum) | Shard is idle; minimum is sufficient |
1000000000 and PPU as 0, it has no recent transaction history. The minimum price is sufficient.
Using mempool pressure
ThenetworkStats stream on wss://relayer.xoxno.com/ws/stats pushes updates at adaptive intervals. Each message includes mempool.pressure per shard, representing current queue depth relative to throughput capacity.
Block time expectations
| Transaction type | Current network | After Supernova (600 ms blocks) |
|---|---|---|
| Same-shard | ~6 seconds | ~600 ms |
| Cross-shard | ~12 seconds (two block rounds) | ~1.2 seconds |
blockTimeMsP50ByShard field in networkStats gives the current median block time per shard. For cross-shard transactions, sum both shards.
Adaptive gas pricing example
- cURL
- TypeScript
- Python
- Rust
Practical guidelines
Do:- Subscribe to
gasStatsbefore your first transaction; the first message arrives immediately - Default to
p75for user-facing swaps - Escalate to
p90during periods of high network activity - Use
bucketAvgfor background or non-urgent operations
- Using the raw
avgfield (spam volume biases it low) - Setting
gasPricebelow1,000,000,000(the network rejects it) - Caching gas stats beyond a few seconds; conditions shift within a single block
Related pages
Gas statistics
Full gasStats message schema and field descriptions.
Network stats
networkStats stream with mempool pressure data.

