Stellar
Fee Strategy
Stellar's fee model charges a base fee of 100 stroops (0.00001 XLM) per operation. During congestion, validators prioritize transactions with higher fees. Instead of using the static base fee, StellarNotherc queries Horizon'sfeeStats endpoint and sets fees dynamically.
Urgency Levels
| Urgency | Fee Source | Behavior |
|---|---|---|
| low | Base fee (100 stroops) | Cheapest option. May queue during network surges. |
| normal | feeStats median | Default. Uses the median charged fee when a surge is detected, falls back to base fee otherwise. |
| high | feeStats p90 | Near-guaranteed fast inclusion even during heavy congestion. |
Surge Detection
A surge is detected when the median charged fee from the last ledger exceeds 2× the base fee. When no surge is detected, all urgency levels resolve to the base fee to minimize cost.
isSurge = feeStats.fee_charged.p50 > baseFee × 2
Caching
Fee stats are cached for 15 seconds to avoid hitting the Horizon API on every transaction. The cache is shared across all concurrent requests within the web app process.
Usage
All transaction builders in the codebase call getSurgeFee(server) instead of server.fetchBaseFee(). This applies to:
- Direct XLM payments (tool purchases, refunds)
- Path payments (SDEX cross-asset conversion)
StellarNotherc Docs