Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow all ZRC20 to be withdrawable on any chain #2741

Open
lumtis opened this issue Aug 19, 2024 · 1 comment
Open

Allow all ZRC20 to be withdrawable on any chain #2741

lumtis opened this issue Aug 19, 2024 · 1 comment
Labels
feature:idea An early idea for a feature. Used as reference to follow new feature integrations feature:smart-contracts Related to extending smart contracts capability and interactions with ZEVM

Comments

@lumtis
Copy link
Member

lumtis commented Aug 19, 2024

Requires #2740 to be completed first

Is your feature request related to a problem? Please describe.

Foreign minted ZRC20s can currently only be withdrawn on their source chain.

This task is about to allow to withdraw and use ZRC20s on any connected chains. Example: withdrawing ZetaChain BTC on Polygon

Describe the solution you'd like

One eventually solution is simply to use #2740
For each assets, we create a sister Zeta native ZRC20 that can then be withdrawn to all chains.

But this might be confusing to developer to represent two ZRC20s then. This would however be the cleanest solution as no changes needed in the protocol.

Other solution can be to refactor and represent all ZRC20 in the same model as Zeta native ZRC20 (would require feature above to be completed to give more details on this solution)

@lumtis lumtis added feature:idea An early idea for a feature. Used as reference to follow new feature integrations feature:smart-contracts Related to extending smart contracts capability and interactions with ZEVM labels Aug 19, 2024
@fadeev
Copy link
Member

fadeev commented Sep 5, 2024

Another option is to allow a single ZRC-20 to have multiple associated foreign tokens:

{
   // ...
   {
      "zrc20_contract_address": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4",
      "asset": "",
      "foreign_chain_id": "8332",
      "decimals": 8,
      "name": "ZetaChain ZRC20 BTC-btc_mainnet",
      "symbol": "BTC.BTC",
      "coin_type": "Gas",
      "gas_limit": "254",
      "paused": false,
      "liquidity_cap": "10000000000"
    },
   {
      "zrc20_contract_address": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4",
      "asset": "0x7aD89cA23F35A50bC54dF8F217a6D25Bb75c0E41", // wrapped BTC
      "foreign_chain_id": "1",
      "decimals": 8,
      "name": "ZetaChain ZRC20 BTC-ethereum",
      "symbol": "ETHEREUM.BTC",
      "coin_type": "Gas",
      "gas_limit": "254",
      "paused": false,
      "liquidity_cap": "10000000000"
    },
}

When withdrawing a ZRC-20 you'd specify, which chain you want to withdraw to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:idea An early idea for a feature. Used as reference to follow new feature integrations feature:smart-contracts Related to extending smart contracts capability and interactions with ZEVM
Projects
None yet
Development

No branches or pull requests

2 participants