How Dash Data Contracts Work

in #dash27 days ago

Dash Evolution does things differently than most data-focused blockchains.

One major difference: data contracts. 🌐📜

What are Dash’s data contracts, and how do they differ from smart contracts?

First, smart contracts, such as those popularized by Ethereum, basically run computations. Developers write a smart contract in a special language such as Solidity, then execute it. The network runs the specified computation and produces the results. They can be complicated, hard to engineer correctly, and demanding to run.

Don’t get us wrong, smart contracts are really cool. They do a lot of really interesting things, and Dash has smart contract functionality on the roadmap for the near future. But a lot of use cases can be much better served by data contracts.

A data contract is essentially a template that says: “Write X Y and Z to data storage.”

Because no computation is involved, this is a much simpler, more straightforward function compared to smart contracts. And, you don’t need to write your DApps in any special smart contract language: legacy web languages such as Javascript work fine. Just use the data contract format to specify what you want written to, or called up from, storage.

What makes data contracts special?

What really makes Dash’s data contracts special is what they write TO: an advanced, layered, indexed data storage solution.

Unlike more rudimentary decentralized data storage solutions, Dash’s is fully-indexed and queryable. This means that, rather than simply storing certain file types (called documents), Dash associates data with specific references/subtrees, then maps certain keys to certain values (i.e. country = france), so that the end result is EXACTLY the piece of data your app needs at a given time can be called up instantly, with proofs that it delivered exactly what you’re looking for.

Data contracts aren’t a different way of approaching smart contracts: they’re a different thing entirely. And something that hasn’t been satisfactorily solved by the space until now.

In the future, we envision a decentralized digital world powered by Dash, with a nice mix of data contracts and smart contracts powering every manner of decentralized application imaginable. It’s a beautiful and free world, and we’re working towards it.

But for now, let’s focus on this innovation that’s unique to Dash.

Your money, your way. Your data, your way.

Posted Using InLeo Alpha

Sort:  

Nowadays it is important to be unique in the decentralized space and I think that Dash’s data contracts offering a simpler alternative to traditional smart contracts it brings value and innovation.

Thankfully Dash will have both by the end of next year.

Still dont really get it
Until i See an App built on top of it

Ok let's break it down with the DPNS contract. First, here's the schema (i.e. the contract, what it's telling the network to write):

https://platform-explorer.com/dataContract/GWRSAVFMjXx8HpQFaNJMqBV7MBgMK4br5UESsB4S31Ec?tab=schema

If you go to Documents and go to the latest entry, here you'll see the data that this person is writing to the network. Notice that they're registering the username "Michael"

https://platform-explorer.com/document/AQ76mrKhkkVZkSNWrnPSQyMrMoZyc3iMVMkEvUsVuuPg

Congratulations @dashpay! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You distributed more than 600 upvotes.
Your next target is to reach 700 upvotes.
You made more than 300 comments.
Your next target is to reach 400 comments.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

Halloween Challenge - Publish Your Chilling Story for an Exclusive Halloween Badge!