Inspiration
How can you reach out to any Ethereum address easily? Imagine that you want to offer an NFT owner 100 ETH for a beautiful JPEG. Min bid is 150 ETH but you want it so bad and yet there's no simple, user friendly way to reach out to this owner because the only info you have about the owner is 0x...e19.
Imagine that you want to message every NFT owners of the collection you just shipped to inform them of further drops, events etc...
0x to 0x DM is needed and this is why we built TOLK (for the lack of a better name)
What it does
We built and deployed a contract that can hold messages that are directly addressed to ethereum addresses. By default they are unencrypted, but when a user uploads their encryption key every following message will be public-key-encrypted.
Users are able to create multiple inboxes that can only be messaged if the sender owns an NFT or amount of ERC-20 -> It acts as an inbox filter e.g I have an AAVE inbox and the requirement if you wanna reach out is to own at least 100 AAVE
How we built it
We started looking into encryption of messages on-chain and settled for MetaMasks eth_getEncryptionPublicKey
and eth_decrypt
endpoints which allow public-key-encryption without managing an extra keypair outside of the wallet.
We built and deployed a contract which holds all the messages for persistence.
We also created a The Graph subgraph for our contract which allows us to fetch all relevant data like the inboxes, senders and past messages without needing to query for specific events.
Challenges we ran into
We spent major time on figuring out how to extract a public key of an address by looking at exising transactions, only to realize very late that ethereum wallets don't have a standard do decrypt a message signed with a public key, so we switched to MetaMask specific endpoints.
Accomplishments that we're proud of
- Building real end-to-end encryption on chain
- Being able to get a subgraph up and running in very little time
What we learned
- End-to-end encryption still has a way to go in the Ethereum ecosystem
- On-chain messaging is going to be huge, the possibilities are endless
- If Discord team is not working on this, they'll be out at some point
- We love hackathons
What's next for Tolk
We've been stoked by the non-existence of such a service, we're not going to leave it as a hackathon project. We will collect more user feedback and look into other next usecases to implement, like moderated chat rooms, multichain, offchain messaging and more.
Log in or sign up for Devpost to join the conversation.