Defi with MetaMask Mobile

This tutorial explains how to use your Keystone & MetaMask to interact with DeFi platforms (Dapps) such as Uniswap. The same method would apply to other Dapps.

I. Preparation

1. Firmware version M-5.0 (Multi-Coin) or newer running on Keystone Essential or Pro.

2. Connect MetaMask Mobile V5.0.0 or newer with the Keystone Hardware Wallet (Tutorial).

3. Uniswap website: https://app.uniswap.org/#/swap.

Please read How to upgrade firmware for more details.

II. Swap tokens on Uniswap

1.Connect Uniswap to MetaMask Mobile

1) Run the MetaMask Mobile app and tap on the menu icon to open the [Browser].

2) Visit the Uniswap website:https://app.uniswap.org/#/swap. Select your Keystone account and tap on [Connect]. Uniswap should then be successfully connected to your MetaMask Mobile.

2. Swap ETH to another Token

1) Select a Token (e.g. USDT), set the swapping amount, then tap on [Swap], after confirming the transaction detail, tap on [Confirm Swap] to execute the swap.

2) Tap on [Confirm] to get the unsigned QR code.

3) Keystone: Tap on the “scan” icon, then scan the QR code displayed on MetaMask Mobile.

4) Confirm the transaction details on your Keystone Hardware Wallet. Tap on [Sign] and enter your password to verify. You will then receive the signed transaction data in QR code format.

5) Tap on [Get Signature] on MetaMask Mobile and scan the QR code displayed on your Keystone device. The transaction would submit automatically after the scanning is complete.

3. Swap Tokens to ETH or another Token

1) You will need to give the Uniswap protocol permission to access your UNI tokens if you’d like to use them in a transaction when swapping them to ETH or any other Token. Tap on [Allow the Uniswap protocol to use your UNI] > then tap on [Sign]

2) Tap on the “scan” icon on the top right corner of your Keystone device. Scan the QR code displayed on MetaMask Mobile with your Keystone device to sign the transaction by pressing the [sign] button after you’ve confirmed the transaction details.

3) Uniswap: Select a Token (e.g. USDT) and set the amount, then tap on [Swap]. Once you’ve confirmed the transaction details, tap on [Confirm Swap] to execute the swap.

4) Tap on [Confirm] to get the unsigned QR code.

5) Using your Keystonedevice, tap on the “scan” icon and scan the QR code displayed on MetaMask Mobile.

6) Confirm the transaction details on Keystone Hardware Wallet. Tap on [Sign] and enter the password to verify. Get the signed transaction data in QR code format.

7) Tap [Get Signature] and scan the QR code displayed on the Keystone device. The transaction should submit automatically after the scanning.

III.Add Liquidity

1. Approve

1) Switch to the “Pool” tab on Uniswap. Tap on [More] > select the [V2 Liquidity ] option in the drop-down menu > then select [Add V2 Liquidity].

2) Select the Tokens you’d like to swap from and to and your desired amount. In this case, we will be swapping ETH for UNI. Tap on [Approve UNI] to allow Uniswap access to your UNI tokens > then tap on [Approve] to get the unsigned QR code.

You can set the fee and price range yourself If you are adding liquidity to V3 liquidity.

3) On your Keystone device: Tap on the “scan” icon and scan the QR code displayed on your MetaMask Mobile app.

4) Confirm the transaction details on Keystone Hardware Wallet. Tap [Sign] and enter your password to approve the transaction. Your Keystone device will provide the signed transaction data in QR code format.

5) Tap [Get Signature] and scan the QR code displayed on the Keystone device. The transaction should submit automatically after the scanning is complete.

2. Supply

1) Tap [Supply] when the approval is completed. Once you’ve finished confirming the transaction details, then tap on [Confirm Supply] to add your liquidity to the Uniswap pool.

2) Tap [confirm] to get the unsigned QR code.

3) On your Keystone device: Tap on the “scan” icon and scan the QR code displayed on your MetaMask Mobile app.

4) Confirm the transaction details on Keystone Hardware Wallet. Tap [Sign] and enter your password to approve the transaction. You will then receive the signed transaction data in QR code format.

5) Tap on [Get Signature] and scan the QR code displayed on the Keystone device. The transaction would submit automatically after the scanning.

IV. Remove Liquidity

1. Approve

1) Switch to the “Pool” tab on Uniswap. Then tap on [More] > and select the [V2 Liquidity] option.

2) Tap on [Manage]>then tap on [Remove] to select the amount you’d like to remove from the liquidity pool. In this guide, we will be removing all of our funds so 100% is set.

3) Tap on [Approve], then tap on [Sign] to get the unsigned QR code.

4) On your Keystone device: Tap the “scan” icon and scan the QR code displayed on your MetaMask Mobile app.

5) Confirm the transaction details on Keystone Hardware Wallet. Tap [Sign] and enter the password to approve the transaction. You will then receive the signed transaction data in QR code format.

6) Tap [Get Signature] and scan the QR code displayed on the Keystone device. Then the V2 liquidity token will be allowed to be removed after the signing has been executed.

7) Tap [Remove] after you’ve confirmed the transaction details, then tap on [Confirm].

8) Tap on [Confirm] to get the unsigned QR code.

9) On your Keystone device: Tap the “scan” icon and scan the QR code displayed on your MetaMask Mobile app.

10) Confirm the transaction details on Keystone Hardware Wallet. Tap on [Sign] and enter the password to approve the transaction. You will then receive the signed transaction data in QR code format.

11) Tap [Get Signature] and scan the QR code displayed on the Keystone device. The transaction will be automatically submitted once the scanning is complete.

Last updated