INTERNAL TRANSFER OF BALANCES
This guide will teach you how to send 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 SwapDEX. 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:
- Choose an account to send the SDX from
- Choose an account that will receive the SDX
- Specify amount
STEP 01 - Choose an account to send the SDX from
Make sure you have selected the "Wallets" function of our DApp (see picture below)
In the wallet list find the wallet to send from and click the button
send on the right side. This account needs to hold the funds you wish to transfer.
STEP 02 - Choose an account that will receive the SDX
Send To Account field and select an account you want to transfer the funds to from the dropdown menu.
STEP 03 - Specify amount
Set the amount of SDX you want to send in the
Do not use
MAX button to send all your funds. A small amount of SDX is needed to pay the gas fees
STEP 04 - Confirmation
Make Transfer button and double check the
Sending From Account and
Amount values are correct.
It is generally advised to test a transaction with a small amount, especially if you are not familiar with the wallets so far. The correct transfer of funds is your sole responsibility! No refunds are possible.
Confirm the transfer by hitting the
Sign and Submit 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 SDX from the substrate to the EVM side. Feel free to reverse the swap and use the wallets function to your needs.
PART 2 - WHAT HAPPENS IN THE BACKGROUND
Many may ask themselves whether SwapDEX is a single chain when it has both an ethereum and substrate side at the same time? Well, to make a long story short... SwapDEX 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 SwapDEX 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 SDX coins.
Written by Masterdubs & Petar