Is your feature request related to a problem? Please describe.
Currently ZRC20 represents an existing asset (native token or ERC20) from an external chains. The asset is whitelisted and can be deposited/withdrawed from/to the same connected chain.
This idea is about allow minted "ZetaChain Native" ZRC20. The ZRC20 is minted on ZetaChain and can be withdrawn to any connected EVM chains (eventually on non-EVM chains that support fungible token)
A stateful precompiled allows to create a new ZRC20. It would interact with the fungible module to create the new asset in the ZetaChain store.
Condition for creation TBD.
Totally permissionless (might involve risk if we interact with the store)
Can require approval from group/gov prop
Other condition: locking/staking a portion of ZETA tokens to mint a new ZRC20 -> hence adding zeta-utility flag
TBD:
Reusing the ForeignCoin object (might want to rename it)
Create a new object to represent these assets, this might make more sense sense we wil have to store somewhere the value locked to be minted on any connected chain.
External chain
ERC20Custody is used to store reserve of existing ERC20Custody.
This feature would require a new contract (asset handler) to address minting/burning the tokens.
We can call it ZRC20Connector, this allows to keep consistency with the ZetaConnector contract, implying connector contract are used to connect with ZetaChain native tokens.
Protocol
The ZetaClient will have to sign transaction into the ZRC20Connector above to handle outbounds.
Is your feature request related to a problem? Please describe.
Currently ZRC20 represents an existing asset (native token or ERC20) from an external chains. The asset is whitelisted and can be deposited/withdrawed from/to the same connected chain.
This idea is about allow minted "ZetaChain Native" ZRC20. The ZRC20 is minted on ZetaChain and can be withdrawn to any connected EVM chains (eventually on non-EVM chains that support fungible token)
Describe the solution you'd like
Creation
Best way to create a new ZRC20 would be to do it directly at the EVM level. This would requires at least precompiled: https://github.com/zeta-chain/node/issues/2403
A stateful precompiled allows to create a new ZRC20. It would interact with the fungible module to create the new asset in the ZetaChain store.
Condition for creation TBD.
TBD:
External chain
ERC20Custody is used to store reserve of existing ERC20Custody.
This feature would require a new contract (asset handler) to address minting/burning the tokens.
We can call it
ZRC20Connector
, this allows to keep consistency with the ZetaConnector contract, implying connector contract are used to connect with ZetaChain native tokens.Protocol
The ZetaClient will have to sign transaction into the ZRC20Connector above to handle outbounds.