Gas & Fee Mechanics
Every transaction on Monolythium consumes gas. This page covers how gas is calculated, minimum prices, fee burning, EIP-1559 compatibility, estimation techniques, and fee grants.
How Gas Works
Gas measures the computational work required to execute a transaction. The fee paid by the sender is:
Fee = Gas Used x Gas Price
| Term | Description |
|---|---|
| Gas Limit | Maximum gas units the sender authorizes. Unused gas is refunded. |
| Gas Used | Actual gas consumed during execution. |
| Gas Price | Price per gas unit, denominated in alyth. |
| Fee | Total cost in alyth. 1 LYTH = 10^18 alyth. |
If execution exceeds the gas limit, the transaction reverts and the entire gas limit is consumed (no refund).
Minimum Gas Prices
Monolythium enforces minimum gas prices at two levels:
Protocol Level (feemarket module)
The feemarket module in genesis sets the global minimum base fee:
{
"feemarket": {
"params": {
"min_gas_price": "10000000.000000000000000000",
"base_fee": "10000000"
}
}
}
This means the minimum gas price is 10000000 alyth per gas unit, which equals 0.00000001 LYTH (10 nanoLYTH).
Node Level (app.toml)
Each node operator can set a local minimum in app.toml:
minimum-gas-prices = "10000000alyth"
Transactions below this threshold are rejected by that node's mempool. Validators typically set this equal to or above the protocol minimum.
A transaction that meets the protocol minimum but falls below a specific node's minimum-gas-prices will be rejected by that node. Use the protocol minimum or higher to ensure propagation across all nodes.
Fee Burn (x/burn Module)
Monolythium's custom x/burn module processes all gas fees at the protocol level:
| Destination | Percentage | Effect |
|---|---|---|
| Burned | 90% | Permanently removed from supply |
| Block Proposer | 10% | Reward for the validator that proposed the block |
Transaction Fee (100%)
├── 90% → Burn address (permanent supply reduction)
└── 10% → Block proposer reward
This burn mechanism is independent of the FeeCollector smart contract, which handles application-layer fees (DEX, MonoPump, etc.). See Fee Model for the full picture.
EIP-1559 Compatibility
Monolythium supports EIP-1559-style transactions through the feemarket module:
| Parameter | Description |
|---|---|
| Base Fee | Dynamically adjusted per block based on gas utilization |
| Max Fee Per Gas | Maximum total fee the sender is willing to pay |
| Max Priority Fee Per Gas | Tip to the block proposer above the base fee |
// EIP-1559 transaction with viem
const hash = await walletClient.sendTransaction({
to: "0xRecipient...",
value: parseEther("1.0"),
maxFeePerGas: parseGwei("0.02"), // max total price
maxPriorityFeePerGas: parseGwei("0.001"), // tip
});
The base fee adjusts based on how full the previous block was:
- Block > 50% full: base fee increases
- Block < 50% full: base fee decreases
- Block exactly 50% full: base fee unchanged
Legacy (pre-EIP-1559) transactions are also supported. The gasPrice field is treated as both maxFeePerGas and maxPriorityFeePerGas.
Gas Estimation
Cosmos CLI
# Dry-run to estimate gas (does not broadcast)
monod tx bank send <from> <to> 1000000000000000000alyth \
--chain-id mono_6940-1 \
--gas auto \
--dry-run
# Execute with a 50% safety buffer
monod tx bank send <from> <to> 1000000000000000000alyth \
--chain-id mono_6940-1 \
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 10000000alyth \
--keyring-backend file \
--yes
Always use --gas-adjustment 1.5 (or higher for complex transactions). State changes between estimation and execution can increase actual gas usage.
EVM (eth_estimateGas)
// ethers.js
const gasEstimate = await provider.estimateGas({
from: "0xSender...",
to: "0xRecipient...",
value: ethers.parseEther("1.0"),
});
// Add 20% buffer
const gasLimit = gasEstimate * 120n / 100n;
# curl
curl -X POST https://evm.testnet.mononodes.xyz \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [{
"from": "0xSender...",
"to": "0xRecipient...",
"value": "0xDE0B6B3A7640000"
}],
"id": 1
}'
Typical Gas Costs
| Operation | Gas Used | Fee (at min gas price) | LYTH Cost |
|---|---|---|---|
| Native LYTH transfer | ~21,000 | 210,000,000,000 alyth | ~0.00000021 LYTH |
| ERC-20 transfer | ~50,000 | 500,000,000,000 alyth | ~0.0000005 LYTH |
| ERC-20 approve | ~46,000 | 460,000,000,000 alyth | ~0.00000046 LYTH |
| DEX swap | ~200,000 | 2,000,000,000,000 alyth | ~0.000002 LYTH |
| Contract deployment (small) | ~500,000 | 5,000,000,000,000 alyth | ~0.000005 LYTH |
| Contract deployment (large) | ~3,000,000 | 30,000,000,000,000 alyth | ~0.00003 LYTH |
| Cosmos delegate | ~200,000 | 2,000,000,000,000 alyth | ~0.000002 LYTH |
| Governance vote | ~100,000 | 1,000,000,000,000 alyth | ~0.000001 LYTH |
These are approximate values. Actual gas depends on contract complexity and chain state.
Fee Grants (x/feegrant)
The feegrant module allows one account to sponsor transaction fees for another. This is useful for onboarding users who do not yet hold LYTH.
Grant a Fee Allowance
# Basic allowance (up to 100 LYTH in fees)
monod tx feegrant grant mono1granter... mono1grantee... \
--spend-limit 100000000000000000000alyth \
--chain-id mono_6940-1 \
--keyring-backend file \
--yes
# Periodic allowance (1 LYTH per day, resets daily)
monod tx feegrant grant mono1granter... mono1grantee... \
--period 86400 \
--period-limit 1000000000000000000alyth \
--chain-id mono_6940-1 \
--keyring-backend file \
--yes
# With expiration
monod tx feegrant grant mono1granter... mono1grantee... \
--spend-limit 100000000000000000000alyth \
--expiration "2027-12-31T23:59:59Z" \
--chain-id mono_6940-1 \
--keyring-backend file \
--yes
Use a Fee Grant
# The grantee sends a transaction using the granter's allowance
monod tx bank send mono1grantee... mono1recipient... 1000000000000000000alyth \
--fee-granter mono1granter... \
--chain-id mono_6940-1 \
--keyring-backend file \
--yes
Query Grants
# List all grants for a grantee
monod query feegrant grants-by-grantee mono1grantee...
# List all grants by a granter
monod query feegrant grants-by-granter mono1granter...
Revoke a Grant
monod tx feegrant revoke mono1granter... mono1grantee... \
--chain-id mono_6940-1 \
--keyring-backend file \
--yes
Unit Reference
1 LYTH = 1,000,000,000,000,000,000 alyth (10^18)
1 LYTH = 1,000,000,000 Gwei (10^9 Gwei)
1 Gwei = 1,000,000,000 alyth (10^9 alyth = 10^9 Wei)
Related
- Fee Model -- Full protocol fee architecture including FeeCollector
- Transaction Fees -- User-focused fee guide
- Transaction Lifecycle -- How fees are deducted during ante handlers
- Cosmos SDK Modules --
x/burnandx/feegrantmodule reference