Electric Testnet Walkthrough
A Step-by-Step guide on Margin Trading for Electric Testnet on Polygon Mumbai Testnet
Electric Smart Contracts have been deployed on the Mumbai Testnet on Polygon Network. The following screenshots have been taken from Electric’s Alpha release UI on the Polygon Testnet. The process to open and close a margin trade has been explained screen-by-screen.
The protocol is currently connected to the QuickSwap Testnet, but eventually the idea is that this is going to get connected with DEXs / AMMs on Polygon, Binance Smart Chain, Ethereum to start with and gradually expand to other networks.
Please Go to the EasyFi App for the Electric Testnet: https://app.easyfi.network/
There are two Tabs on this screen:
- Pools — The various asset pools available on Electric to conduct a margin trade
- My Positions — All your current closed or open margin positions will be reflected there with real-time calculation of your Margin trades and the effective P&L based on current asset price on the DEX.
Please note: We are connected to QuickSwapDEX Testnet and hence the prices will not be fluctuating too much. You will also need to learn about the xUSDC asset — you can obtain it using the Faucet Link provided on the screen.
#1: Connecting Your Wallet to Electric Testnet
Connect your Metamask wallet to the Electric App. Ensure that you are on Mumbai Testnet.
Learn how to add Mumbai Testnet RPC Network to your Metamask wallet here: https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask/
You will be starting on the Pools page.
#2: Adding xUSDC from Faucet
The Testnet version of Electric has one asset to test on called xUSDC. Click on “Faucet” shown on the top right of the Pool page.
On clicking the Faucet link, you will be asked for adding your Mumbai Testnet Wallet Address. Paste your wallet address in the space provided and “Send Request”.
Please note: These tokens have no value on any blockchain mainnet and are minted only for testing and experience purposes.
On successful transfer of xUSDC tokens you will be able to see it in the Wallet. You will be sent 100 xUSDC tokens to start your Margin Trades on Electric Testnet.
Click on the Import Tokens on Metamask and Add the xUSDC contract on Polygon Mumbai Testnet: 0x5D61549Df3eD548227F797208A0aE01453b4666d.
Once this part is through you are ready to begin testing the Margin trading process on Electric Testnet.
#3: Supplying Assets to the Liquidity Pool
To get started on Electric, the user needs to “Deposit” an asset as collateral to the pool of assets shown here — in this case its xUSDC of course.
This is when the user will be asked to deposit collateral to the pool shown. This is the screen where the user may seek leverage between 2x to 5x for the deposit. In this case we have selected the highest leverage i.e., 5x.
So, on a deposit of 10 xUSDC the 5x Leverage is ~ 40 xUSDC
On clicking Deposit the process of blockchain based approval and confirmation will be done.
#4: Opening new margin positions & a Trade
Once the asset is deposited in the pool, the Margin and Trade options will be activated for the user. You can open multiple Margin Positions for different trades using xUSDC.
Click on Trade on the above screen. It leads to the screen below (Figure 11) that will create the pair that you intend to trade on QuickSwapDEX (Testnet).
Select the Input token and the Output Token to create the margin trading pair.
Enter the Input token amount — here xUSDC — to receive the amount of xETH as output tokens as shown in Figure 12.
Click on Trade and Confirm the transaction on the blockchain.
#5: Checking Your Trade Positions
We move to the next tab on the screen that displays all the trade postions currently live and closed by the user. This page allows you to close any position you have based on your plan for Profits / loss strategy.
#6: Closing your Position
On Clicking the Close Position Button, the system calculates your Profit & Loss (P & L) and the Value of the profit or loss in USD.
#7: Verifying Transactions on Polygon Mumbai Testnet
You can check & verify the above transactions on Mumbai Testnet for Creating Position & Closing Position.
About EasyFi Electric
Electric is a decentralized, permissionless, scalable, secure, leverage trading platform, from EasyFi, that enables traders to take out short-term loans to trade margin positions from publicly sourced liquidity from different AMMs / decentralized exchanges.
Litepaper: https://bit.ly/EasyFi-Electric-Litepaper
About EasyFi
EasyFi Network is a universal layer-2 multi-chain money market protocol for digital assets with focus on liquidity sourcing & capital efficiency for structured lending in a non-custodial manner. The Protocol is currently live on Polygon, Binance Smart Chain and Ethereum.
Website | Twitter | Telegram | Whitepaper | Blog | App
…
To learn more about $EZ and EasyFi, please go through our whitepaper and other articles on this publication. Stay tuned for more news & updates on our Telegram channel and join the official group. You can also follow us on Twitter.