multichain, anyswap, blockchain, bridge, research,

Multichain Bridge Research

Stefan Liu Stefan Liu Follow Apr 24, 2022 · 3 mins read
Multichain Bridge Research
Share this

Recently, I did some researches on some existing popular cross chain bridges, here to dump them on the blog with three pages, for Celer Bridge, Connext, MultiChain respectively.

Here’s the original doc for MultiChain:

MultiChain Research

April.2022 / stefan liu

Multichain is the ultimate Router for web3. It is an infrastructure developed for arbitrary cross-chain interactions.

Services

Bridge:  An asset is locked up in a MPC smart contract on the source chain and then a corresponding wrapped asset is minted on the target chain. This was the first crosschain service developed back in July 2020, which we call V2

Router: Multichain router V3 beta mainnet, allow assets transfers between any two or more chains. can work with pre-existing assets on blockchains, by using liquidity pools for those assets.

AnyCall: With the anyCall smart contract function, projects can now make cross-chain contract calls, all with the security of Multichain's MPC network.

NFT: ERC721 and ERC1155

TSS

The solution is to use Threshold Signature Schemes (TSS), splitting the key up. From n possible signatories, a minimum of any t (n/2+1≤ t ≤ n) signatories can sign a transaction. Only at least t colluding players can forge the signature

https://uploads-ssl.webflow.com/5cbf7269aa4c8ec895500d90/5cd19874373c9579f4d9b6ee_DCRM%20Yellow%20Paper.pdf

SMPC

Secure Multi Party Computation (SMPC) Multichain network of nodes, which implements with the  TSS Distributed Key Generation algorithm. Each node in a set, selected from the network, works independently from the others to generate part of the private key responsible for signing transactions. They collectively sign transactions, but crucially they cannot individually do so and the key is not reconstructed when signing. The complete key is never assembled and so it cannot be intercepted, nodes are run by different organisations, institutions and individuals, which independently run Multichain's protocol

Flow

Contract

Router

https://etherscan.io/address/0xBa8Da9dcF11B50B03fd5284f164Ef5cdEF910705#code        anySwapIn

anySwapInUnderlying

anySwapInAuto

anySwapOut

anySwapOutNative

anySwapOutUnderlying

depositNative

withdrawNative

Bridge

        ERC20/AnyswapV6ERC20

AnyCall

AnyCall is a generic cross-chain message protocol which allows cross-chain send message and contract calling from chain A to chain B. anyCall is secured by the Multichain SMPC network which are used to secure billions of assets.

AnyCallProxy https://github.com/anyswap/anyswap-v1-core/blob/master/contracts/AnyswapV4CallProxy.sol

function anyCall(address _to, bytes calldata _data, address _fallback, uint256 _toChainID)

function anyExec(address _from, address _to, bytes calldata _data, address _fallback, uint256 _fromChainID)

Bridge

https://github.com/anyswap/CrossChain-Bridge

Router

https://github.com/anyswap/CrossChain-Router

https://github.com/anyswap/CrossChain-Router/blob/7b8fc2d80b5beb0ded1e2b180619524b043cd5df/worker/swap.go#L241

MPC Node

https://github.com/anyswap/Anyswap-MPCNode

Fee

https://medium.com/multichainorg/anyswap-fees-explained-bceddf535b83

Bridge:

        0.1%, min, max

Router v3:

          To none-ETH chains: $0.9 per transaction;

To ETH: 0.1% per transaction; minimum fees $80; maximum fees $1000.




 

 

PV
Stefan Liu
Written by Stefan Liu Follow
Coding with ideas