Current Situation
- Tezos addresses can be used as ID, but there is no way to associate arbitrary information with them.
- Tezos addresses are hard to remember and compare. This is bad, because it makes confirming that an address is yours require more trust than needed.
- There are no vanity names linked to addresses (e.g… having galfour linked to my address). This is bad because some people love them. I personally doesn’t mind as long as it doesn’t interfere with other seemingly identical names (galfour vs gaIfour, DICTATOR vs DlCTAT0R).
Proposed Improvement
Basic Information on Smart Contracts
Naive Idea
Once we have views, it will be very easy to query information from a smart contract (SC). From this, we can simply have a SC exposing a big map from addresses to string. Anyone can then query the information, as only operations coming from the address can change the information associated to an address.
This should already be very practical for a variety of purposes. For instance, if the string associated to an address could be something like
{
"twitter" : "LigoLang" ,
"public-name" : "Galfour" ,
"ip-v4" : "127.0.0.1" ,
}
Extension
The problem with the naive idea is that this data cannot be used from within the chain, as there is no way (at least, not within gas limits) to parse JSON. (We would like to be able to do so, because that data might link to other addresses, which would then be used by other contracts.)
An alternative would be to use maps of strings to bytes, which can be used to encode objects. { "foo" : { "bar" : 42 }}
would be encoded as map [[foo.bar](http://foo.bar)-> bytes_encoding_of_42 ]
(PascaLIGO syntax). This is better than the previous solution, as it would now be possible to access data from other smart contracts.
However, it is still a temporary hack because
- Some of the encoded values are not valid (you can have a
foo
key and a[foo.bar](http://foo.bar)
key), and - It requires
PACK
ing andUNPACK
ing a lot of values.
A more stable solution would be to have an actual JSON-like type in Michelson. Given that we have to wait for a coming amendment for views, it’s not really a problem to wait for JSON too, assuming it’s added in the same amendment.
Unique Identifiers
Good Naming Schema
We want Tezos addresses to have a representation that is at least:
- Easily distinguishable from each others. So that people can’t try to impersonate you by creating a name similar to yours.
- Easily remembered. So that you can actually check if it’s yours from memory.
- Easily transcribed. So that you can easily input it on forms.
For instance:
- Regular text, like domain names, satisfy 2 and 3, but don’t satisfy 1. It’s very easy to confuse galfour and gaIfour.
- Hashes, kind-of-like Tezos addresses, satisfy 1 and 3, but don’t satisfy 2. It’s very hard to remember a tz1.
- Identicons satisfy criteria 1 and 2, but not 3. Most people can’t reproduce/transcribe an identicon.
We could use a list of random words belonging to a list where all words are very different from one another. (We have investigated naming schemes a bit and are releasing a post about them soon.) Key considerations are:
- The more words there are on the list, the harder it is to make sure they actually are very different from one another.
- The longer the list is, the harder it is to remember its elements.
- The more elements that have to be transcribed, the longer the list of words will be.
Naming Contract
The last consideration makes it important to constrain the name space.
There are vastly fewer addresses that will be in use than potential Tezos addresses. That’s why we want a namespace which size is comparable to the number of addresses in use than all the potential addresses.
A way to do is is to have a naming contract, where people can get a name. It should be priced, but only to avoid spam / squatting. So the price should be as low as possible, so that as many people as possible can get a name. Additionally, once you have a name, you have it forever, you can’t lose it.
The proceedings could then be used in a community DAO, a prediction-market based DAO, a Moloch-like DAO (which would incentivize tooling around names, as more tooling would result in more names being bought) or any other similar experiment. This is a nice organic opportunity to try something new!
Protocol Built-in
It might be possible to do this directly in the protocol with dedicated operations instead of a smart-contract, as this is such a core feature. However, before having a stabilized minimal API, it seems easier to experiment at the smart contract level.
Side note: Vanity Name Systems
At this point, we might notice that DNS blatantly fails some of these criteria for a good naming schema, because:
- It is easy to confuse domain names (gaIfour vs galfuor)
- Domain names can be lost (if you don’t renew it)
- Domain names can be expensive (because of squatting / some domain being inherently expensive)
It’s because DNS is actually a Vanity Name System. The goal of DNS is not to easily find a website (this is done by Google) or to have prettier links (which I can already do with Markdown or HTML, like this). It is mainly to provide a vanity name, name that is mostly compulsory nowadays (imagine if Tezos Agora did not have a domain name!), so this is mostly a form of economic rent.
This in itself isn’t bad! It is simply not a good fit for a naming system that aims to provide identities for everyone and all.
To put a fair price on names in a vanity name system, which is manufactured scarcity, it might be a good idea to try something like a Harberger Tax, which was designed with a similar purpose in mind. Studying the effects of a Harberger Tax even for this toy product would be greatly beneficial, as a kind of a real-world economic experiment.
The main alternative to Harberger Tax is DNS, by giving ownership of a domain to its first claimant, incentivizes legal or illegal squatting of names and rent seeking behavior in general. By having to settle disputes itself, it also incentivizes centralization. To be honest, I hardly imagine any new proposed system doing worse than this.
(Remark: I imagine there is some wider point to be made about land.)
We are currently building the smart-contract for ID management, and will gladly let others build the Vanity Name System!
If you want to participate in any of those efforts (as a dapp developer, documentation writer or for wallet integration for instance), or simply be in the loop, please make yourself known