Oraclize Dapps — Youtube views count based escrow

As we have previously stated in that post at Oraclize we really think providing some real world use cases is a very concrete way not only to get developers to understand what our service does, but also to get new people involved in the Ethereum decentralized movement.

When talking about real world dapps we don’t mean just releasing their source code (which is still a key point), but even to provide some easy way to interact with them for common people. Not only people but also developers are finding it difficult and non-trivial to learn all the fundamentals Ethereum is built on.

Even if we think understanding all the technical details is very important to better interact, leverage and appreciate this technology, providing a simple ready to use website means putting some fun back into this learning game other than helping learners not to feel left behind.

Our focus is in providing a reliable service to connect smart contracts to Internet data-feeds/APIs, however as a result of our growing team, we have chosen to dedicate some efforts to build dapps.oraclize.it as a platform to show different tangible Oraclize-based applications.

Well, that’s enough chat for today, let’s move on with our first dapp published on dapps.oraclize.it !

Our first dapp is coming from a very concrete need expressed by the community itself few weeks ago. As the webpage title says this is a Youtube video views-count based escrow.

What does it mean in practice?

  1. you publish/choose a youtube video, a threshold (like 2222 views) and an expiry date (+1 week for example). Then you create a new instance of the smart contract with these given properties (this process is not trivial at this point, but we’ll make it easier as well soon). The published contract is here on identified by its address.
  2. the sponsors (or anybody) can go to the web frontend (readonly!), which shows the status of the contract and all the details in a convenient way (with no need to install anything or to be technical, should be really easy). The only thing you have to specify is the contract address of point 1 (which can be embedded into the url so that it can be easily linked).
  3. the smart contract checks automagically at the given time (+1 week for example) the views-count of the chosen video and if views>threshold it sends 100% of the funds to the contract owner, otherwise it sends to each sponsor 25% of their funds back (as partial refund) and all the rest to the contract owner.

So by using this dapp a youtuber can easily provide to his sponsors a transparent and automated escrow to give them back a partial refund once the sponsored video was not as succesful as they expected.

Well, this is probably easier to see in action, by clicking here.

The source code is available along with other examples in this github repository. Feel free to join our gitter channel and to follow us on Twitter if you want to discuss about this smart contract, we are eager to get your feedback!

Thomas Bertani

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.