Smart Contracts in MaidSAFE

I know I ask a lot of questions to you guys but I’m trying to wrap my mind around what’s possible with the MaidSafe network. Can Smart Contracts function on the MAIDSafe network? I heard talk that Ethereum wanted to build on here, but would it be hypothetically possible to create smart contracts for safecoins?

1 Like

I believe it is yes. Not sure as to the details as to how but yes I believe maidsafe does support smart contracts.

Lol…I’m noticing that rarely does anyone have the specific details on here. I gotta say. I love the broad outline and concept. I absolutely hate the lack of details proliferated.

I don’t know what Project members think, but to me there’s no lack of details on Smart Contracts. The primary function of the network is not Smart Contracts, but MaidSafe (safe Internet based storage for everyone).
As MaidSafe matures, surely there will be other types of applications possible, but asking about Smart Contracts (especially in a very generic way) at this stage is in my opinion way too early.

Why would you want to run (generic) Smart Contracts on MaidSafe anyway?
The primary Smart Contract is that you pay (or get paid) to get (or provide) data storage service in exchange for Safe. If the Project could do this one thing well, for me that would be more than enough.

Yeah…that’s fair. They are focused on one big concept. I was thinking of smart contracts in terms of the sharing of said files. I’m trying to think about what if I wanted to share that file for only a set amount of time with another user, how then would I implement it?

Than you share it (check the video where they show “Lifestuff”) but there’s no blockchain and no consensus about time as far as I know. So after some time you have to un-share it yourself. I think at this moment is time Ethereum is more about contracts and blockchains etc. And Ethereum is more like “logging in” to a decentralized system where you can build and share website, store data and use coins which trade within a second. Ohw, and by the way, it will provide safe Email and Chat as well. So Maidsafe will provide a very big number of utilities in a way never done before. David and the team are quite active on this forum, but how do you explain all things at once on a technical level? Quite hard if you provide an alternative to Email, Chat, Storage, Bittorrent, Usenet, Dropbox, Youtube, Facebook, Bitcoin, Websites with servers all at once on a decentralized level.

We need to separate applications from infrastructure here. Safe net provides a communication network, storage upon it and a way to charge for the use of it (Safecoin). Pretty much everything else is just an application which builds something upon these foundations.

So, we can ask which applications are possible to build and which will be immediately available at launch. However, it is unfair to be dismissive of the technology just because there is a missing application.

Maybe ethereum will store their blockchain on safe net. Maybe they will create an application directly on top of safe net. Time will tell.

7 Likes

There is a smart contracts api in the beta release roadmap if that helps at all. And smart contracts will have good use besides storage and of course that is already taken care of

2 Likes

How exactly can we create smart-contracts using mutable and immutable data? Still trying to wrap my head around the idea.

1 Like

See here: Blockchain Vs Safe Network.(Smart Contracts) - #4 by dirvine

3 Likes

An example should make it easier

Let’s say you want to buy a Persian carpet from Iran from some online marketplace and you want to put your safecoins in escrow, but the third-party escrow provider doesn’t allow escrow for transactions to Iran because Donald Trump told them it would be used to finance terrorism.

You could then use a decentralized escrow service. That would work as follow

  1. You find the thing you want to buy and send a buy order to the buyer. Together with the order you send your safecoin to escrow by adding the seller as an owner to the safecoin and making it multisig so that any future ownership transfer of that safecoin would require the signature of both you and the seller. If you and the seller never agree to transfer the coins either to the seller or back to you the coins would effectively be lost.
  2. The seller sees the order and creates a new Mutable Data, let’s call it a reputation object. The reputation object contains some data, including a timestamp for a date when both parties needs to have signed the reputation object to signify that the trade has been completed. You look at the reputation object, see if you agree with the data and the timestamp and then sign it. Now both has signed the reputation object and it will be added to some index or something where other can find it.
  3. You receive the package and then sign the safecoin transfer to allow the seller to take the safecoin and sign the reputation object.
  4. The seller signs an ownership transfer of the safecoin and then has the money. After receiving the money the seller signs the reputation object.

At some point in the future, when someone else was going to trade with any of these parties, they would look up the reputation objects and calculate a reputation score. Unlike eBay or some centralized service, it would be up to the user what client software they want to use for calculating reputation score based on the reputation objects, so anyone could try come up with a new algorithm to decrease scamming.

The buyer could choose not to sign the safecoin transaction, in that case the money wouldn’t be transferred to the seller. In this case the buyer should add a note to the reputation object why the money wasn’t released from escrow. The buyer would not get the money back unless the seller also agreed. Users would in the future see that there was a dispute and use that information to calculate a risk of trading with those parties.

The thing here is that everything is basically peer to peer. There is a bit of business logic, but apart from the multi signature stuff, everything is just running of the client side of each user. The biggest risk of a seller by being dishonest is risking to lose reputation while the biggest risk of the buyer of being dishonest is risking losing the money.

4 Likes