Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Bi-directional Native to Meta Asset "Trustless" Bridging #96

@fuxingloh

Description

@fuxingloh

What would you like to be added:

Bi-directional bridging of assets between Native & Meta Chain. Essentially a trustless bridge between the 2 chain within the same ecosystem. This requires understanding of the current trustless bridging design that earmark to be documented in #8.

Introduction of 2 Smart Contract (DfTX & EVM Contract). All supply of DFI comes from the Native Chain. Burning on Native = minting on Meta and vice-versa.

This requires the relevant Transactions to be performed and exchanged between chains. The transaction must be interpolated from 2 chains.

  • Native DfTx.Meta.send(pubKey, AccountDFI.Amount), burn from Account, claim on EVM
  • Meta Contract.send(pubKey, EVMNativeDFI.Amount), burn from Contract, claim on Native Account

Implementation on Native DMCHandler() and Meta Connect/Mint Handler

RPC Methods in #89 and related to #94

  • The proposed use of a global counter on both Native and Meta to track balance movement to set governance limits.

RPC metaConsensusRpc_mintBlock and handled on Native DMCHandler():

Extract "DfTx.Meta.send" on Native and pass it as structured request params when minting block on MetaChain. MetaChain will automatically include "minting" transaction crediting to the respective address.

RPC metaConsensusRpc_connectBlock and handled on Native DMCHandler():

Extract "Meta Contract.send" on Meta and return it as a structured response for DMCHandler() to process "bridging claims" on the Native layer via DMCHandler(). Burn Meta > Mint Native.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ainissues/pr that requires changes on the DeFiCh/ain codebase.area/metakind/featureNew feature requestmeta/consensusneeds/triageWaiting for triage to be accepted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions