Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About Nft percentage #65

Open
ndkazu opened this issue Dec 19, 2021 · 1 comment
Open

About Nft percentage #65

ndkazu opened this issue Dec 19, 2021 · 1 comment
Labels
question Further information is requested

Comments

@ndkazu
Copy link

ndkazu commented Dec 19, 2021

Question
Hello,
I saw in your NFT pallet that you're using the type u8 for percentage. How would you deal with percentages of 12.3% for example?
or another case: when the minter (owns 100%) wants to distribute the NFT's fractions to the buyers, based on their contributions (let's say 50.2% and 49.8%): How do you prevent the buyers to get the same percentage, while one contributed more than the other? shouldn't you use the type f32 instead?
Sorry if my question is "dumb", but I'm a rust beginner.
Thanks in advance for your answer.

Kazu

@ndkazu ndkazu added the question Further information is requested label Dec 19, 2021
@vedhavyas
Copy link
Contributor

Hey @ndkazu

you are correct. u8 wont be sufficient to hold percentage decimals. We are planning to use a fixed point decimals with 10 or 18 decimal precision. we cannot use f32 since that would bring the floating point issues again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants