Plain and Simple Smart Contracts

Definition

"Smart contracts are computer protocols that facilitate, verify, or enforce the negotiation or performance of a contract, or that make a contractual clause unnecessary." - Wikipedia

"Smart contracts are P2P state machines."
- Ira

P2P State Machine

Begin

Transform 1

State

2

Transform 2

State

3

Transform 3

End

Cancel

Red User

Green User

History & Types

Network (by age) Scripting Turing Complete Encrypted
Bitcoin Yes No No
Bitcoin (Omni) Yes Maybe No
Ethereum Yes Yes No
Bitcoin (RSK) Yes Yes No
Lisk, others Yes Yes No
Guld Yes Yes Yes
  • Scripting example is multi-sig.
  • Turing Complete means able to do any computer operation.
  • Encrypted for user defined objects and keyrings.

Guld Contracts

  • All data must be plain text files w/ PGP encrypt option.
  • All data stored in (SHA1 hash) git tree
  • All git commits PGP  signed w/ 2048+ bit RSA/DSA
  • Each git repo must define allowed states & transformations

Git Blocktree

How It Works

P2Pre-nup

        Penny                                               Pepe

<--    ,-"=-.             
<--   .       \           
<--   "='"=\   '	                          <--       (~ ~)
<--   `@] @'|   )                                 <--      q:0 0:p
<--   ) ` ' ),-`                                  <--       ((_))
<--    \^_,  \,                                   <--        'u'
<--      ,(\,/ )`-.       
                                                   "Cásate conmigo, Penny, I <3 u!"

"OK Pepe, but I want a pre-nup.
 If you can catch me,
 I will marry you.

 We will start at 5 spaces,
 and then each of us guesses odd or even
 for the commit hashes. Anyone correct moves.

 Every move must be PGP signed
 and stored in git.

 If distance is ever > 10, no marriage.
 If distance is ever = 0, marriage."

                                                "Ok, puede ganar la cara más rápida."

Round State Machine

Begin

Roll (move)
Commit

Rolled

Guess

Commit

Guessed

Reveal +

add hashes

Forfeit

End

Game State Machine

Begin

Round

Pepe
Win

Penny
Win

Distance?

>=10

<=0

1-9

Money Pool Demo!

  • Encrypted, distributed wallet.
  • Blockchain without a consensus algorithm
  • Simple smart contract
  • Proof of concept for fully encrypted guld blockchain

What is it?

PTY Hackathon

Plain & Simple Smart Contracts

By isysd

Plain & Simple Smart Contracts

  • 259
Loading comments...

More from isysd