# What are the differences between Qubic smart contracts and Ethereum smart contracts?

I would like to know the differences between Qubic smart contracts and Ethereum smart contracts (for example: Turing-completeness, oracle-like behaviors...).

• Let's wait for the whitepaper before speculating wildly here...
– mihi
Jun 5, 2018 at 18:58

One main difference in the language: Abra is a functional language (source : "Qubic tasks are specified using an intermediate trinary-based functional programming language called Abra.") and Solidity (main language for Ethereum smart contract) is a classical procedural language.

Writing a formal proof (i.e. a mathematical proof) that a program is correct is extremely difficult for a procedural language. But for a functional language: it is just difficult.

We have seen major bugs is smart contracts written in Solidity (the DAO bug and the parity bug). This kind of bug affect the trust of users. A smart contract with a formal proof of correctness can be trusted.

The drawback is of course that functional programming is far more difficult to write (everything is a function, there is no state, just input and output with a mathematical definition of the relation between them) and writing a formal proof requires solid mathematical skills. But in the end, a functional program with it's formal proof can be trusted.

• Keep in mind that a formal proof of correctness will only prove that the program will adhere to the preconditions, postconditions and invariants you want to prove. There is no way to formally prove that a program is doing "what you expect it to do". There have been numerous examples of sorting programs that were proven "correct", but the invariants were too weak to guarantee sorting how the user expected.
– mihi
Jun 5, 2018 at 19:01
• Therefore, for small programs (like smart contracts should be), having thorough audit by several parties is likely to be more effective in finding bugs than formal proofs.
– mihi
Jun 5, 2018 at 19:02

Qubic smart contracts will be run by a handful of nodes or limited subset of iota nodes, while

Ethereum smart contracts are run by all the nodes.

This difference in design is independent of any implementation details which will follow up.

• Do you have any source for what you claim for how Qubic contracts will work? Jul 21, 2018 at 7:56
• Main source is qubic.iota.org, what is your question? Qubics by design are not run on all nodes. You bind your oracle to an assembly. How many nodes run a decentralized processing depends on users/nodes and economic incentive Jul 21, 2018 at 9:37
• I don't have a question but you are not backing up what you're saying. Your answer could be improved if you had something to link to. Maybe quote some section where a description of qubic contracts is. Jul 21, 2018 at 15:28