Disclaimer: These reviews are done as is from what is on display in the master branch of the repo’s made available. This review is not a comment on the overall project, scope, or success thereof. This was done as an educational review by me and any comments in the article are simply my opinion. It should not be used as any comment or advice on the project as a whole.
Review Date: 02/03/2018
What is Origin Protocol?
“Origin is a sharing economy marketplace that enables buyers and sellers of fractional use goods and services (car-sharing, service-based tasks, home-sharing, etc.) to transact on the distributed, open web. Using the Ethereum blockchain and Interplanetary File System (IPFS), the platform and community are decentralized, allowing for the creation and booking of services and goods without traditional intermediaries.”
Right now they have two repo’s that are interesting, whe have platform and we have demo-dapp
What they are trying to accomplish is key, why are Google, AWS, and Azure so successful as a development environment? Because they make it easy, serverless infrastructure is fantastic, devOps has never been simpler. Developers nowadays (sadly) don’t want to understand how the underlying mechanisms work, they just want to drop their code somewhere and it should work. So solutions like these are incredibly important for the future of Blockchain adoption. They might be a bit limited in scope (creation and booking of services and goods) but this already allows them to be a decentralized competitor to the likes of Amazon or listing services like Graigslist and whatever else is out there.
Let’s start with platform
Not a very active repo, only 14 commits, one commit caught my eye;
Adding placeholder directories to mirror RequestNetwork. Not sure what the link here is, warrants some more investigation.
Origin.js looks to be the primary root file, this will be the API as such that will allow you to CRUD (Create Read Update Delete) listings. First commit is just a skeleton
Next some more readme updates, nothing interesting, and then we have Listing.sol added to the repo.
We start with a few events, UpdateListing, NewListing, and ListingPurchased (interesting no deleteListing). These events will be the core of the API. So what are events in Ethereum? Events are triggers/notifications, so I can subscribe to these events and I would get notified as soon as an event is created, events are also actually a fantastic means of storage since I can use them as immutable logs. And because of their deterministic nature I can always replay them.
Next we see listingStruct[], this is a bit of a red flag, the problem with this, is that it will grow exponentially, data storage (even cheap storage) in Ethereum is notoriously expensive, hopefully Swarm comes out soon and then we no longer need to store data like this. However, storage is paid for in gas when the item needs to be stored, so each person creating a listing (or updating a listing) will end up paying for it. Now from a financial model this already doesn’t make a lot of sense, sure the person listing should pay (this is the standard model) but now the person buying the listing also has to pay (this is not the standard model), I guess you could argue it shows valid intent to purchase though, but why if I can just go get it on Amazon without paying a purchase fee, I’m already buying the object afterall. The big thing here as well is that something like Amazon ends up being the escrow, so far I don’t see an escrow mechanic, but its early days, so let’s continue.
listingStruct we see contains the address of the lister, the ipfs hash (for data stored, description, images), price, and unitsAvailable.
We have some modifiers, these are just little logic checks for functions, so isOwner checks that you are the owner (of the listing for example), hasValueToPurchase checks that the sender is sending enough coins to actually purchase the listing. Standard boilerplate.
Rest is fairly straight forward implementation of the actual Listing object, buyListing is payable (so you are expected to buy first, this could be dangerous where items should be delivered for example, places like Amazon keep your funds in escrow and only after you have confirmed receipt of your goods are the funds released), I’m not seeing this mechanism yet, but let’s keep looking.
We see Stan James created most of these files,
We also see Stan uses Linux/Mac and stores all his code in Documents, come now Stan, that’s not good coding practices :p
These are all the test listings, currently you can buy Taylor Swift, a Red shoe, or a Lambo. I wonder how Taylor will feel about that?
Doing some assumptions here about IPFS structure, this could cause big problems down the line, smart contracts are immutable by nature, so when you redeploy you do a new contract, if IPFS changes their implementation then this can have some nasty complications. This also raises concerns of contract migration, but that’s a topic for another day.
Pretty standard wrapper code for the transactions,
They are using call when it’s just access stateless data and they are using transactions when they do statefull changes. This is nice to see.
Interesting, storing individual IPFS files for each listing. The hash is already part of a merkle, so I guess it’s easy enough to look up. Given no indexed storage, this is a good option.
And that’s all the commits we have.
Conclusion: So, it’s good code, but its very basic code, they are leveraging IPFS for storage, and Ethereum for the actual listing. What happens when we have a gas war about a listing? How are funds held in escrow for the payout to occur?
So as a product they are going to compete with other listing services. Does this need its own token? I don’t really see why. Is this better because its on the blockchain? I don’t really see why.
In all honesty the code so far is a few weeks worth of work (and I’m being generous). I really like the idea, but it just isn’t really special. They could easily have hundreds of competitors within a few days, so it will all depend on who actually adopts them. They mention having the interest of AirBnb, Uber, etc, so that could have value, but will they want to publish services on something that is censorship free? This could just as easily become a marketplace for illegal goods and services and it technically can’t really be controlled. Unless they bring in censorship, and then isn’t the whole point of blockchain defeated? I know that’s why they want to bring in the token, for governance, but doesn’t that just mean I’m buying a token to then do a job for them?
Fun project, but nothing wow.