zeta-chain / node

ZetaChain’s blockchain node and an observer validator client
https://zetachain.com
MIT License
163 stars 104 forks source link

ZRC20 Liquidity Caps should have a default value #2521

Closed CharlieMc0 closed 4 days ago

CharlieMc0 commented 1 month ago

Is your feature request related to a problem? Please describe. When a new ZRC20 asset is created it's automatically given an unlimited liquidity cap.

Describe the solution you'd like It should start with a default value like 1000

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Motivation and Context We have to scramble to add a cap after the ZRC20 asset is created because a cap can't be set ahead of time. We should instead default to a capped value with the option to remove a cap later.

lumtis commented 2 weeks ago

We can maybe check into setting something depending on the decimal numbers set for the token.

Would still not be fully accurate as price vary a lot between tokens but would still be more effective than using an absolute value.

Example: 1M unit. If decimal=18, cap = 1000000*1e18