firefly icon indicating copy to clipboard operation
firefly copied to clipboard

[Bug report]: Firefly Stardust Beta - Total & Circulating supply should not be affected (from user POV) by Decimals setting

Open ericvrp opened this issue 3 years ago • 2 comments

Platform

Desktop

Version

2.0.0-beta-2.0.3

Description

When minting currently I receive circulation_supply / (10^decimals) coins instead of the circulation_supply itself (see screenshots). Screenshot 2022-07-29 at 19 49 22 Screenshot 2022-07-29 at 19 52 36

Expected behaviour

I would expect Total & circulatory supply amounts to be multiplied by 10^decimals prior to minting.

To me it looks like I ask for 100 dollars out of 1.000.000 and it has 100 cents per dollar. Instead I get 100 cents which doesn't seem what the minting dialog is suggesting me.

Actual behaviour

Getting to few coins when decimals are used

Can the issue reliably be reproduced?

Yes

Steps to reproduce the issue

  1. mint coins with decimals > 0

Operating System

Mac

Diagnostics

No response

Developer Profile

Yes

Profile Type

Software (Stronghold)

Staking

No response

Crash Status

None of the above

Error Messages

No response

Error Logs

No response

Duplicate declaration

  • [X] I have searched the issues tracker this issue and there is none

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ericvrp avatar Jul 29 '22 17:07 ericvrp

I would disagree. First you are selecting the circulating supply at 1000000, this will mint 1000000 tokens sendable tokens no matter what. The decimals is just part of the IRC30 metadata to describe how to display those tokens. So after minting it is displayed as 10000.00 but you can send a million tokens with the small denomination being 0.01.

If we where to multiply the supply by the decimals then a user wanting to mint 1000000 transactable fungible tokens displayed with 2 decimal places would accidentally mint 100000000 tokens.

nicole-obrien avatar Jul 29 '22 18:07 nicole-obrien

Assuming I name my coin XYZ and ask for 50 of those then I would expect 50 to arrive in my wallet regardless of the number of decimals.

For me it is similar when I would ask 50 euro at the bank. I do not expect to receive €0.50 just because a euro consists of 100 cents.

ericvrp avatar Jul 29 '22 18:07 ericvrp