DeFi using Acala and Laminar

Acala

git clone git@github.com:<YOUR_GITHUB_USERNAME/Acala.git
git remote add upstream https://github.com/AcalaNetwork/Acala
cd Acala
git pull --rebase upstream master
git submodule update --init --recursive
docker build --tag acala:latest .
docker images
docker run --detach --name acala-latest acala:latest
docker ps -a
docker exec -it acala-latest bash
/usr/local/bin/acala --dev --execution=native -lruntime=debug
Acala Mandala Testnet Node terminal logs
Polkadot.js Accounts (Acala Mandala Testnet)
  • Accounts (Ethereum-based): Ethereum accounts may also be imported using MetaMask browser extension. Switch MetaMask to Kovan testnet. Load an account that has a Kovan Ether balance.
MetaMask Browser Extension connected to Kovan Testnet
  • Tokens (Substrate-based): Request ACA (to pay for fees) tokens for an account by running !drip <MY_ACCOUNT_ADDRESS> in the #acala-faucet channel in the Polkadot DeFI on Discord group https://discord.gg/Z4JtEmM
  • Tokens (Ethereum-based): Obtain Kovan Testnet ETH from a faucet https://faucet.kovan.network/. Obtain Kovan Testnet Compound’s DAI ERC-20 tokens from https://app.compound.finance/ in the DAI deposit section by enabling Kovan Testnet ETH as collateral, borrowing DAI using that collateral, and then swapping them using Acala Network or Laminar (for Flow Network F___ tokens). Note: This functionality is incomplete.
Borrowing DAI in exchange for ETH using Compound Finance
  • Wallet (Cross-Chain/Mint renBTC) https://apps.acala.network/wallet: Acala tab: Used to view balances, transfer tokens between accounts, air dropped tokens (ACA, KAR), and view cross-chain transaction history. Account, transaction, and Acala Mandala Testnet chain details may also be viewed using Subscan https://acala-testnet.subscan.io.
  • Wallet > Cross-Chain tab > [aUSD sub-tab] Used to transfer Acala’s stablecoin aUSD from the Acala Mandala Testnet chain to other chains on the Polkadot Network (e.g. LaminarChain). Click “Transfer” button calls and runs the logic of the transfer extrinsic of Acala’s Currencies runtime module, which is part of the ORML (Open Runtime Module Library) https://github.com/open-web3-stack/open-runtime-module-library/blob/c41cfebacc1342ae2e401f85affe48f65708da50/currencies/src/lib.rs#L148, which is a submodule of the Acala repository. Go to the Laminar Flow Exchange https://flow.laminar.one/dashboard, which is connected to the separate LaminarChain, connect the same account from Polkadot.js Extension, and verify that your account on the LaminarChain has the amount of aUSD (ACA Dollar) stablecoin that you transferred from the Acala Mandala Testnet chain.
Cross-Chain > aUSD
  • Wallet > Cross-Chain tab > [renBTC sub-tab] Used to mint renBTC (type of Bitcoin provided by Ren) using your XBTC (type of Bitcoin provided by the ChainX protocol) that may then be used as collateral on the Acala Network. It may be necessary to first Swap some tokens in exchange for XBTC using https://apps.acala.network/swap (e.g. aUSD to XBTC).
Cross-Chain > renBTC
Loans
Swap tokens
Staking DOTs

Laminar

Balances
  • Margin Trading https://flow.laminar.one/margin: Used for opening/closing margin trading positions on Contract for Differences (CFD) symbol pairs (e.g. ETHUSD) using a Liquidity Pool of a Liquidity Provider (e.g. Laminar).
Margin Trading Pools
  • Margin Trading > Basic: Click “Fast Buy/Sell” to quickly Buy/Sell a leveraged (x2 — x20) position on a symbol pair.
Margin Trading (Basic)
  • Margin Trading > Detailed: Alternatively click anywhere else on the row of a symbol pair to open a Trading View (e.g. https://flow.laminar.one/margin/0/AUDUSD) that displays a Price Chart, System Risk Parameters, Position/Order History, and Buy/Sell section.
Margin Trading (Detailed)
Synthetic Asset Exchange (Swap)
Liquidity Providers of Liquidity Pools

Acala Mandala Address: 5DHcRs9udMCKtEmJEABY2HpECyTHHxgLL85pFFzN72SatAoQ

References

--

--

--

Dev Reincarnate.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Should you attend a coding boot camp?

Android on Chrome OS — Implementing Drag & Drop

CSS Animated underline / highlight hover effect

INVARCH WEEKLY UPDATES 05/11/2021

Use your Raspberry Pi as a Docker server with docker-machine

Clean (PHP) Code

Peritus.ai - The Knowledge Network

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
Luke Schoen

Luke Schoen

Dev Reincarnate.

More from Medium

Alnair Finance: the first Yield Optimizer Platform in Astar Network

Lanuna Finance Article

OnFinality Provides Hosting and API Services to OAK Network

Comparative Slippage on Moonbeam dexes, 6/13/2022