Drop support for ERC20 tokens with decimals > 18 #154
Replies: 3 comments 3 replies
-
Agree to not allow more than 18 decimals. There are some tokens with more than 18 decimals, but Flow is optimized for stablecoins, anyway. |
Beta Was this translation helpful? Give feedback.
-
Thanks Shub for opening this. I agree that there are almost no assets with more than 18 decimals, also mentioned here.
Correct. If we want to support them, we should change the current implementation to And as you said, adding this complexity is not worth it. I agree with your conclusion, we should drop the support for assets with >18 decimals. |
Beta Was this translation helpful? Give feedback.
-
Created the issue: #156 Before closing, I would appreciate your input as well @razgraf. Also, I want to mention that if, in the future, more assets with more than 18 decimals appear (tho I am skeptical), we can release a new version. For simplicity, let's not allow them in the first version. |
Beta Was this translation helpful? Give feedback.
-
A deposit of 10M ERC20 tokens with 32 decimals would fail because of
uint128
type used for amounts. So I would like to discuss the idea of dropping support for ERC20 tokens with decimal values higher than 18.In practice, there are no assets with decimals higher than 18. Even if they exist, providing support to these assets does not make sense if they cannot be deposited into the contract. So until we use
uint256
for amounts, it only adds complexity. That's why either we should drop support for those assets or useuint256
for amounts.The following table shows how much amount can be deposited with
uint128
data type.WDYT @sablier-labs/everybody?
Beta Was this translation helpful? Give feedback.
All reactions