BUG(?): NanoWallet allows 0 amount for mosaic transfer

See this hash as example:
http://chain.nem.ninja/#/transfer/ddeadb95f5d2481036f4690248f7109c3406a51a553032473de032dfbf935d13

The NanoWallet allowed the transaction to be sent (and levy collected!) even though 0 mosaics were transferred.

Cheers
Rob

I’ve transferred this to GitHub as issue #325.

Why should this be a bug? You specified an absolute levy, so the amount transferred doesn’t matter.

You make a valid point from an absolute levy point of view but I think this is an edge case - and from a transfer point of view, a zero mosaic transfer is pointless.

If a zero mosaic (levy only) transfer has a valid purpose / is intended functionality, then NanoWallet should at least warn that there is no quantity specified before allowing the transfer to proceed because 99.999% of transfers will intend to include a quantity.

And considering our previous discussions about protecting NEMbers from incurring levies unintentionally, it would seem prudent to warn before allowing a levy only transfer.

I think there is also a strong argument that a ZERO quantity transfer should not incur an absolute levy because - in effect - no mosaic transfer has taken place

It goes against the spirit of a levy… it’s like taxing the thought of a transaction in a mosaic.

And that’s why I think it should be a bug to allow zero quantity mosaic transfers.

I interpret absolute levy as being totally independent of the mosaic amount transferred, hence even if the amount is 0 the levy will be transferred.

A levy (absolute or otherwise) has to be contingent on some meaningful event.

What meaningful event has happened in a zero quantity mosaic transfer?

The event is that there was a transfer, like attaching a message
"Dear RobW, I am not sending you any mosaics but i donate this levy to you ;)"

But it’s meaningless in the real world - like I said, it’s taxing the thought of a transfer.

By that logic, the levy should apply if someone mentions the name of the levied mosaic in a message too :wink:

I understand that there may be some, as yet unknown, edge case where a zero quantity mosaic transfer might have a purpose and that’s why allowing them could be defended, but as the overwhelming majority of mosaic transfers will intend to have a non-zero quantity, the wallet should at least warn in case of zero quantity.

After all, the process of attaching a mosaic is multi-step… you have to tick the box, add the mosaic from the list, and then specify the quantity - so in the case of a single mosaic transfer it’s easy to overlook that just adding it wasn’t enough to actually send it!

It would also reduce unnecessary transaction bloat… I see countless mosaic transfer transactions in the blockchain where 0 XEM are also transferred with another mosaic… just because it’s the default and they forgot to remove it.

You can ask @Quantum_Mechanics to add that, there must be a Nano Wallet thread somewhere.

In case you mean that the block explorer nembex shows 0 XEM being transferred, that is a bug in nembex. The amount field in the transaction has nothing to do with the transfer of XEM.
Else if there are really 0 XEM transferred as mosaic, the user was simply stupid / ignorant.

I think that’s quite harsh… even @mizunashi has made such a transaction with 0 XEM attached as mosaic, so if someone so familiar with NEM can do it, then you can bet that it’s a problem in the way NanoWallet presents the feature or allows it without warning.

Recently there are hackers who only steal Mosaic.
It can not be retrieved easily with Nembex, so it is very troublesome.
I intentionally send 0xem to such an account so that it can be easily searched by Nembex.

(I am writing about this regardless of this topic. It is a countermeasure against hacking to the last.)

I’m actually very pleased that my example was proved wrong :slight_smile: :joy:

Still, even though we now have established one edge use-case, the transfer of zero quantity cannot be considered ‘normal’, and has potential for users to accrue levies unintentionally, so the wallet should really warn people before allowing such a transaction.

Anyhow, hope this suggestion and discussion is useful

1 Like