Accessing DeFi via WalletConnect


WalletConnect is an open source protocol for connecting decentralised applications to mobile wallets with QR code scanning or via a WalletConnect URI. It makes it simple for users to connect a Levain Wallet to a dApp, and to sign transactions and messages using their Levain Wallet, and is an alternative to using a browser extension like MetaMask.

WalletConnect v1.0 has been deprecated, and is no longer supported by Levain. Please ensure that your dApp supports WalletConnect v2.0.

Levain supports WalletConnect v2.0 and is compatible with all dApps that support WalletConnect v2.0, along with EIP-1271 compatible dApps.

About EIP-1271

EIP-1271 Standard Signature Validation Procedure for Contracts is a standard for smart contracts to validate signatures. It is used by dApps to verify that a user has signed a message or transaction using a contract-based wallet. EIP-1271 must be supported by both the wallet provider and the dApp.

Levain, as a wallet provider, supports EIP-1271. You may be able to find a list of dApps that support EIP-1271 here.

Connecting a Levain Wallet to a dApp

To connect a Levain Wallet to a dApp, you will first need to go to a dApp that supports WalletConnect v2.0. You can find a list of dApps that support WalletConnect v2.0 here.

dApp with WalletConnect support

Once you have selected a dApp, you will need to select the WalletConnect option to connect your Levain Wallet to the dApp. You will then be prompted by the dApp with a WalletConnect QR code. Copy the QR code contents, found beside the Connect your wallet title. An example is provided in the screenshot below.

dApp's WalletConnect URI modal

Go back to the selected Levain Wallet's WalletConnect tab and paste it into the textbox.

Levain Wallet's WalletConnect tab

Confirm the connection on the selected Levain Wallet, and you will be connected to the dApp.

Confirm the connection

You can now initiate transactions from connected dApps. For example, you can initiate a swap on Uniswap.

Initiating a swap on dApp

You will then be able to receive transactions initiated from the dApp, and sign transactions and messages using your Levain Wallet within the WalletConnect tab. Transactions will be sent to the wallet's approval quorum as per normal.

Sending the dApp-initiated transaction to the wallet's approval quorum

And that's it! You will be able to leverage Levain's policy engine and transaction workflow.