Smart Contracts

in

Title Text

The OG Blockchain

A peer-to-peer ​shared Public Ledger of Transactions grouped in a chain of immutable  Blocks proven & secured by Cryptography (merkle-trees and private keys) processed by a distributed consensus system (a.k.a "Mining") called Proof-of-Work

https://bitcoin.org/en/how-it-works

https://bitcoin.org/en/bitcoin-paper

Linked List + Pointers

It's all about the Transactions

The blockchain is a linked list which contains data and a hash pointer which points to its previous block, hence creating the chain. What is a hash pointer? A hash pointer is similar to a pointer, but instead of just containing the address of the previous block it also contains the hash of the data inside the previous block. This one small tweak, is what makes blockchains so amazingly reliable and trailblazing.

(Smart) Contracts in Bitcoin?

Besides PoW, there's other computation done when verifying transactions, enter: Bitcoin Script

 

Bitcoin Script is a simple, Forth-like, stack-based, reverse-polish, turing-incomplete programming language that enables the processing of transactions on the Bitcoin blockchain, relying heavily on UTXO* (unspent transaction ouput)

Basic Pay To PubKey Hash (P2PKH) transaction

(a.k.a. "pay to this Bitcoin address")

https://en.bitcoin.it/wiki/Script

  • Other examples:
    • Timestamping
    • ​​Multi-sig

Kind of...

  • Distributed public blockchain network
  • Use-case: track ownership of digital currency
    • ​bitcoin / ether

But....

  • Ethereum blockchain focuses on running arbitrary code of any decentralized application
    • smart contracts!

Is Ethereum similar to Bitcoin? ...

Ethereum Virtual Machine

Ethereum’s core innovation, EVM is a Turing complete machine on top of the blockchain

Smart Contracts

Self-executing computer code which runs on the blockchain when specific conditions are met to facilitate exchange of money, content, property, shares, or anything of value

Smart Contracts

Because smart contracts run on the blockchain, they run exactly as programmed without any possibility of censorship, downtime, fraud or third party interference

by example

Crowdfunding

ERC-20 TOKEN STANDARD

  • ICOs (Initial Coin Offerings)
  • DeFi
    • Stablecoins: MakerDAO (MKR/DAI), USDC, Tether (USDT)*
    • Derivatives: CompoundDAI (cDAI), Uniswap (UNI)
  • Advertising: Brave's Basic Attention Token (BAT)
  • Prediction Markets: Augur (REP)
  • Escrow
  • Digital Identity Management
  • ...

NFTs

(EIP-721 Non-fungible tokens)

An NFT is an asset verified using blockchain technology, a special type of cryptographic token which represents something unique

https://eips.ethereum.org/EIPS/eip-721

Smart Contracts in Bitcoin!

stackstoken.com

Thanks!

Blockchains &Smart Contracts

By Benjamin Orozco (benoror)

Blockchains &Smart Contracts

  • 1,104