This post is about a Use Case that actually exists. I would like to give a big shout-out to Reine Revere who gave an excellent talk at the Decentralized Web Montreal meetup on July 28 I hope this post will summarize all she said but any errors or oversimplifications are my alone. The program is called Prism and can be found at https://prism.exchange. Prism allows you easily hold positions in a variety of coins.
NEWS: As of Oct 2018, Prism was shut down. Shapeshift indicated that new applications. They indicated they wanted to re do the same capabilities in an entirely new application
As of Oct 2018, this DApp was shut down. Personally I think the high gas costs and ease of trading coins have reduced the value of its use case.
Present Situation — Problem being solved
At present holding positions in a large number of coins is difficult. By coins we mean the big ones (Bitcoin, ETH or Ripple) and the small ones (Litecoin, Steemit, Golem, Gnosis or ECR20 tokens) and by “holding positions” I mean owning some of each coin. There are two practical ways to do this.
The first involves finding an exchange that will deal with all the coins (such as ShapeShift or GDax). However, you have the risk of holding your coin in an exchange long term. The second involves transferring your coin to a different wallet for each coin. This is safe, but awkward with so many passwords.
Prism makes this easier.
How it Works, Simple Explanation
The Prism application was designed and is being run by ShapeShift. Their role is crucial in the initial application.
You start the prism.exchange website and log in with your user name and password. What greets you is a friendly web based MMI that easily allows you to build your prism. You select all the coins you want to buy and the percentage of your prism in each. This builds a pie chart of all the coins you want with the appropriate breakdown.
Using ETH directly from your wallet, you buy your Prism. In other words, you exchange your ETH with the portfolio of smaller coins in exactly the ratios you defined. Now the price of your prism goes up and down with the prices of each individual coin.
You can check back regularly and see the value of your prism as it changes. You can rebalance your prism, changing the ratios or even changing the coins. Finally, you can sell once the value is where you want it.
Some limitations; you must hold on to the Prism for 24 hours. Prism is not designed for day trading. If your Prism doubles, it is automatically sold. There is a fee for holding the prism and a fee for selling.
At first read it has little to do with Ethereum and is little more than a normal exchange. But under the hood, Prism is a set of Ethereum Smart Contracts.
Under the Hood
A traditional exchange is very much a client server architecture. You, the client, access the server and request the transactions. Once you have made your purchase, the asset rests on the server. The server holds the assets. This is why hackers target exchanges, because they hold the assets. You, the client, must trust the server. The server is run and controlled by people (who you likely do not know). Implicitly, you trust the people who run the exchange. Prism is not like this.
Prism is based on Ethereum Smart Contracts. The assets, the coins of your prism, rest of the Ethereum blockchain. You, the client must trust Ethereum and must trust the code. In this case the code of the Prism Smart Contracts code. This means that once the Prism is created, only you with your wallet and passcode can access your Prism. It is impossible for ShapeShift or even the coders of the contracts to access your Prism and the value within. You do not even need the prism.wallet website to sell your Prism.
The Prism Exchange is made up of two parts; the web page and the Prism Smart Contracts.
The web page is relatively standard. Decentralized web pages are coming, but not here. On the web page are the latest prices for each coin. This is gained from a Ethereum contract called an Oracle that sends the prices onto the blockchain. Once you buy a Prism, a few things happen;
- Your ETH transfers from your wallet to the Buyers wallet
- The Smart Contract code stores an index to the coins you have purchased. You don’t actually have each of the coins, only the index. The index can only be read by the Prism Smart Contracts and only they can convert it back to real coins.
When you check the balance of you Prism;
- The website requests from the smart contract and
- The smart contract reads your index and reads the latest prices from the Oracle and sends the results to the web page which displays it graphically as your Prism
When you sell;
- The smart contract reads your address and reads the latest prices from the Oracle and determines the value in ETH.
- The smart contract determines the fees due and transfers them to the “fee wallet”
- This remaining amount is transferred from the smart contract wallet into yours
In fact, you do not need to log on to the Prism website in order to Sell your Prism. They made relay contracts. With one of them, if you send Zero ETH from your address to a specific address it will immediately sell your Prism. This can be done by almost any Ethereum wallet program (such as MyEtherWallet, see this post for compatible wallets)
As I indicated, initially the Buyer is ShapeShift, an established Exchange. This makes sense because one Buyer, with many Sellers allows them to hedge their amounts. The Buyer sets the fees and collects them.
Remember that the code is distributed among the Ethereum Nodes and can be executed by any node. As such, the execution and the results are completely out of ShapeShift’s control. If an error happens they cannot change the results. The Ethereum blockchain is immutable. They can however clearly see what happened on every transaction. They can identify and fix any bug fixes that they find.
The worst example of an code error costing money is the Parity MutiSig Wallet error of June 2017 where 150,000Eth worth $30M was removed from wallets because of what was (in retrospect) a relatively minor simple coding error.
If something goes wrong with the code and you end up losing because of it, you at least have a hope of contacting ShapeShift and getting them to set it right. Since ShapeShift wrote the code for the contracts they have a moral right to deal with errors within them.
Other Users than ShapeShift
ShapeShift has said that once the Beta period is over and the code is established and tested they will release the API and the code. The API are the rules to talk to the Ethereum smart contracts. This means that others can set up web sites that compete with Prism using the code developed by Prism (except the website). This would involve other buyers and they can determine their own fees. This is in line with the very public architecture of Ethereum.
The contracts take Eth in and give Eth back based on the value of the Prism. The Prism is made up of elements that have prices broadcast by an Oracle. These elements can be anything; stocks, fiat currencies, ECR20 tokens, almost anything.