Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App-specific records #160

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

jefflau
Copy link
Member

@jefflau jefflau commented Aug 28, 2023

WIP.

Things that need to be thought about:

  • What is the best way to generate unique keys?
  • What's the best use case for this?
  • What's the best way to discover app-specific keys - or does it not matter if only the apps use it?

@jefflau jefflau force-pushed the app-specific-address-resolution branch from 475b076 to 4a3e17e Compare August 28, 2023 09:28
@jefflau jefflau force-pushed the app-specific-address-resolution branch from 4a3e17e to 7ed318d Compare August 28, 2023 09:35
@jefflau jefflau changed the title App-specific address resolution App-specific records Aug 29, 2023

### Motivation

Apps such as Farcaster that use Sign in with Ethereum as a primary login require the generation of a new EoA. It is also possible that you may want to split your address usage across different applications for address hygiene, security or privacy reason. Lastly with account abstraction becoming more popular, we may end up with an increasing amount of different addresses for different applications that man need to be connected.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A technicality, but Farcaster wallet clients don't use the SIWE standard for account creation / usage. A new account is created when you make a transaction to a contract, and then the address that made the transaction is now the owner of the account.

/// @param node A nodehash for an ENS name
/// @param key A key to lookup text data for
/// @return The binary data
function binaryRecord(bytes32 node, string key) view returns (bytes data);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a standard for what binary data should be returned for a record? Or is that up to each app to decide?

* You set the farcaster record on example.eth to 0x456...
* You now have a connection from 0x123... (your main optimism address) to 0x456... your farcaster address
* You add your ENS name to your account settings in Farcaster (stored in FC's hub servers)
* Now Farcaster can check your farcaster address in example.eth and show records from example.eth or NFTs you own on example.eth

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might want this to be double opt-in. otherwise i could register something like poop.eth and point it at your accounts keys without your permission. you could require that the binary data in the record contain a signature from the target address

* You add your ENS name to your account settings in Farcaster (stored in FC's hub servers)
* Now Farcaster can check your farcaster address in example.eth and show records from example.eth or NFTs you own on example.eth
* You can take the private key and put it onto any device, and login to Farcaster seemlessly by putting the key on the device
* This key gives access to your Farcaster account, but if a device is compromised, you can rotate the key to a new account rather than having to transfer all your assets out of your main account.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would this part work? if you are concerned your keys are compromised, and you own some eth or nfts there, youd still have to manually transfer them to the new account


### Considerations

Should the spec also deal with chains? E.g.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more broadly, apps should be able to specify multiple keys. for example, farcaster may use different keys for onchain actions vs encrypted messaging. so if you have a general format that apps can register subkeys with, they can easily extend them with chain info if needed.

@varunsrin
Copy link

Overall this takes the same approach that Farcaster took with the KeyRegistry but with a few differences:

  1. No validation of keys
  2. No attribution to key requestor
  3. No explicit double opt-in

I think 1 & 2 are fine and a general purpose system like ENS probably shouldn't have these specifics that may not apply to all apps. But i think 3 is worth considering as part of the spec

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

Successfully merging this pull request may close these issues.

None yet

3 participants