Closed kerber0x closed 4 months ago
If we want to store asset decimals in another contract we can use the https://github.com/0xFable/cw-registry contract and have it store Assets -> AssetDecimals
Alternatively we can enable a user to place the decimals in the pair creation message. This has user error problems but it is isolated to the pair itself, i think this option is best Setting the Native token decimals permissionlessly is not secure
Great idea, let's allow the user to pass the decimals itself on create_pair.
For the stableswap, it is needed to know the decimal places of the tokens.
Factory tokens can register metadata, in which case you could extract it from there. Otherwise, you can't.
Native tokens on the other hand, could or could not have metadata attached to it. If so, the DenomMetadata returns an error.
Alternatively, one could have a contract registering all the decimals, but then it needs to be gated. Perhaps a dao could own that? the migaloo gov address so people would vote for it on chain? But if so, how to do in other chains? 😓