INTERNAL TRANSFER OF BALANCES
This guide will teach you how to transfer your funds from our "substrate" side to our Ethereum-Virtual-Machine (EVM). Remember, the EVM side of our chain allows you to interact with many eth-based smart contracts and projects that eventually will move to Kusari. Moreover, our cross-chain bridges will be attached to our EVM module, so for you to utilize cross-chain trades, you must use the EVM.
That said, let me tell you how we tackle this. First, I will walk you through the process to get started right away. Second, I will elaborate a bit more on the concept so that the interested lads can read up.
PART 1 - WALKTHROUGH
The transfer is done in four (4) steps:
- Origin and Destination Address
STEP 01 - Setup
Make sure you have selected the "Transfers" function of our DApp (see picture below)
You can change the transfer direction with the center button. Confirm the direction by clicking on next
Click on "Connect SwapDex Account" to connect your substrate wallet to the DApp. This substrate address needs to hold the funds you wish to transfer. If you use the polkadot.js browser extension to manage your addresses, the DApp will offer you a dropdown menu.
Click next once you have selected your address. If you have trouble seeing the dropdown menu, please reload the page or close your browser and restart the process.
STEP 02 - Origin and Destination Address
In this step, you can choose to either connect to your MetaMask wallet and automatically fetch the correct address, or you can paste any eth-based address.
Once you have selected a target address, you can confirm by clicking next. You need to confirm the selected accounts and click on "Ok".
STEP 03 - Amount
In this step, you need to select the amount you want to transfer and confirm by clicking on the "Transfer Amount" button.
It is generally advised to test a transaction with a small amount, especially if you are not familiar with the transfer function so far. The correct transfer of funds is your sole responsibility! No refunds are possible.
STEP 04 - Confirmation
Confirm the transfer by hitting the "Sign and Send" button.
Sign with your substrate account.
If everything went fine, you are going to see a success message at the button of the page
Now head over to the substrate explorer to check if the DApp successfully wrote the transfer into a block
Congrats, you successfully swapped KSI from the substrate to the EVM side. Feel free to reverse the swap and use the transfer function to your needs.
PART 2 - WHAT HAPPENS IN THE BACKGROUND
Many may ask themselves whether kusari is a single chain when it has both an ethereum and substrate side at the same time? Well, to make a long story short... Kusari is one single chain BUT it runs an ethereum simulation in parallel.
How does this work?
To answer this question, we need to look at the node architecture. Nodes are the pillars of our distributed network, and they run all the necessary code.
I want to direct your focus to the SUBSTRATE RUNTIME module of the Substrate Node. The Runtime hosts all the code that makes Kusari unique, and it's composed of code pallets. As you can see, the democracy function of our chain is also a code pallet and allows our community to govern the chain. Likewise, the staking pallet enables our community to run validators and stake as nominators. Like those pallets, the EVM is another pallet that allows our community to interact with eth-based smart contracts and cross-chain bridges.
By performing the transfer described in step 01, we are transferring coins from the SUBSTRATE RUNTIME ENVIRONMENT into the EVM pallet and vice versa, that's it :D. As briefly touched on earlier, the EVM side opens up many new opportunities for you to utilize your KSI coins.
Written by Masterdubs & Petar