Linkdrops: An open-source standard for invite & digital asset links on Ethereum
The path towards a superior web3 onboarding user experience
At the Status #Cryptolife Hackathon in Prague (Before Devcon 4) I got together with Mikhail from Volca.tech / Eth2.io, Bernd, Dong-ha, Dominik & Kristoffer from trustlines.network / brainbot technologies and developed the “onbotting.eth” webdapp.
Our goal was to give web3 the incredible onboarding experiences that web2 has created. Paypal reached millions of users in less than a year by sending out URL “checks” that people could claim. WeChat gamified the traditional Chinese custom of gifting red packets with cash into their app making them the largest messaging app in the world in less than a year. These solutions kick ass because they gave people quick access to what they want, which crypto currently doesn’t. Our solution solves this by letting people send crypto embedded in URLs, no wallets, no gas no BS just like Paypal.
We were honored to win the 1st price in the Social Category and the 1st price in the Universal Login category by Alex Van De Sande. An explainer video of “onbotting.eth” can be viewed here:
How does it work?
Core Assumptions
- Bob is a new user without ETH, wallet or any prior crypto knowledge
- Alice has an EIP 1077 identity contract and a spare ERC721 Robot
- Alice shares the invite link with Bob over a secure channel e.g Whatsapp
- There is an incentive in place (on a user, dapp or relay level) to pay gas
- Alice shares an invite link to Bob
- Link includes a transit private key and a signature
- Bob is a new user without ETH, wallet or any prior crypto knowledge
- Bob is directed to a webpage
- Bob generates his own private key stored in the browser
- Bob uses transit private key to sign Bob’s address
- Bob’s browser sends his two signatures to the relayer
- Relayer calls Alice’s identity contract
- Alice’s identity contract creates an identity contract for Bob and sends a Robot
- Bob is now onboarded to Ethereum and owns a robot that he can play with!
Modular implementation of linkdrops
Based on rich iterations, the implementation of the Universal Login SDK by Alex van de Sande & Marek has undergone updates towards a modular architecture since Devcon 4. Below is the current draft of a simple modular version of Invite Scheme without generating an identity contract for receiver:
The main function of the module is transferTokensByLink, which:
- Verifies 2 signatures (sender’s and receiver’s signatures)
- Checks that link wasn’t used before (by storing transitPubKey in storage)
- Transfers tokens from sender’s identity contract to receiver address
Sender’s signature verification can be done using owner.canExecute — https://gist.github.com/Dobrokhvalov/00e2bbca13a1378636fa5a400bd692f5#file-invitelink-sol-L117
And for transferring tokens, we can use owner.moduleExecute — https://gist.github.com/Dobrokhvalov/00e2bbca13a1378636fa5a400bd692f5#file-invitelink-sol-L141
Any feedback on how we can improve approve, highly appreciated!
React Native Starter Implementation
As we are actively working to implement linkdrops including invite link functionality into different mobile applications, we have developed this Universal Login React Native Starter. Feedback highly appreciated :)
Requirements
- NodeJS v10.12.0
- Yarn 1.10.1
This starter has been tested only on OS X.
Dependencies
This starter uses react-native-navigation
(v1) for navigation.rn-nodeify
package allows to use node core modules. Learn more.
Native libs for secure and fast crypto:
react-native-secure-randombytes
react-native-fast-crypto
Reducing Gas cost via Proxy delegation
In search of reducing the gas we decided research or proposed EIPs tackling this problem, with inspiration from best practices, such as Gnosis Safe, Tenzorum, Argent and feedback from Pet3rpan from the#MetaCartel. Finally Mikhail came up with an solution:
Check out the optimizations here:
Ropsten gas price before optimization etherscan
Ropsten gas price after optimization etherscan
Gasless implementation
Finally the newest enhancement in this regard is below gassless webdapp prototype, which can be considered an enhancement to the #burner wallet by Austin Griffith. We hope to a demo of the wallet soon and learn about you feedback, the live version can be played with here.
✨ Cryptoxmas.xyz ✨ a charity reference implementation of linkdrops
Send Christmas NFT cards & support Venezuelans in need
As an Christmas Charity application of linkdrops, We have set up this Giveth campaign to support airdropvenezuela.org & bitcoinvenezuela.com
Video of how it works:
https://twitter.com/dobrokhvalov/status/1071440314169208834