Summary
This document outlines the initial work done by the team on their NFT Identity project, which aims to decentralize the process of generating wallet tags. They have deployed a Cosmos contract using Beaker, written a basic WalletTagger using Osmosis historical data, and used RSA keys for encryption/decryption to keep wallet addresses secret. The team plans to add missing NFT minting functionality to the smart contract, research the Oracle ecosystem on Cosmos, and deploy the contract on Neutron in the coming weeks.
Useful links
This idea is based on the RFP provided by Delphi labs, available here.
Video recording -> https://www.loom.com/share/5ab36602fbb8437cbe72184a6aee758a
Repo → repo
Architecture → link
Why we think the idea is promising
In addition to the compelling arguments outlined in the RFP, the idea's decentralized nature is a key factor that sets it apart.
Currently, players like Nansen and others issue various tags, such as Smart Money and whales. While this serves its purpose, we strongly advocate for decentralizing this process and empowering everyone to generate any tag using any data by constructing their own WalletTagger. This approach holds immense usefulness and power. To kickstart the project, we have implemented a straightforward ML algorithm as the WalletTagger, employing KMeans clustering to group wallets into clusters (further details available here).
Another compelling aspect is the leverage we can achieve through ICA accounts on Neutron. This allows seamless connectivity with any Cosmos chain.
What we did to prove idea viability
- Deployed Cosmwasm contract using Beaker for convenience (please note that we envision using Neutron as initial chain) → https://github.com/gabrielfior/nft-identity/tree/main/nft-tag-minter-dapp
- Deployed Cosmwasm contract on a local chain, responsible for minting NFTs of a given wallet based on the data processing algorithms we developed (Osmosis trader type, Lens profile type)
- Used RSA keys for encryption/decryption to keep wallet addresses secret → we thank Gabe Rodriguez from Delphi Labs for useful discussions around this topic
- Wrote a basic
WalletTaggerusing Osmosis historical data for clustering trader profiles based on trade volume vs trade size → code - Wrote a
LensProfileTaggerusing Lens historical data for clustering profiles based on followers, posts, mirrors, etc. → code
Considerations regarding decentralization
We highlight two very important aspects regarding decentralization and privacy of the protocol:
Privacy As described in the architecture, we implemented a queue as part of the smart contract state, responsible for storing tuples (encryptedSecretWallet, recipient) that should be processed by external services (validators). Instead of exposing the secret wallet, we encrypt it beforehand with the validator's (our backend is the only validator) public key, thus making the secret wallet private to everyone but the validator (see next point for decentralization). Moreover, by processing the tuples in batches, we make sure that no trivial association between contract callers and recipients (or other entities) can be made. (security through obscurity)
Decentralization Having our own backend as validator makes the implementation more straightforward, however there is a valid argument to be made that the protocol is very centralized, since the only validator could be malicious and hence derive inaccurate NFT tags for users. While this is true, we can imagine a more interesting architecture in the future, allowing for multiple validators (instead of one), each having their own queue in the smart contract. Then, we could have a mechanism where validators need to produce proofs at regular intervals for known addresses, and be penalized in case they produce false proofs (for ex, a known wallet should be labeled as Whale but was labeled as Retail user) - this is a form of interactive proof. Finally, other ZK constructs could also be leveraged, but this requires additional research that has not been made until now.
Additional work items completed between May 15th and May 30th:
- (Done) Add missing NFT minting functionality to smart contract (based on cw721)
- (Partially done) Research Oracle ecosystem on Cosmos, specially around Wormhole-like Guardians, for integrating different microservices
- (Not done) Deploy contract on Neutron (we welcome support by the Neutron team) -> not possible due to time constraints and availability from the Neutron team
- (Done) Review of utilized encryption scheme & researching other ways to hide wallet being tagged
Built With
- cosmos
- fastapi
- python
- rust
- typescript
Log in or sign up for Devpost to join the conversation.