The technology behind 3NUM is inherently complicated. The high level explanation for 3NUM is that we are replacing traditional phone numbers with a messaging NFT. While this is pithy, it leaves the curious minded wanting to know more. This article attempts to explain in detail how 3NUMs are constructed from a non-technical perspective.
Turning Phone Numbers into Crypto Numbers
3NUM Shields are generated by minting a phone number into a messaging NFT. Here is how that works:
First, a wallet “reserves” a phone number from our pool of unallocated numbers by signing a transaction to “queue” it up for being minted into a NFT. (It’s worth noting that in the future, users will be able to mint their existing phone number into a 3NUM). This creates a reservation ID to associate the number with the user’s wallet, which gets passed into the smart contract for minting. This step ensures that the only wallet able to mint the new number is the wallet that “reserved” it to be minted. That reserved phone number is then hashed and the hash is registered as a NFT where the TokenID is the hash of that number. This process inextricably links a user’s private key to the underlying phone number. At this point, a traditional phone number has officially become a web3 native crypto number! A user could think about this process like replacing a SIM card with a Smart Contract.
How messages are sent:
A major benefit to this approach is that it completely decouples ownership and control over a phone number from the networking layer. Therefore, a relay layer is required for facilitating the sending and receiving of messages. This relay layer will be decentralized over time. The relay layer logic is software that is a component of the 3NUM service.
3NUM to 3NUM
All messages sent between 3NUMs are end-to-end encrypted. When a user initiates sending a message to another 3NUM (by typing in the underlying number or an ENS name that a user could associate with their 3NUM) a lookup is done to find the corresponding public key. This is possible because looking up the hashed phone number (which is the public tokenID) unlocks finding the public key associated with the owner of the underlying number. Messages are then encrypted with the recipient’s public key so they can only be viewed by the intended recipient. Messages are then sent by the relay layer.
3NUM to Traditional Numbers
When a message comes in from a traditional number to a 3NUM Shield NFT they are sent to a relay gateway that is built to handle this request. The relay gateway maps a phone number to a public key by hashing a number and looking it up on the blockchain to retrieve the public key associated with this number. Messages are then encrypted with the recipient’s public key so only the user with the corresponding private key can view the message.
Transferring 3NUM Shields
3NUM Shields are ERC-721 spec NFTs. This means they can be sold or transferred like any other ERC-721 NFT. The `ownerOf(tokenID)` function shows the current holder of the underlying phone number for a given NFT. If a transfer of ownership does occur, the only way a message can be viewed is by controlling the private key associated with the current `ownerOf` said 3NUM Shield. This also means that messages sent to the underlying number of a 3NUM Shield cannot be viewed by a previous owner as the public/private key would no longer be associated with the NFT. A transfer is verifiable on the blockchain with the Transfer(from, to, tokenID) event.
Join our Discord Server here: https://discord.gg/cxFU8NvCYV
Follow us on Twitter here: https://twitter.com/3numdao
Stay up to date with our newsletter: 3num.co