• # NEM Transaction Fees

Posted by Harshit Verma | Last Updated: 08-Jun-18

Transaction fees is an expense that must be deducted from every electronic transaction that we will processed.Hence the same rule is followed by the digital currencies. The  all digital  currency  follows the same rule, as the transaction of this currencies need some transaction fee. But this transaction fee is different for every digital currency.

As am gonna explain the transaction fee deduction  for the NEM coin.The coin known as XEM in the digital currencies market.According to the nem api's documentation ,users have to pay a fee for every transaction, that is going to be included in a block chain. Different transaction types have different fees. For example If you are going to add a message along with the transaction then some fees  for appending the message is also included in fees, hence different transaction type have different transaction fees.

Fees for transferring XEM to another account: 0.05 XEM per 10,000 XEM transferred,but it capped at 1.25 XEM .

For example:- 0.20 XEM fee is taken for a 45,000 XEM transfer and 1.25 XEM fee is taken  for a 500,000 XEM transfer and more.

I will explain  the fees deduction process using a simple method that takes an input of amount and calculate the fees as per the amount's value.

Let us assume that, the input amountGet =1000000;

public BigDecimal CalculateFeesForNemTxn(BigDecimal amountGet) {

BigDecimal amountForFeescal =amountGet.divide(BigDecimal.TEN.pow(6)) ;
BigDecimal fees = new BigDecimal("50000").divide(BigDecimal.TEN.pow(6));
if(amountForFeescal.compareTo(new BigDecimal("10000"))==-1 || amountForFeescal.compareTo(new BigDecimal("10000"))==0){
return  fees;
}else{
BigInteger amount = amountForFeescal.divide(new BigDecimal("10000")).toBigInteger();
BigDecimal newamount = new BigDecimal(amount);
fees = newamount.multiply(new BigDecimal("50000").divide(BigDecimal.TEN.pow(6)));
if(fees.compareTo(new BigDecimal("1250000").divide(BigDecimal.TEN.pow(6)))==0 || fees.compareTo(new BigDecimal("1250000").divide(BigDecimal.TEN.pow(6)))==1){
fees = new BigDecimal("1250000").divide(BigDecimal.TEN.pow(6));
return  fees;
}
return fees;
}
}
The  minimum fees that must be require for any transfer of XEM  to another  XEM account  is 0.05 XEM.

Tags: Cryptocurrency