Questions tagged [decimals]

The tag has no usage guidance.

6 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
2answers
471 views

How can I multiply a fixed decimal var by a uint in solidity?

In base to this example: Dealing with multiplying fractions in solidity I am adding th DSMath correctly. I can operate and compile with integers but if I try to compile a contract with any decimal ...
1
vote
1answer
17 views

ERC-20 interface decimal issue

i have created erc20 token with 100000 supply and decimal with 0. i wonder that if i ask an exchange to list my token. Are these decimal is problem? regards
0
votes
0answers
16 views

How to choose number of decimal places for token

What should I consider when choosing the number of decimal places for an ERC20 token/stablecoin? My first thought was to just use 18 which seems to be the standard because Ether uses 18. However ...
0
votes
0answers
18 views

Vyper uint256 division with decimal precision

I am aware of this question here and the answer is correct however I am struggling to understand how to actually divide uint256 values with an arbitrary decimal precision Here is the function I am ...
0
votes
1answer
97 views

I'm confused about decimals and total Supply with my erc20 token

I created erc20 token. I want total supply of 50,00,000. And I want to give 7% tax on every transaction. So if anyone sends single coin then, how can I get 7% and transfer remaining to receiver? For ...
0
votes
0answers
217 views

Division and floor rounding with 18 decimals

I am recreating a UNISWAP-like AMM and have encountered problems anytime I want to divide the balances of tokens in my pool. For example: I want to require() that tokens are deposited in the correct ...