Skip to content

Introduction

Stuart Farmer edited this page Aug 5, 2018 · 4 revisions

What is a Smart Contract?

A smart contract is a public piece of code that behaves predictably across all computers. This code is executed on a public distributed network that owners of the code do not have authoritative power over. This predictable nature allows parties that may not otherwise trust each other to engage in complex yet automated business behavior which opens up brand new sectors of efficiency.

Why do I need them?

If you are interested in creating applications that automate things such as identity, ownership, and access control, then you probably are interested in smart contracts. However, it's important to note that smart contracts are a slim subset of the programming sector. You should use them wisely and in specific application instances.

The Seneca Philosophy

We wrote Seneca to be an evolution of software development. Those who already know some programming can reuse the concepts that they know to pick up this new idea of public code. Comparatively, languages such as Solidity and Bitcoin Script require extensive knowledge of blockchain and their limitations to use effectively.

For example, this is how you invoke a method on a smart contract in Ethereum:

0xa9059cbb00000000000000000000000071511814fc09ac85b9d5d0d995e78a48049644c5000000000000000000000000000000000000000000000001f0e0a209aad60000

This payload can be broken up as the following components:

MethodID: 0xa9059cbb
[0]:  00000000000000000000000071511814fc09ac85b9d5d0d995e78a48049644c5
[1]:  000000000000000000000000000000000000000000000001f0e0a209aad60000

For the standard developer, how do you begin to understand what this means? How do you know what the MethodID correlates to? What are the arguments? What are their values? The serialization mechanisms of Ethereum are insanely obtuse.

For Bitcoin Scripts, it's even better. Here is an example of the standard transaction Bitcoin Script (yes, believe it or not, every transaction is actually a smart contract on Bitcoin!):

76a962e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac

Which translates to the Script of:

OP_DUP
OP_HASH160
62e907b15cbf27d5425399ebf6f0fb50ebb88f18
OP_EQUALVERIFY
OP_CHECKSIG
Clone this wiki locally