You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/0045-transaction_fee_minting.md
+46-52Lines changed: 46 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,80 +32,74 @@ Adding the fee-based model the platform won't require an upfront deposit. Instea
32
32
33
33
By selecting the appropriate model, token creators can optimize their minting strategy based on their specific needs and usage scenarios. A key use case is the creation of memecoins.
34
34
35
-
### An hybrid approach
35
+
### How to pproach
36
36
37
-
An alternative to bitcoin and etherium approchaes for blockchain fees is a hybrid model that combines minimum fees with payments based on actual resource usage, along with policies to prevent spam on the network. This model aims to balance user simplicity, protection against spam attacks, and long-term sustainability.
37
+
An alternative to bitcoin and etherium approchaes for blockchain fees is a hybrid model that combines fees based in the transaction size, with priority tip payments.
38
38
39
39
This model offers several advantages. First, it simplifies the user experience by providing a predictable fee without major fluctuations. Additionally, it enables a filtering mechanism to prevent excessively large or complex transactions, protecting the network from spam. Finally, its structure promotes sustainability, ensuring controlled blockchain growth.
40
40
41
-
### General Fee calculation rule
41
+
### Fee calculation
42
42
43
+
Hathor’s fees will be calculated similarly to Bitcoin, depending only on transaction size (in bytes) and a network-defined fee rate (in HTR per byte).
44
+
45
+
Proof-of-Work difficulty (transaction weight) will not influence the fee calculation.
46
+
47
+
Let's assume:
43
48
1. HTR is always used as the fee unit, regardless of the tokens involved in the transaction.
44
-
2. If only fee-based tokens are used, a single fee in HTR will be charged, regardless of the number of tokens.
45
-
3. If a transaction includes both deposit-based and fee-based tokens, only the fee-based tokens will incur a fee.
46
-
4. Interacting with nano contracts may introduce an additional fee depending on the execution complexity.
49
+
2. Even if fee-based tokens are used alone, or with a deposit-based token, a single fee in HTR will be charged, regarding the transaction size.
50
+
3. Interacting with nano contracts may introduce an additional fee depending on the execution complexity.
47
51
48
-
### Example Scenarios
52
+
Below is a pseudo code that explain how fee should be calculated, using a fee rate per byte:
49
53
50
-
#### Swapping Token A for Token A with a fee paid in HTR (fee in HTR)
54
+
*(Note: Excluded "hash" size from calculation, hence 114 reduced to 84 bytes.)*
51
55
52
-
Description: Transfer of the same token (A) between two parties.
0 commit comments