0.7 Transaction fees - Makh1/italcoin GitHub Wiki

Settings

Setting	Default         Value (Units)	 Description

limitfreerelay	        15,000 (Bytes)	Limit of free transactions the client will relay to other nodes per minute
mintxfee	         0.001 (ITAL)	Minimum fee per KB for non free transactions (creating)
minrelaytxfee	         0.001 (ITAL)   Minimum fee per KB for non free transactions (relaying)
mininput	       0.00001 (ITAL)   Wallet ignores smaller inputs
DUST_THRESHOLD	         0.001 (ITAL)   Minimum output to avoid an additional mintxfee charge per smaller output
blockmaxsize	     1,000,000 (Bytes)	Maximum block size
blockminsize	             0 (Bytes)	Minimum block size
blockprioritysize	17,000 (Bytes)	Size of the block reserved for highest-priority transactions (regardless the fee)
maxhighprioritytxsize	12,000 (Bytes)	Maximum size of a transaction to be eligible for highest-priority

Fee and Change Handling Once you’ve calculated the size of your inputs and outputs, you need to use the minimum fee per kilobyte to figure out the fee.

Example: If your inputs and outputs add up to 560 bytes, that is under 1 kilobyte, meaning the fee is (mintxfee * 1) (currently that is 0.001 ITAL).

Important Note: Because of ITALcoin’s dust mitigation, if you have any outputs that are under 0.001 ITAL (DUST_THRESHOLD), you will be penalised with an extra 0.001 fee for each output.

Example Transaction Input 1: 5 ITAL to Address A (60 bytes) Input 2: 5 ITAL to Address A (60 bytes) Output 1: 4 ITAL to Address B Output 2: 0.0005 ITAL to Address C

Size: 200 bytes (Note: these are all made-up numbers just for an example)

Now that we know where the coins are going, and the values of those, we can calculate the fee and change:

  1. The transaction gave us 0.9995 remaining Ital coins

  2. The size was 200 bytes. That adds 0.001 to the fee because it’s within 1 kilobyte.

  3. There was an output below the 0.001 threshold. This adds another 0.001 ITAL penalty fee.

  4. 0.9995 (Change) - (0.001 * 2) (Fee) = 0.9975 Change

All we have to do now, is add another output to the change address, that could be Address A, or another address the user owns/wants the coins to go to.

New Transaction with Change

   Input 1: 5 ITAL to Address A (60 bytes)
   Input 2: 5 ITAL to Address A (60 bytes)
   Output 1: 4 ITAL to Address B
   Output 2: 0.0005 ITAL to Address C
   Output 3: 0.9975 ITAL to Address A (CHANGE)
The remaining unspent coins (0.002) will become the miners fee, as they were not spent in the transaction.

What do I do if I have change that is below 0.001 (current dust threshold)? The recommended way (which is used in the official client for desktop and mobile devices), is to drop the change as a miners fee. Because you’re penalised for outputs under 0.001, it’s highly recommended to simply drop the change and allow it to become part of the miner fee.

⚠️ **GitHub.com Fallback** ⚠️