3

What is the difference between Dapps, digital wallets and smart contracts?

I have just started learning ethereum. So there is much of confusion for me.

From my understanding:

  • Dapp is an application built using ethereum network.
  • Digital wallet is personal wallet for my coin when I send coin it goes to ethereum network.
  • Smart Contracts are like standard contracts running ethereum network built in Solidity.
5

a dApp is a decentralized application. It means that part or the whole logic of the application is stored on a network.

A digital wallet is what it means, a wallet that stores coins or units of value on a file or in an application.

a smart contract is a brick of logic that can be used for creating a decentralized application.

Now that we've defined each part, here's some explanation in order to makes easier how you can concieve those. I'll mainly focus on ethereum here, except for the last part of my answer.

How a dApp works

Let's imagine a quite usual application on which you could register and that would gives you some points ( unit of value ) for making some actions, like posting some text.

Usually an online application is stored on a server and when requested the server processes the instructions that are stored in the application.

If my application were written with PHP for example, i'd first request the URL, the server would recieve the fact i'm requesting the URL, then load in memory the script ( logic brick ) that is attached to my URL, process it, and then gives the result to your browser as response ( usually an HTML page ).

Then on the page i recieved, i'd write some post, click the post button which would say to the server "hey, handle that post, memorize it, do whatever you have to do with it". The server would process it, do what it has to do, and would send back to your browser the answer ( the result html page ).

Well, here, at some point, a dApp would do more or less the same but in a different way.

In a decentralized application, as said before, instead of having the "scripts" of the logical bricks at a single place, those elements are stored in a network ( mostly Ethereum today, but we'll get back about this later ).

Each node of this network contains a copy of the logical bricks and when a function call ( processing my request ) is made on a node and then the transaction of that call is written on a block, each node of the network will update its state of my logical brick to have the same one as the one that processed first my request and wrote it in the block.

I don't know which node has processed the request, in other words i don't know which machine, and i don't really care. The only important thing is that i know the address that represents my application or logical brick.

A dApp can be completely decentralized or partially. it's just a matter of architecture chosen by the developpers. As a developper i can chose to rely all the application logic on the network, or just a part and handle some requests on a classical server.

How a digital wallet works

As said before a digital wallet is nothing else than data that allows us to move units of value. This wallet can be just a single address, as MyEtherWallet does, or a smart-contract wallet, as parity was doing.

With blockchain digital wallets, in fact, the files you usually download are not the coins themselves. The coins are on the network and won't really move from there. What you get is an address, a public key and a private key. Those elements together allows you to sign in onto the network and have the legitimacy to say "i want to move this amount of units of value from this address to this address".

What are smart-contracts

a Smart-contract are the logical bricks of the decentralized applications. While on Ethereum network they usually are written in solidity, they can be written with other languages.

When a smart-contract is deployed on the network, it doesn't stay in solidity. It's compiled as bytecode, and the EVM, the virtual machine of ethereum processes this bytecode in assembly.

Most developpers write the smart-contract in solidity because it's easy to read the code and avoids to most of them to learn assembly. This language looks like a mix of C++ and JavaScript in terms of code struturing and syntax.

You can write smart-contracts in assembly if you want, but usually it's a pain in the butt as assembly is hard to read, understand and write.

Are smart-contracts and dApps exclusive to ethereum ?

Here we've been talking about smart-contracts exclusively on ethereum. However the concept of dApps and smart-contracts are not exclusive to the Ethereum networks.

Any blockchain could provide smart-contracts and dApps capability, it's just a matter of what features the blockchains developpers want into their blockchain.

At this moment Ethereum is the most used for this and there's very few alternatives available. However some projects intend to implement those also in the future.

One of the most known alternative project is Lisk, which want to bring dApps built with JavaScript, but if you dig a bit maybe you'll find some more. Long story Short Lisk is not ready yet but an SDK is planned for realease during 2018.

I've read that bringing smart-contracts to Bitcoin was also considered. Anyway, if Ethereum is the most known and active blockchain to bring Smart-Contracts, smart-contract wallets and dApps today, we'll probably see many alternatives coming to life and competing in the next years.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.