Skip to content

Instantly share code, notes, and snippets.

@Dobrokhvalov
Last active January 22, 2019 10:44
Show Gist options
  • Save Dobrokhvalov/00e2bbca13a1378636fa5a400bd692f5 to your computer and use it in GitHub Desktop.
Save Dobrokhvalov/00e2bbca13a1378636fa5a400bd692f5 to your computer and use it in GitHub Desktop.
InviteLink module for ERC-1077

Invite Scheme explained

InviteScheme

  1. Alice generates random transit key pair and signs transit public key with her device's private key
  2. Alice sends transit private key and transit signature to Bob
  3. Clicking the link, Bob is directed to a webpage
  4. Bob generates his own private key stored in the browser and uses the transit private key to sign his new address
  5. Bob’s browser sends his two signatures to the relayer
  6. The Relayer calls Alice’s identity contract
  7. Then Alice’s identity contract creates an identity contract for Bob (if Bob didn't have Identity contract before)
  8. Tokens are transfered from Alice's contract to Bob's new contract
  9. Bob now got the tokens, and in addition has a Universal Login Contract and ENS name. The private key generated in p.4 is attached to Bobs Identity Contract

Bonus: In addition, Bob can now also help Alice recover access to her identity contract in the future using a social key recovery mechanism

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment