Skip to content
Cosmopediaby Unity Nodes
DiscussionsMiscellaneousIs Cosmos also a general Smart Contract platform?Forum ↗

Is Cosmos also a general Smart Contract platform?

Miscellaneous8 posts6,092 views11 likesLast activity Oct 2019
MO
mobfoundryOP
Nov 2017

I’m sort of confused. Can Cosmos host its own smart contracts independent of other blockchains or is it mostly a tool for interblockchain comms?

PR
prawda
Nov 2017 5

Yes. The difference is the following: With Ethereum or some other examples, the blockchain is a virtual machine, which computes the smart contracts, that are written in a specific language. For Ethereum this language is solidity, which emerged from Javascript. For Cosmos you have a blockchain, which is not a virtual machine, but rather a database, which can be queried. So you can decide on any programming language to use. It doesn’t matter, as long as your program, which talks to the blockchain, is able to replicate the correct state. This means that you can check transactions for validity and send valid transactions. Comparing to the world of web development, Cosmos or Tendermint introduces something like MongoDB, where different applications can talk to each other, even if they do not share the same data structures. All they need to do is having the same interface. For web development this is called REST API (among others), for Cosmos/Tendermint this is called ABCI. You ask if Cosmos can host its own smart contracts independently, yes not only that, it can also replicate the state of other blockchains, but it does not need to. This allows to have many blockchains connected…

Excerpt (1196 of 1458 characters). Read the whole post on the forum ↗

ZY
zyrumtumtugger
Nov 2017

Would you be able to use something like C++ in Cosmos as well? Also, what would be the performance of running a “normal” program via Cosmos? Let’s say you were running a social network like Twitter (and assuming we found a solution for data storage).

Been reading about EOS WASM - is that concept meaningful here? Does Cosmos have a similar concept?

PR
prawda
Nov 2017 5

Well, the easy answer is “sure, of course”. You can use any language, as long as it is able to talk to ABCI. You can also use Web Assembly if you want. But you are referring to Cosmos here, which is not built to do such things. Cosmos is designed to connect many blockchains and regarding CAP-Theorem favors consistency over availability. For such services like Twitter availability is very important, still this is not the main issue. The main issue is fees. For every transaction fees must be paid. The same is true for EOS. So if you want to build a “normal” program with a blockchain, I don’t think it makes sense to charge new users fees, in a currency they don’t have. In my opinion programs like Twitter will never be realized in Cosmos. A different story is tendermint, I think it makes sense to realize such things in tendermint and connect it to Cosmos. It will be a different blockchain, allowing for special transactions without fees, but it can (and therefore will be) connected to Cosmos. This is the reason why Cosmos or better say tendermint scales horizontally - you can create blockchains on the same technology and connect it to Cosmos, still able to do payment-crucial things in…

Excerpt (1199 of 2843 characters). Read the whole post on the forum ↗

LE
legaltechno
Sep 2018 1

Hi Prawda - how can I get in touch with you?

JA
jack
Sep 2018

You can always shoot us an email to [email protected]!

LE
legaltechno
Sep 2018

Thanks Jack! Quick one, do you know if it’s possible to use Plasma Cash with Ethermint to create an Ethereum sidechain?

NA
nagkumar
Oct 2019

Are there any good tutorials and smart contract recommended security guidelines to follow. any such info pointers would help

← Back to Discussions