The contract is very simple; all it is a database inside the Ethereum network that can be
added to, but not modified or removed from. Anyone can register a name with some value,
and that registration then sticks forever. A more sophisticated name registration contract
will also have a "function clause" allowing other contracts to query it, as well as a
mechanism for the "owner" (ie. the first registerer) of a name to change the data or
transfer ownership. One can even add reputation and web-of-trust functionality on top.
Decentralized File Storage
Over the past few years, there have emerged a number of popular online file storage
startups, the most prominent being Dropbox, seeking to allow users to upload a backup of
their hard drive and have the service store the backup and allow the user to access it in
exchange for a monthly fee. However, at this point the file storage market is at times
relatively inefficient; a cursory look at various existing solutions ↗ shows that, particularly
at the "uncanny valley" 20-200 GB level at which neither free quotas nor enterprise-level
discounts kick in, monthly prices for mainstream file storage costs are such that you are
paying for more than the cost of the entire hard drive in a single month. Ethereum
contracts can allow for the development of a decentralized file storage ecosystem, where
individual users can earn small quantities of money by renting out their own hard drives
and unused space can be used to further drive down the costs of file storage.
The key underpinning piece of such a device would be what we have termed the
"decentralized Dropbox contract". This contract works as follows. First, one splits the
desired data up into blocks, encrypting each block for privacy, and builds a Merkle tree out
of it. One then makes a contract with the rule that, every N blocks, the contract would pick
a random index in the Merkle tree (using the previous block hash, accessible from
contract code, as a source of randomness), and give X ether to the first entity to supply a
transaction with a simplified payment verification-like proof of ownership of the block at
that particular index in the tree. When a user wants to re-download their file, they can use
a micropayment channel protocol (eg. pay 1 szabo per 32 kilobytes) to recover the file; the
most fee-efficient approach is for the payer not to publish the transaction until the end,
instead replacing the transaction with a slightly more lucrative one with the same nonce
after every 32 kilobytes.