Skip to content

feat: tune default min gas price from 100000usaf to 0.05usaf - #26

Merged
safrochain merged 1 commit into
Safrochain-Org:mainfrom
danbaruka:feat/tune-min-gas-price
May 18, 2026
Merged

safrochain merged 1 commit into
Safrochain-Org:mainfrom
danbaruka:feat/tune-min-gas-price

Conversation

@danbaruka

Copy link
Copy Markdown
Member

Summary

Follow-up to #25, which set the default min-gas-prices to 100000usaf per gas unit. At that rate, a typical MsgSend (≈80 000 gas) costs 8 000 SAF — more than any community validator's self-stake. This PR drops the default to 0.05usaf per gas, putting per-tx user costs in the cent range while still meaningfully feeding validator fee revenue.

Per-tx cost at the new default

Message Gas Fee in SAF (1 SAF = 1e6 usaf)
MsgSend 80 000 ~ 0.004 SAF
MsgDelegate 200 000 ~ 0.010 SAF
IBC MsgTransfer 200 000 ~ 0.010 SAF
Wasm contract call 1 000 000 ~ 0.050 SAF

Notes

  • One-line change in cmd/safrochaind/cmd/root.go.
  • Operators can still override per-host via app.toml minimum-gas-prices — this only touches the default that ships with a fresh safrochaind init.
  • Tested locally on safrochain-1 (8 validators, height-1 boot via InitGenesis is unaffected; this only changes the default Server config for newly-initialised homes).

Test plan

  • CI green
  • Manually verify safrochaind init on a fresh home writes minimum-gas-prices = "0.05usaf" to the generated app.toml
  • Confirm a MsgSend at default fees is accepted on a local devnet

The default of 100000usaf per gas unit set in Safrochain-Org#25 produced absurd
per-tx fees: a MsgSend at the typical 80 000 gas would cost
8 000 SAF — more than any community validator's self-stake.

This drops the default to 0.05usaf per gas, calibrated so:
  - MsgSend (80 000 gas)            ~= 0.004 SAF
  - MsgDelegate (200 000 gas)       ~= 0.010 SAF
  - IBC MsgTransfer (200 000 gas)   ~= 0.010 SAF
  - Wasm contract call (1 M gas)    ~= 0.050 SAF

Validators still earn fee revenue (about 10x more per tx than the
0.005usaf I was evaluating against earlier) while keeping
user-visible costs in the cent range. Operators can still override
via app.toml `minimum-gas-prices`.
@safrochain
safrochain self-requested a review May 18, 2026 19:32
@safrochain
safrochain merged commit 2a81bd2 into Safrochain-Org:main May 18, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants