Connect the Metamask Wallet to a DEX Like PancakeSwap(Part5)
DEX: decentralized exchange.
It is a peer-to-peer market where transactions occur directly between cryptocurrency traders.
DEXs fulfill one of the main possibilities of cryptocurrencies: encourage financial transactions that are not officiated by banks, brokers, payment processors or any other type of intermediary.
The most popular DEXs, such as Uniswap and Sushiswap, use the Ethereum blockchain, and are part of the growing set of decentralized finance tools (DeFi).
PancakeSwap works with Binance Smart Chain, allowing users to directly exchange their BEP-20 tokens and DApps.
DEX on testnets:
In the search for an exchange, we went through many blockchain testnet and the only one available is Pancakeswap.
Step 1:
Open the MM wallet with the account with BNB available, from account 0x404064612ce52023510FF296A8dcbBf4A93D3C48.
Check the balances in the BSC testnet browser.
Step 2: On the PancakeSwap testnet website and note that it has three functions:
Swap: Exchange BNB and BEP30 tokens, for this the account must have a balance.
Liquidity: Add liquidity in pairs of crypto currencies and in return receive the LP tokens.
Bridge: These are bridges that allow you to exchange cryptocurrencies from different blockchains (Ethereum and BSC, etc.).
Click on connect.
Step 3:
The list of wallets that this DEX accepts is displayed, I select Metamask.
It then connects to the account that holds the funds.
Step 4: Start a trade:
In “From” you must indicate the cryptocurrency and amount to exchange.
The balance indicates the amount of available liquidity.
In “To” select for which currency.
The list of cryptocurrencies available in the DEX and their respective balance, of ETH = 0.2182 and zero DAI (there is no liquidity).
Step 5: Amounts to exchange:
Placing 0.2 BNB the DEX will give me 0.060556 ETH. Click Swap and then ask to confirm the swap.
Note that this exchange operation will increase the price of ETH by 20% and a cost or fee of 0.0007992 for liquidity providers.
Step 6: The DEX processes the transaction with the Metamask wallet, click confirm, the wallet sends the confirmation message and the exchange ends.
Step 7:
Check the balances in the BSC testnet explorer.
Add the ETH token to the wallet, as seen in topic three of this article series.
Clicking on the Token box (first image above), and then clicking on Ethereum Token will display the contract and copy address to list the Ethereum token in your wallet.
Step 8: Finally, we have the ETH token balance 0.06056 and the BNB balance at 0.3995.