Multichain dapp guide, standards, and best practices

// SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
contract AnyswapCreate2Deployer {
event Deployed(address addr, uint256 salt);
function deploy(bytes memory code, uint256 salt) public {
address addr;
assembly {
addr := create2(0, add(code, 0x20), mload(code), salt)
if iszero(extcodesize(addr)) {
revert(0, 0)
}
}
emit Deployed(addr, salt);
}
}
  • Balance float
  • Mint/Burn
  • Liquidity swap (combination of balance float and mint/burn)
  • Wrapped + Mint/Burn
  • 2.1 Balance Float
  • 2.2 Mint/Burn
  • 2.3 Liquidity Swap
  • 2.4 Wrapped + Mint/Burn
  • Custodial + Centralized (Binance, Wrapped BTC)
  • Custodial + PoA (Proof of Authority)
  • Custodial + PoS (Proof of Stake) (Matic, xDAI, REN)
  • Custodial + MPC (Multi Party Computation) (Thorchain, Anyswap)
  • Non-custodial + MPC (Multichain ~ yes, I’m shilling Multichain)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store