desktop-wallet icon indicating copy to clipboard operation
desktop-wallet copied to clipboard

Ability to sign smart contracts' transactions (dApp interaction)

Open mvaivre opened this issue 4 years ago • 6 comments

The main goal of this task is to open up the wallet to dApps interaction, the first of which being our voting demo app (PoC), followed by the future swap service.

The main "basic" feature needed is a signer: a way to validate and sign smart contract transactions.

In order to do that, we first wanted to "duplicate" the desktop wallet into a new browser extension, but other solutions exist and need to be discussed. Ideally, we would like to make our Desktop Wallet the go-to solution in order to keep our ecosystem accessible.

Let's use this issue to talk about the different approaches we can follow and their respective pros and cons.

cc/ @nop33 @lf94

mvaivre avatar Nov 24 '21 14:11 mvaivre

The main goal of this task is to open up the wallet to dApps interaction

I started some research, trying to understand what the above statement means. I found out that people refer to wallets that can interact with dApps as Smart Contract Wallets or DeFi Wallets.

Mobile wallets

with dApp browser

I also noticed that some DeFi wallets (ie Metamask, Trust wallet, ...) include a "dApp browser" within the app. This browser allows the user to enter any URL. If the website the user goes to is a web dApp, the user can connect their wallet to the web app, so that the web app can have access to the funds of the wallet.

Click to see Metamask screenshots
Wallet menu dApp browser homepage Entering new URL Open tabs
signal-2022-03-01-140223_002 signal-2022-03-01-140223_008 signal-2022-03-01-140223_009 signal-2022-03-01-140223_006

without dApp browser

OTOH, other wallets (ie Argent) do not include a dApp browser and instead have dedicated interfaces to dApps the wallet can interact with.

Click to see Argent screenshots
Invest tab Eth2 staking Aave V2 Intro Aave V2 Compound
signal-2022-03-01-140223_004 signal-2022-03-01-140223_007 signal-2022-03-01-140223_003 signal-2022-03-01-140223_005 signal-2022-03-01-140223_001

Connecting web dApp with wallet

I checked the following apps and they all have a "connect wallet" button on the top right corner. These are the methods that each of these apps allow the user to connect:

Click to see screenshots
Balancer Aave Compound Curve
signal-2022-03-01-142345_005 signal-2022-03-01-142345_006 signal-2022-03-01-142345_002 signal-2022-03-01-142345_003

nop33 avatar Mar 01 '22 13:03 nop33

Thanks @nop33! Just to clarify: our "Smart Contract Wallet" (don't rly like it, too technical) or "DeFi Wallet" (don't rly like it, too restricted) - dApps enabled wallet 🙃 - will be on the desktop first. On mobile, we will start by focusing on funds management only (check your assets per addresses, send and receive transactions). Mobile dApps integration (swap, marketplace) may come once the ecosystem grow bigger.

mvaivre avatar Mar 02 '22 07:03 mvaivre

Just to mention, additionally to well integrated dapps, Argent also support WalletConnect to interact with many other not yet integrated dapps. In this case you can browse them on PC or on the same mobile and connect via WalletConnect.

polto avatar Mar 22 '22 14:03 polto

Summary of our last discussion :

  • We're going to investigate how hard it would be to implement WalletConnect. WalletConnect would be awesome, as it would allow us to keep a simple product line (desktop + mobile app), easy to understand, with a focus on security (no need to play with the mnemonic too much) and UX.

  • If the WalletConnect integration looks too complex (would take too much time to implement), we will create a new browser extension, focused on dApp interactions. This would require a specific UI, focused on signing and probably on sending / receiving funds. No advanced features to avoid usage complexity. Details TBD (need proper product design / mgmt).

mvaivre avatar Mar 24 '22 16:03 mvaivre

Update: WalletConnect integration went well and @polarker is currently working on it further.

lf94 avatar May 05 '22 21:05 lf94

I guess this task is finished, since the 🚾 integration is there. Maybe we can create other issues for 🚾 related things and archive this one?

nop33 avatar Nov 26 '22 17:11 nop33

I am closing this issue due to inactivity. I believe it has been implemented.

nop33 avatar Dec 23 '22 11:12 nop33