With the blockchain in position to be the next big thing, it’s no surprise that there has been a fury of platforms built on-top of the public ledger – most notably cryptocurrencies. Unlike digital currencies like bitcoin, however, Ethereum is a decentralized platform where developers can build ethereum applications they want on the blockchain.
In theory, a developer can create an application like distributed crowdfunding or a democratic organization. Another possibility, suggested by Danny Bradbury on IT World Canada, would be “an AirBnB-style rental service without the large, overvalued unicorn company in the middle running the whole thing and taking the commission.”
Whatever the application, Bradbury adds that the idea is “the smart contracts themselves would manage payments according to executable rules. No one could tinker with those rules because they wouldn’t reside on any one server. And for the same reason, the application couldn’t go down just because one computer stopped working.”
For an Ethereum decentralized application platform to operate, according to Consensys.net, it must contain the four core technological building blocks;
- Cryptographic Tokens and Addresses: a mathematically secure unique voucher system that can act as numeraire and be used pay for goods, services or assets, and can also be used to represent a mathematically secure, pseudonymous identity;
- Peer-to-peer Networking: individual users connect their computers together forming a network to exchange data without a central server (both Bitcoin and Ethereum run on P2P networks);
- Consensus Formation Algorithm: this algorithm permits users of the blockchain to reach consensus about the current state of the blockchain (the Bitcoin blockchain reaches consensus on a global state change every 10 minutes on average whereas the Ethereum blockchain reaches consensus approximately every 15 seconds).
- Turing Complete Virtual Machine: a virtual machine is a computer that exists as software, and can be run at a layer of abstraction above the underlying hardware; “Turing complete” means that this software computer can run any computer program one defines and is powerful enough to implement any program defined in any similarly computationally complete system (as opposed to Bitcoin, which has a virtual machine but can only run a much simpler class of programs);
These four pillars are designed to make smart contracts possible. Once these are in place, an interface, such as an application, can be implemented.
The Ethereum White Paper on GitHub adds that “there are three types of applications on top of Ethereum.”
The first category is financial applications. There provide “users with more powerful ways of managing and entering into contracts using their money. This includes sub-currencies, financial derivatives, hedging contracts, savings wallets, wills, and ultimately even some classes of full-scale employment contracts.”
The second category is “semi-financial applications, where money is involved but there is also a heavy non-monetary side to what is being done.” An example of this would be “self-enforcing bounties for solutions to computational problems.”
The third, and final, category “are applications such as online voting and decentralized governance that are not financial at all.”
With that in mind, here’s a more detailed look at Ethereum applications.
As the White Paper states;
“On-blockchain token systems have many applications ranging from sub-currencies representing assets such as USD or gold to company stocks, individual tokens representing smart property, secure unforgeable coupons, and even token systems with no ties to conventional value at all, used as point systems for incentivization.”
These systems are actually easy to implement into Ethereum contracts by understanding that this is a database with one operation, such as subtracting X units from A and give X units to B.
The basic code for implementing a token system in Serpent, would be as follows;
def send(to, value):
if self.storage[msg.sender] >= value:
self.storage[msg.sender] = self.storage[msg.sender] – value
self.storage[to] = self.storage[to] + value
With a few extra lines of codes, you can provide additional steps in how to distribute the funds. For example, you could be able to pay transaction fees directly in a specified currency when dealing with cross-border payments. This would be accomplished by activating a contract that would automatically refund your balance every time a transactions was made.
Financial derivatives and Stable-Value Currencies
These “are the most common application of a “smart contract”, as well as “one of the simplest to implement in code.” The biggest obstacle to overcome in regards to implementing financial contracts “is that the majority of them require reference to an external price ticker.” This means that “a smart contract that hedges against the volatility of ether (or another cryptocurrency) with respect to the US dollar, but doing this requires the contract to know what the value of ETH/USD is.”
To get around this you would need a “data feed” where a contract is maintained by a designated party. It’s up to this entity to update the contract as needed.
The White Paper recommends “that critical ingredient, the hedging contract would look as follows:
- Wait for party A to input 1000 ether.
- Wait for party B to input 1000 ether.
- Record the USD value of 1000 ether, calculated by querying the data feed contract, in storage, say this is $x.
- After 30 days, allow A or B to “reactivate” the contract in order to send $x worth of ether (calculated by querying the data feed contract again to get the new price) to A and the rest to B.”
This would impact cryptocurrencies since it could address the concerns of volatility, as well improve security and build trust among users.
Identity and Reputation Systems
Namecoin, for example, attempted to create a name registration system where users could register their names into a database. In the Ethereum, this would be a database within the network where anyone can register their name. The catch? Once it’s entered, it can not be modified.
To add your own Namecoin-like name registration system on Ethereum, here’s the basic contract;
def register(name, value):
self.storage[name] = value
Decentralized File Storage
There’s no shortage of companies offering online file storage. While Dropbox and Box are popular storage solutions for many users, they can be inefficient since the storage offered may not justify the monthly fees. Ethereum contracts, however, “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.”
These contracts would work by first splitting “the desired data up into blocks, encrypting each block for privacy, and builds a Merkle tree out of it.” After that;
“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.”
Decentralized Autonomous Organizations
As the White Paper states, “The general concept of a “decentralized autonomous organization” is that of a virtual entity that has a certain set of members or shareholders which, perhaps with a 67% majority, have the right to spend the entity’s funds and modify its code.” These members would then decide how to allocate funds, which could be used for anything ranging from salaries to an internal reward system.
By using a self-modifying code, the previous agreement could be changed whenever two thirds of the members agree on said change. This would involve three transaction types;
- [0,i,K,V] to register a proposal with index i to change the address at storage index K to value V
- [0,i] to register a vote in favor of proposal i
- [2,i] to finalize proposal i if enough votes have been made
Not only would there be clauses, there would also be an open record of all open storage changes. Eventually, there could be a more sophisticated system where there would be a built-in voting system that would approve transactions, along with adding or removing members.
This could even pave the way fro Liquid Democracy in which anyone could assign an individual to vote in their place.
On top of the applications listed above, here are several other possible applications that can built by using Ethereum.
- Mobile Savings wallets. This will keep your funds secure since your contract will allow you to only withdraw a certain amount of money each and being able to shut the account down with your key. If you need more funds, you would contact the other party.
- Crop insurance. This would come in useful for farmers, and potentially all homeowners, who would automatically receive insurance funds following a natural disaster.
- A decentralized data feed. This could ultimately place an agreed value on a number, such as the ETH/USD price, the temperature of a city, or the result of hard computation.
- Smart multisignature escrow. With Ethereum there could be more granularity for multi signature transactions. For example, “”four out of five can spend everything, three out of five can spend up to 10% per day, and two out of five can spend up to 0.5% per day.”
- Cloud computing. This would allow you to verify transactions wherever, whenever they want on whatever device they chose.
- Peer-to-peer gambling. Contracts built on the next block hash, for example, could lead to “gambling services with near-zero fees that have no ability to cheat.”
- Prediction markets. “Provided an oracle or SchellingCoin, prediction markets are also easy to implement, and prediction markets together with SchellingCoin may prove to be the first mainstream application of futarchy as a governance protocol for decentralized organizations.”
- On-chain decentralized marketplaces. This is where identification and a reputation system would be used a base.