Should we allow ERC20 tokens with 0 decimal value? #116
Closed
smol-ninja
started this conversation in
General
Replies: 2 comments 1 reply
-
@andreivladbrg do you see any problem with 0 decimal? Should we go ahead and remove 0 decimal check? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Issue created: #144 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Original discussed between @smol-ninja and @andreivladbrg on Slack.
In
create
function, there is a check that revert if asset has 0 decimal:flow/src/SablierV2OpenEnded.sol
Lines 487 to 490 in b5f70b6
Decimal value plays a key role in normalising the amounts into 18 decimal format.
flow/src/SablierV2OpenEnded.sol
Lines 312 to 322 in b5f70b6
However, since the decimal value is not used in the denominator, it does not seem to create any calculation issues. I think that we should allow 0 decimal tokens, regardless of their demand, because fundamentally they are no different than any other ERC20 token.
Would love to hear your opinion @sablier-labs/engineers.
Beta Was this translation helpful? Give feedback.
All reactions