Should I calculate mosaic transfer fee using the current supply?

I implemented mosaic transfer program but I got FAILURE_INSUFFICIENT_FEE.

The supply of the mosaic I want to transfer was changed from 10,000 to 15,000 but I calculated the transfer fee using the initial supply(10,000).

In NEM NIS API Documentation, mosaic transfer fee seems to be calculated with initial supply of the mosaic.

https://nemproject.github.io/#transaction-fees

But in NemWallet, mosaic transfer fee is calculated using the current total supply of the mosaic.

  • Which is correct? Should I calculate mosaic transfer fee using the initial supply or the currenty total supply?

  • If I should use the current total supply, can I use “/mosaic/supply” API used in NemWallet ? The API is not listed in NEM NIS API Documentation.

1 Like

Hello,

Yes you should use the total supply, not the initial one.

For your mosaic, it is actually a big change in case your divisibility is 0. With a supply of 10k, you fall into “small supply mosaic”, for which sending always costs 0.05 XEM (min fee). This is to provide small entreprises a static fee calculation.

With 15k though, you dont fall into this category anymore, and you must calculate the fee by first converying the amount into a XEM amount.

The /mosaic/supply endpoint was added later on and the docs were not updated. It is the correct way to calculate your total supply :ok_hand:

Regarding the fee calculation, you can have a look here:

2 Likes

Thank you for detailed answer.

I understand that I should use the current total supply for calculating mosaic transfer fee.

And I also understand that I can use “/mosaic/supply” endpoint to get the current total supply.

Thank you again.

1 Like