Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ The specifications of this contract are as follows:
- Full ERC20 Compatibility and Traceability: Consequently, all existing ERC20 functions for stable token usage are fully compatible, with the added benefit of being able to track all base coin movements via Transfer events.

### A Gas Fee Policy Optimized for Stablecoin Environments
Ethereum-based blockchains commonly incorporate two primary components in their transaction gas fees: base fee and priority fee. These two fees serve distinct purposes. The base fee is designed to mitigate excessive transaction requests that exceed the blockchain's capacity. It dynamically adjusts with block congestion, serving as a defense mechanism against attacks like DDoS. Reflecting this public utility, the base fee is burned by the chain rather than being paid to miners. The priority fee, conversely, is paid to miners and functions as a 'tip' for users to request faster processing of their transactions.
Ethereum-based blockchains commonly incorporate two primary components in their transaction gas fees: the base fee and the priority fee, each serving a distinct purpose. The base fee is designed to regulate excessive transaction demand that exceeds the network’s processing capacity. It adjusts dynamically in response to block congestion and functions as a defensive mechanism against attacks such as DDoS. Reflecting its role as a public utility, Ethereum burns the base fee rather than paying it to validators. The priority fee, by contrast, is paid directly to validators and functions as a discretionary “tip,” allowing users to competitively request faster transaction processing.

These two fee policies necessitate modifications within a stablecoin chain. Firstly, due to the fundamental premise that stablecoins should never be burned without fiat currency redemption, the base fee cannot be incinerated. While an increased base fee, even when generated for public utility according to a defined protocol, could reasonably be paid to validators, it is not inherently irrational. In an inflation-free chain, allocating the base fee to miners might be more appropriate. Of course, there's a possibility that the base fee increase formula could be manipulated by validator collusion to be more sensitive to block congestion. However, under the assumption of a PoA consensus body, such adjustments would not be easily made if they compromise the chain's success. We have modified the existing Ethereum implementation, where the base fee began to rise when block capacity exceeded half, to now increase only when the block is nearly full (at 90%). The gradient of this increase has also been adjusted to reflect realistic usage.
These fee policies require modification in the context of a stablecoin-oriented blockchain. Stablecoins operate under the fundamental premise that value should not be destroyed without corresponding fiat redemption. For this reason, burning the base fee is incompatible with the monetary guarantees expected of a stablecoin system. In StableNet, the base fee is therefore not burned but instead distributed among validators according to their demonstrated diligence in block production and validation. In an inflation-free system, allocating the base fee in this manner provides a rational mechanism for compensating those who actively maintain the network while preserving the integrity of the underlying stable value.

The concept of the priority fee is fundamentally misaligned with the nature of stablecoins, requiring a structural redesign rather than simple parameter tuning. In traditional systems, transaction senders can freely set maxPriorityFeePerGas. In StableNet, however, this value is determined through validator governance and enforced network-wide for all normal accounts. Once finalized through consensus, the voted-upon priority fee becomes mandatory and cannot be modified by individual users. Normal users may continue to submit EIP-1559 dynamic fee transactions, but the governance-defined priority fee takes precedence. Any submitted value above the mandated fee is ignored, and only the enforced amount is charged; values below the required fee result in immediate transaction rejection. A higher priority fee may still be used for nonce replacement, though not for execution priority. In contrast, authenticated Authorized Accounts retain full control over the priority fee field and may specify their own GasTipCap. This restores the traditional competitive prioritization mechanism exclusively for these accounts, allowing their transactions to be executed ahead of normal account transactions when competing in the mempool. StableNet increases the maximum block gas limit to 105,000,000, enabling approximately 5,000 basic transfers per block. We operate under the assumption that, unlike Ethereum, transactions will rarely remain pending in the mempool. Under this assumption, the notion of a market-driven priority fee becomes unnecessary. If blocks consistently reach full capacity, the base fee would rise continuously, eventually reducing demand as transaction costs increase. For that reason, StableNet explores prioritization mechanisms aligned with public utility principles rather than purely economic incentives, ensuring fairness and stability while supporting authenticated priority where operationally justified.
StableNet also adopts a different approach to base fee adjustment. Rather than relying on a single target utilization threshold, the base fee is adjusted based on utilization bands derived from gas usage in the previous block. When block usage exceeds 20% of capacity, the base fee enters an increase zone; when usage remains between 6% and 20%, the fee is held constant; and when usage falls below 6%, the fee decreases. In all cases, adjustments are applied at a fixed rate of 2%. This band-based model is intended to avoid abrupt fee fluctuations while still responding predictably to changes in network demand.

Stablenet fundamentally pegs its gas fees to the KRW currency. Protocol constants related to gas fees are defined in the protocol_params.go file with the following constants. If a different currency, such as USD, were to be used as the base coin, these constants would need to be adjusted to calculate appropriate gas fees.
The concept of a market-driven priority fee is fundamentally misaligned with the nature of stablecoins and therefore requires structural redesign rather than simple parameter tuning. In traditional systems, transaction senders may freely specify maxPriorityFeePerGas. In StableNet, however, this value is determined through validator governance and enforced uniformly across all normal accounts at the network level. Once finalized through consensus, the governance-defined priority fee becomes mandatory and cannot be modified by individual users. Normal users may continue to submit EIP-1559-style dynamic fee transactions, but the enforced priority fee always takes precedence. Any submitted value above the mandated fee is ignored, and only the fixed amount is charged; values below the required threshold result in immediate transaction rejection. A higher priority fee may still be specified for nonce replacement purposes, but not for execution prioritization.

In contrast, authenticated Authorized Accounts retain full control over the priority fee field and may specify their own GasTipCap. This selectively restores the traditional competitive prioritization mechanism for these accounts, allowing their transactions to be executed ahead of those from normal accounts when competing within the mempool. StableNet operates under the assumption of a high-throughput execution environment capable of processing on the order of approximately 3,000 basic transfer transactions per second. Unlike Ethereum, transactions are not expected to remain pending in the mempool for extended periods. Under this assumption, the notion of a market-driven priority fee becomes unnecessary. If blocks were to remain consistently saturated, the base fee would increase gradually according to predefined rules, raising transaction costs and naturally moderating demand over time. For this reason, StableNet explores prioritization mechanisms aligned with public utility principles rather than purely economic competition, while still supporting authenticated priority where operationally justified.

Finally, StableNet fundamentally pegs its gas fees to the KRW currency. Protocol constants related to gas fee calculation are defined in the protocol_params.go file. Should a different base currency, such as USD, be adopted, these constants would be adjusted accordingly to derive appropriate gas fees.

```
IncreasingThreshold uint64 = 20 // Raise base fee when network utilization exceeds this threshold (in %)
Expand Down