Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NA - Introduction to Blockchain

Aletheia
January 30, 2018

NA - Introduction to Blockchain

Introduction to Bitcoin, cryptocurrencies, and blockchains with focus on smart contracts implementation

Aletheia

January 30, 2018
Tweet

More Decks by Aletheia

Other Decks in Technology

Transcript

  1. www.neosperience.com | blog.neosperience.com | [email protected] September 2017 Neosperience. The Digital

    Customer Experience. Blockchain, Cryptocurrencies and Smart Contracts: is our world gonna change (again)? 1
  2. aka don’t blame me if you loose your money Safe

    Harbor Statement Our discussion may include predictions, estimates or other information that might be considered forward-looking. While these forward-looking statements represent our current judgment on what the future holds, they are subject to risks and uncertainties that could cause actual results to differ materially. You are cautioned not to place undue reliance on these forward-looking statements, which reflect our opinions only as of the date of this presentation. Please keep in mind that we are not obligating ourselves to revise or publicly release the results of any revision to these forward- looking statements in light of new information or future events. Throughout today’s discussion, we will attempt to present some important factors relating to our business that may affect our predictions. You should also review our most recent Form 10-K and Form 10-Q for a more complete discussion of these factors and other risks, particularly under the heading “Risk Factors.” A PDF copy of our press release and financial tables which include a GAAP to non-GAAP reconciliation can be viewed and downloaded on the Oracle Investor Relations website at Oracle.com/investor.
  3. Agenda • Bitcoin explained to my mum • Trust and

    Blockchains • Bitcoin explained to an engineer • Bitcoin trading • Blockchain v2 • Smart contracts • Blockchain v3 • Blockchain and Regulation • ICO • Trading cryptocurrencies
  4. What is the Bitcoin? Keep it simple, the way you

    would explain it to my mother
  5. First, it’s not a currency What is Bitcoin (BTC)? It’s

    an exchange medium, subject to high volatility, perfectly defined by demand/offer mechanism Second, it’s not a FIAT money A mistery built into the currency It has some important differences: BTC creator is unknown, she/he used the pseudonym of Satoshi Nakamoto and is a virtual identity that published the first implementation of blockchain. • decentralized - no Federal Reserve or BCE to control BTC value • no inflaction - the overall number of BTC is fixed (21M) • no reversal - transactions cannot be reversed because become part of the trust • no real economy - BTC value is not
  6. An extension to Common Law Trust mechanism Trust Born as

    a fiduciary relation between two parties with a supervisor, it has been extended to almost every transaction that has to bee guaranteed by a third party. It borrows from Common Law the terminology: • Settlor - is the part that wants to contribute something to a beneficiary • Beneficiary - is the part receiving something from a Settlor • Protector - is an optional actor, that guarantees the trusted relation. If there is not a protector, the transaction is untrusted Duty of a Protector A Protector maintains and guarantees the consistency of the ledger, that is the source of truth. The trust must be within the Protector: a malicious or faulty protector can break the trust. Transactions can be trusted or untrusted • Trusted transactions can be verified • Trusted transactions cannot be reversed once registered • Trusted transactions require a place where are stored, called general ledger • The Protector is a key actor in a trusted transaction (cannot occur without)
  7. Untrusted transaction (Peer to Peer) Settlor Beneficiary Peer to peer

    transaction (untrusted) good to be exchanged • A good is exchanged between two actors • The good end of the transaction relies on both actor consensus about such transaction • Any actor can contest transaction • Even more difficult when extending to n participants
  8. Trusted transaction Settlor Beneficiary Intermediated transaction (trusted) Protector • A

    good is sent to the Protector, that stores it, partial transaction recorded into the ledger • The Protector sends the good to Beneficiary, transaction completion recorded into ledger • At any time, ledger can be consulted • Protector trustworthiness is given for granted (need a hierarchy of Protectors to transfer trust)
  9. Examples - Others Real Estate Each ownership transaction between a

    seller and a buyer of a real estate is executed by a third party that acts on government behalf to record and execute transfers Democracy When a proposal or a candidate is voted, a third party (a teller at a pool) is required to count and validate votes, then crediting scores to the corresponding competitor. Quality assurance When a certification is required to establish a statement of quality for a given product or service, an external organization (a certification company) is required to validate quality and provide trust information
  10. Issues with Protector Trustiness A protector must be certified itself

    as trustworthy, because it represents the source of truth of the transaction Scalability A protector is required for each transaction that must occur, moreover some additional effort is needed to guarantee ledger consistency across multiple transactions of the same good Cost Since Protector is a key role within a transaction and brings a lot of responsibility (and often bureaucracy) its work has to be payed a considerable amount of money, often proportional to the value of exchanged good Would be a peer-to-peer trusted transaction possible?
  11. just put a city on siege A fault tolerance problem

    Each division has its own commander/general who is backed by one or more lieutenants. Generals sends messages to litenants and to other divisions. A message can be either “attack” or “retire”
  12. Partial definition A definition of Blockchain… The blockchain is the

    technology running the bitcoin from Wikipedia A better definition A blockchain is a distributed database that maintains a continuously-growing list of records called blocks secured from tampering and revision The blockchain is a secured protocol enabling peer-to-peer exchanges on a distributed network in a secured, public and non repudiable way.
  13. A digital wallet Components of a simple transaction Originates or

    receives a transaction, in the form of a receipt, are expressed as digital number A Block within the blockchain Consensus and proof of work Blocks hold batches of valid transactions that are hashed and encoded into a Merkle tree (an hashed tree). Each block includes the hash of the prior block in the blockchain, linking the two. The linked blocks form a chain. This iterative process confirms the integrity of the previous block, all the way back to the original genesis block. Bitcoin’s blockchain achieves consensus through sequential cryptographic hashing of the transactions and the final ‘proof- of-work’ validation. A cryptographic hash function takes a message (transaction value) and converts it into an alphanumeric value. Hash functions are nearly impossible to invert thus the input value of a hash function can never be determined from its output value. Also, a small change to the input dramatically changes the output. In a blockchain protocol, the header of the latest block is a combined hash value of the set of latest transactions. To this combined hash number is appended a random number called the nonce.
  14. A BTC account What do you need to trade BTCs?

    Every transaction has a source and a destination which are numeric equivalents to traditional bank account numbers. An user can have one or more addresses (since their creation is as easy to click a button) A private/public key pair Each account is paired to a couple of keys. The BTC account is the hash of a public key. To recover and claim ownership of an account, you need the private key counterpart. Remember your keys are the only way an account can be recovered. There is no bank in the middle to guarantee your identity. A Wallet Many addresses can receive/send cryptocurrencies, to safely store key pairs, some tools, named “wallets” have been created. There are many wallets around, some of them are online but not reliable while others are physical and more safe top hold significant amounts of money (hardware wallets, paper wallets)
  15. You can buy them How can I obtain bitcoins? Cryptocurrencies

    can be traded on markets: websites that handle conversions, deposits and retrieval of cryptocurrencies. To be purchased a crypto currency needs to be listed on a given markets. Remember blockchain has never been hacked, but markets can be hacked (and have been).
  16. You can buy them How can I obtain bitcoins? Cryptocurrencies

    can be traded on markets: websites that handle conversions, deposits and retrieval of cryptocurrencies. To be purchased a crypto currency needs to be listed on a given markets. Remember blockchain has never been hacked, but markets can be hacked (and have been). You can mine them The process of transaction validation and proof of concept generation is called “Bitcoin mining”. Let’s have a deeper look…
  17. • BTC value ranged to hundreds of $ to tens

    of thousands $ in just few months • Volatility is still a pain in the ass of investors • Consider investing carefully and a small amount before having understood how it works • Be prepared to risk Will I be rich with Bitcoins? No, probably you’ll still have to work!!
  18. Can handle just receipts Limit of the first version of

    Blockchain The basic nature of blockchain can store within a block just the receipt of a given number of transactions, their timestamp, the hash pointing to the previous transaction and whatever is needed to build a PoW No logic can be leveraged on consensus Blockchain ensures trust, but any correlation between this trust and its applications must be done on untrusted channels (i.e. third party websites) thus creating some really dangerous security concerns. Blockchain v1 is good only for cryptocurrencies Even if the work of Satoshi Nakamoto shaped the future of distributed transactions, his implementation lacked the mechanism to secure them within the blockchain.
  19. Built on the same ground of Blockchain Blockchain v2 The

    structure of the ethereum blockchain is very similar to bitcoin's, in that it is a shared record of the entire transaction history. Every node on the network stores a copy of this history. but on steroids The big difference with blockchain v2 is that its nodes store the most recent state of each smart contract, in addition to all of the ether transactions. (This is much more complicated than described, but the text below should help you get your feet wet.) Ethereum is the blockchain v2 standard fork Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference.
  20. Ethereum • Forked from main BTC blockchain in 2014 by

    Vitalik Buterin • Contracts are deployed to Ethereum nodes and become part of the blockchain (every contract has an address) • Contracts run are payed with gas (representing computational power) • The unit of coin is called ether • Once a transaction is added to the blockchain, the corresponding contract is executed • Contracts can change ownership, ensure certification, etc.
  21. Built for developers Solidity - a language for smart contracts

    Solidity is a contract-oriented, high-level language for implementing smart contracts. It was influenced by C++, Python and JavaScript and is designed to target the Ethereum Virtual Machine (EVM). Designed as an OOP language A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. Solidity is statically typed, supports inheritance, libraries and complex user-defined types among other features. Contracts in Solidity are similar to classes in object-oriented languages. Each contract can contain declarations of State Variables, Functions, Function Modifiers, Events, Struct Types and Enum Types. Furthermore, contracts can inherit from other contracts.
  22. Chain specific Limit of the current version of Blockchain Each

    transaction within a blockchain is specific to its chain. There aren’t safe option to translate receipts from one to another in a robust and secure way. The only conversions are made by markets (and impact only on currencies) Globally distributed Consensus validation through PoC is done locally within a consensus pool, but blockchain update require to broadcast every change to other nodes, with a considerable overhead. There is no chain partition. Performances Current blockchains performs up to 20 transactions per second, becoming unsuitable for a range of applications.
  23. About performances Network Speed Fees Bitcoin 3 t/s avg congestion:

    ~10$ Ethereum 20 t/s avg congestion: ~ 0.8$ VISA 1700 t/s 1.4% - 2.4% transaction fee Facebook > 1000000 t/s Free
  24. IoT

  25. Speculation, speculation, speculation Blockchains and Cryptocurrencies Be aware of this

    market volatility, be savy, don’t waste your money. Prefer long-term commitment to begin, scale up with time and head to in-day trading in no less than six months. Start with BTC or ETH. Regulation is coming BTC <—> FIAT conversion is handled by markets that don’t have a jurisdiction. Regulators would prevent market instability due to high volume in cryptocurrencies transactions. Banks are dead Blockchain applications can overcome retail banks simply making them unnecessary to intermediate transactions. Banks cannot adopt blockchain in a reasonable amount of time due to innovative technologies involved.
  26. e-Government SmartContracts and Decentralized applications SmartContracs built by a government

    could ensure a huge reduction in costs, litigation and improve quality of bureaucracy for good. Democracy and voting processes could be affected too. Removing the main-in-the-middle Every time there is something that does intermediation, smart contracts on blockchain can remove a lot of friction and reduce costs. Trust management is a topic that can really shape the future of transactions, retail, purchases and payments. Serverless? Decentralized applications are truly serverless to their core, since there are no servers at all. Can be the next shift in paradigm.
  27. Something huge is coming Conclusions Blockchain and decentralized trust open

    a lot of possibility for improvements of consolidated processes that are the foundation of any modern state. but there is no a clear winner Applications range from shared computing power to AI, to e-Gov, to retail or payments. The next few years will see a lots of attempts and failures
  28. What is an ICO? Initial Coin Offers An Initial Coin

    Offering, also commonly referred to as an ICO, is a fundraising mechanism in which new projects sell their underlying crypto tokens in exchange for bitcoin and ether. It’s somewhat similar to an Initial Public Offering (IPO) in which investors purchase shares of a company. ICOs are a relatively new phenomenon but have quickly become a dominant topic of discussion within the blockchain community. Many view ICO projects as unregulated securities that allow founders to raise an unjustified amount of capital, while others argue it is an innovation in the traditional venture-funding model. T Are they a safe bet? Probably not. If you are an investor, you should avoid putting money in any ICO. If you’re the ICO holder, probably some police guy will be after you sooner or later.