Open fuxingloh opened 2 years ago
@fuxingloh: Thanks for opening an issue, it is currently awaiting triage.
The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.
Posting @canonbrother's logic here so that it doesn't get lost:
DFC
DMCtxs = DFCtxs.map(tx.type === DMC)
DFC.call('defi_mint', [sender, DMCTxs])
DFC.lock(txs, vault)
DMC
mint(sender, DFCtxs) {
validate(sender) // must be validator
{ dest, amt } = DFCTxs
issue(amt, dest)
// let **Aura** handle all these txs in pool..
}
graph
mint([DFI are minted])
lock([DFI are locked])
burn([DFI are burned])
unlock([DFI are unlocked])
subgraph DFC
F203 --> F204 --> F205 --> F206 --> F207 --> F208
end
subgraph DMC
M1 --> M2 --> M3
end
F204 -.-> M1
mint --> M1
lock --> F204
M3 -.-> F208
burn --> M3
unlock --> F208
graph
send20P([$20:PENDING])
send20A([$20:ACTIVE])
send46P([$46:PENDING])
send46A([$46:ACTIVE])
subgraph DFC
F203 --> F204 --> F205 --> F206 --> F207 --> F208 --> F209
end
subgraph DMC
M1 --> M2 --> M3 --> M4 --> M5 --> M6
end
F204 --send $20 to DMC--> M1
send20P -.-> M1
M2 --verify block is confirmed--> F205
send20A -.-> M3
M5 --send--> F207
send46P -.-> F207
F208 --verify --> M6
send46A -.-> F209
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.
DfTx.Meta.send(pubKey, AccountDFI.Amount)
, burn from Account, claim on EVMContract.send(pubKey, EVMNativeDFI.Amount)
, burn from Contract, claim on Native AccountImplementation on Native
DMCHandler()
and MetaConnect/Mint
HandlerRPC
metaConsensusRpc_mintBlock
and handled on NativeDMCHandler()
: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 NativeDMCHandler()
:Extract "
Meta Contract.send
" on Meta and return it as a structured response forDMCHandler()
to process "bridging claims" on the Native layer viaDMCHandler()
. Burn Meta > Mint Native.