MES Protocol
Linea DeFi Week Tutorial MES Protocol is a cross-rollup orderbook DEX, you can learn more about it here. This guide would walk you through how to complete the tasks.
Before you begin, make sure your wallet is:
Tasks​
- Deposit any asset on Linea testnet
- Place and close an order at Spot Trading or MES Convert page
- Withdraw asset on Linea testnet
Switch to Linea Testnet​
Navigate to MES Protocol app
Switch to Testnet
Connect wallet
Select Linea Testnet and confirm to switch to Linea at your wallet
Deposit​
Click on “Deposit/Withdraw Tokens” and you will be navigated to the Portfolio page
Click on the "Deposit" button at the row of token you want to deposit
Input the amount of token you want to deposit and proceed to the next step
Approve a spending limit if it is your first time interacting with our contract. Select a suitable spending limit that you are comfortable with. If you have no idea what spending limit to set, just simply use the default setting
The Metamask window will pop up again, you can double check the amount and adjust the gas fee if needed; confirm this transaction if everything is fine, a few seconds later you’ll be able to see your token balance updated
Place an Order (Spot Trading)​
Tap and choose the cryptocurrency pairs you want to trade.
Choose to trade in “Single Chain Mode” or “Cross-rollup Mode”, this is what differentiates MES from other DEXs.
In Single Chain Mode - your order placed is matched and settled with other orders on Linea (your currently connected chain) only.
In Cross-Rollup Mode, your order could match and settle with orders on any chains supported by MES. You enjoy deeper liquidity in this mode, but you may need to bridge the assets when you withdraw.
- Choose the order direction to buy or sell the token
- Choose to place a Market Order or Limit Order
- Fill in the Limit Price (applicable to Limit Orders only) and the quantity, then place the order.
Place an Order (MES Convert)​
Navigate to MES Convert page by selecting “MES Convert” under “Trade”
Select order type - Market Order or Limit Order
Select the source chain and token, and the destination chain and token (Linea would be the source and destination chains in this event)
Fill in the amount to send
Click “Preview Conversion”
The conversion rate is displayed, it is for reference only and the actual settlement rate is subject to the price movement. You can adjust the conversion rate here if you are placing a Limit Order. Click "Submit" if you confirm the details of your trade
Withdraw Linea Balance Only​
Same as deposit, navigate to the trading page and click on “Deposit/Withdraw Tokens”
Click on the "Withdraw" button at the row of token you want to withdraw
Choose a withdrawal mode - “Withdraw Linea Balance Only” allows you to withdraw assets on Linea only, or “Withdraw Cross-chain Balance” that aggregates your assets into Linea then and withdraw.
Single Chain Withdrawal - input the withdrawal amount and proceed to withdraw
Sign the message on your wallet to confirm the withdrawal
Click on “Go to Transfer Records” at the prompt message
Claim token to your wallet at “Pending Transfer” page
Withdraw Cross-chain Balance​
Select Linea as the destination chain
You are then navigated to “MES Convert” page to bridge your selected asset to Linea
After you have aggregated your assets to Linea, you can follow Step 4 above to withdraw the assets under Single Chain Withdrawal Mode.