> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stablenet.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Gas and Fees

> How StableNet calculates transaction fees — a modified EIP-1559 with governance-controlled priority fees and no base fee burning.

> StableNet uses EIP-1559-style fees with two key differences: the base fee goes to validators instead of being burned, and the priority fee is set by governance rather than the market.

## Fee components

Every transaction pays two components:

| Component              | Description                                   | Set by                |
| ---------------------- | --------------------------------------------- | --------------------- |
| Base fee               | Minimum fee determined by network utilization | Protocol              |
| Priority fee (gas tip) | Additional fee for validators                 | GovValidator contract |

For standard (non-authorized) accounts, the `maxPriorityFeePerGas` you specify in a transaction is overridden by the governance-enforced gas tip. You must include a value at or above the minimum — transactions below the threshold are rejected at the mempool level.

## Base fee adjustment

StableNet uses a dual-threshold system instead of Ethereum's ±12.5% adjustment:

| Gas utilization | Base fee change |
| --------------- | --------------- |
| > 20%           | +2% per block   |
| 6% – 20%        | unchanged       |
| \< 6%           | −2% per block   |

The base fee does not decrease below a protocol minimum, and increases are capped to prevent sudden spikes.

Unlike Ethereum, the base fee is **distributed to validators** — not burned. This preserves the stablecoin's 1:1 fiat backing (burning only happens at point of fiat redemption).

## Setting fees in your transaction

For EIP-1559 transactions (type `0x02`), set both fields:

```typescript theme={null}
const tx = await wallet.sendTransaction({
  to: recipient,
  value: ethers.parseEther("1.0"),
  maxPriorityFeePerGas: ethers.parseUnits("27600", "gwei"),
  maxFeePerGas: ethers.parseUnits("80000", "gwei"),
});
```

For Foundry `cast send` and `forge script`, pass `--priority-gas-price 27600000000000`.

<Note>
  The governance-enforced minimum priority fee is set by the GovValidator contract. Transactions with `maxPriorityFeePerGas` below this value are rejected before block inclusion.
</Note>

## Fee delegation (type 0x16)

StableNet adds a fee-delegated transaction type (`0x16`) where a separate account — the fee payer — covers gas costs. The sender's account only needs to hold the transfer value.

| Role      | Pays                  |
| --------- | --------------------- |
| Sender    | Transfer value only   |
| Fee payer | `gasLimit × gasPrice` |

Unused gas is refunded to the fee payer, not the sender.

## Gas estimation

Use `eth_estimateGas` to get the gas limit for a transaction before sending. The RPC endpoint returns the gas in units; multiply by the effective gas price to get the total fee in WKRC.

```typescript theme={null}
const gasEstimate = await provider.estimateGas({
  to: contractAddress,
  data: encodedCalldata,
});
```

## Developer benefits

* Predictable fees — base fee moves ±2% per block rather than ±12.5%
* KRW-denominated costs — fee estimates are stable in fiat terms
* Fee delegation — sponsor gas for users without changing contract logic

## Related

* [Fee Delegation Tutorial](/en/v0.3/build/tutorials/fee-delegation) — implement type 0x16 transactions
* [RPC API Reference](/en/v0.3/reference/rpc-api) — `eth_gasPrice`, `eth_feeHistory`, `eth_estimateGas`
