Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.



Descargar para leer sin conexión

Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán

Descargar para leer sin conexión

What is a "Smart Contract"?
What Smart Contracts are useful for?
How to improve business processes using Smart Contracts?

Libros relacionados

Gratis con una prueba de 30 días de Scribd

Ver todo

Event Itnig - Smart Contracts by MarketPay, Juan Ignacio Pérez Sacristán

  1. 1. January 2017 Smart Contracts enabling the sharing economy Applied to mobile payments
  2. 2. • What is a "Smart Contract"? • A "Smart Contract" is NOT… • Do SCs have anything to do with Blockchain and Cryptocurrencies? • What Smart Contracts are useful for? • How to improve business processes using Smart Contracts? • MarketPay/LemonPay • Escrow Smart Contract • UnwiredApp: Instant Messaging Smart Contract enabling the sharing economy
  3. 3. Contracts & Computers 3 In 1958, the United States Department of Defense launched a computerized contract- management system that it dubbed Mechanization of Contract Administration Services, or MOCAS. Fifty-seven years later, it’s still going. Trillions of dollars have passed through the computational records in MOCAS. In its current form the system is managing roughly $1.3 trillion in obligations and 340,000 contracts.
  4. 4. What is a “Smart Contract"? 4 Para puristas: "La infraestructura de los smart contracts pueden ser implementados por registros de recursos replicados y la ejecución de los contratos pueden llevarse a cabo usando árboles Merkle los cuales funcionan mediante funciones hash criptográficas y la replicación de tolerancia a fallos bizantinos los cuales son una generalización del problema de los dos generales. Cada nodo en la red p2p actúa como un registro de propiedad y de fideicomiso o garantía, ejecutando los cambios de los titulares del contrato y comprobando automáticamente las reglas que impone la transacción, y comprueba también el mismo trabajo de los otros nodos." A smart contract, also known as a cryptocontract, is a computer program that directly controls the transfer of digital currencies or assets between parties under certain conditions. A smart contract not only defines the rules and penalties around an agreement in the same way that a traditional contract does, but it can also automatically enforce those obligations.
  5. 5. What is a “Smart Contract"? Again… 5 The concept was first proposed by Nick Szabo as an automatism for transactions.
  6. 6. What is a “Smart Contract"? Again… 6 It is a piece of code stored in the Blockchain and can be called any moment by a user having enough funds in the form of crytocurrency, such as Ethers. --- Do Smart Contracts have anything to do with Blockchain and Cryptocurrencies?
  7. 7. Blockchains allows an application developer to create a distributed database that can be read by anyone, but can only be written to by consensus. A blockchain is a ledger of records arranged in data batches called blocks that use cryptographic validation to link themselves together. Put simply, each block references and identifies the previous block by a hashing function, forming an unbroken chain, hence the name. 7
  8. 8. What is a “Smart Contract"? Again… 8 To run the Smart Contract user have to pay a fee for gas consumption in Ethers (on Ethereum blockchain)
  9. 9. What is a “Smart Contract"? Again… 9 Solidity is the most used programming language to develop Smart Contracts on Ethereum. LLL, Serpent, and Solidity all can be used to write contracts but Solidity is the flagship language at the moment.
  10. 10. What is a “Smart Contract"? Again… 10 Every blockchain network node runs the code of the Smart Contract when called. The result (deterministic) is the same for all of them.
  11. 11. What is a “Smart Contract"? Again… 11 Out of gas: when transaction cost for a Smart Contract call is higher than fees sent, process stops and data is rollback. If you do not have the Ether to cover all the gas requirements to complete running your code, the processing aborts and all intermediate state changes rollback to the pre-transaction snapshot.
  12. 12. What is a “Smart Contract"? Again… 12 A Smart Contract is basically a set of if-then statements with only difference being that they directly control real assets (cryptocurrencies and tokens).
  13. 13. Marketpay team 13 ricard forn alejandro cabanillas francisco aréchaga beatriz amilibia ferran figueredo juan perez
  14. 14. • Users meet at the marketplace • Buyer or seller can start the transaction, introducing amount and address for shipping. • The counterpart is notified on his/her mobile phone and accepts the escrow transaction. • Buyer can ask for instant credit. • Seller pays the PSP fee. • The escrow payment is released automatically 24h after successful delivery. • Pay-out to the seller’s account is executed right away. LemonPay. Designed to facilitate the economic transaction between peers 14
  15. 15. 15 the escrow payment provider that enables marketplace revenue models
  16. 16. Secure escrow based transactions are core to the sharing economy: anonymity, compliance and agile business rules for marketplaces 16 Marketplaces, e-commerce websites and mobile apps must guarantee secure transactions between buyers and sellers. Marketpay covers all your operational cycle which includes: o Pay-in and pay-out transactions and wallet statements. o Agile escrow rules and payments upon delivery. Most countries require a banking license to handle money on behalf of third parties. Marketplaces cannot afford to break legal and regulatory requirements and Marketpay is the perfect partner that allows you to concentrate on your core business.
  17. 17. Marketpay value proposition 17 Good or service is offered on marketplace Search is made on listing app or website Deal is closed and escrow is placed through Marketpay Pay-out is executed to sellers bank account Delivery is confirmed and payment is released
  18. 18. Marketpay architecture Lemon Pay Mobile payments Nubelo Freelance Marketplace Gasport Petrol Payments YoVoy Events Organization … AuditLog gEth Node PayIn Sabadell TPV PayOut OpenAPI SQL Blockchain Ethereum Marketpay 18
  19. 19. A "Smart Contract" is NOT… 19 A Smart Contract is not a DApp, but just a part of it. A DApp consists of a user interface (usually a mobile App or a Web page) and a backend based on a Blockchain Smart Contract. So it is not possible to use Smart Contracts by themselves to develop Apps nor Web sites, but you may well create a distributed and decentralized database to feed those dummy interfaces. This give us the advantage to perform crytocurrency operations in a smart fashion, not to mention recording and querying data.
  20. 20. A "Smart Contract" is NOT… 20 A Smart Contract is not an Internet application: They cannot reach information outside the blockchain. Like decentralized code they can really only get pushes, they cannot pull. But because pushes and pulls can be inversed this is not a crippling limitation. - Ethereum by Henning Diedrich
  21. 21. A "Smart Contract" is NOT… 21 A Smart Contract is not "smart" nor "contract". When Nick Szabo created the concept of "Smart Contracts" they really were "smart", being capable of autorun and accomplish the job with no human intervention (trust middle-man role). Nevertheless, current smart contracts have no legal contractual effect. And they are not so smart as expected due to just being a set of if-else sentences with the capability to transact cryptocurrency and store/query records. Smart contracts will use code to reshape law. Blockchain consortium R3 contracts global law firm Norton Rose Fulbright to determine whether smart contracts have contractual enforceability.
  22. 22. Blockchain is not going to emerge in industry as a single platform, as was once imagined, but as a series of different blockchain platforms designed for different purposes. 22 Map of decentralized transaction ledgers BTC/XBT ETH XRP Hyperledger # of nodes 6,000 7,000 200 200 access Open Open Permission ed Permissioned blockTime 10m 14s 4s ~1ms smartContracts Script Solidity Codius Go
  23. 23. Marketpay auditLog Blockchain will make all kinds of transactions transparent, more reliable, and easier to audit without centralized processing. 23
  24. 24. LemonPay: escrows, while they can be conducted through a central agent, are increasingly being conducted through a smart contract on the Ethereum blockchain controlled by several independent agents. 24 BuyerSeller 3rd party logistics Smart Contract is just a phrase used to describe computer code that can facilitate the exchange of money, content, property, shares, or anything of value.
  25. 25. MarketPay escrow Smart Contract 25 // Data struct escrow { address buyer; address seller; address thirdParty; address recipient; uint amount; uint revokedByBuyer; uint revokedBySeller; uint revokedByThirdParty; uint releasedByBuyer; uint releasedBySeller; uint releasedByThirdParty; uint status; // 0 => non-existent 1 => started, 2 => revoked, 3 => paid } mapping (uint => escrow) escrows;
  26. 26. MarketPay escrow Smart Contract 26 function release(uint escrowId) returns (uint amount) { escrow e = escrows[escrowId]; if (e.status != 1) { return 0; } // started if (msg.sender == e.buyer) { e.releasedByBuyer = 1; } else if (msg.sender == e.thirdParty) { e.releasedByThirdParty = 1; } else if (msg.sender == e.seller) { e.releasedBySeller = 1; } else { return 0; } if (e.releasedByBuyer + e.releasedByThirdParty + e.releasedBySeller >= 2) { bool dummy = e.seller.send(e.amount); e.status = 3; // paid escrowRelease(e.seller, e.amount); // Log return e.amount; } else { ; } // To complete the process two parties must invoke the release. return 0; }
  27. 27. MarketPay escrow Smart Contract 27 Calling the Smart Contract
  28. 28. What Smart Contracts are useful for? 28 To avoid record tampering and identity spoofing: Today, we Google for everything, mostly information or products. Tomorrow, we will perform the equivalent of "googling" to verify records, identities, authenticity, rights, work done, titles, contracts, and other valuable asset-related processes. There will be digital ownership certificates for everything. Just like we cannot double spend digital money anymore (thanks to Satoshi Nakamoto’s invention), we will not be able to double copy or forge official certificates once they are certified on a blockchain. That was a missing piece of the information revolution, which the blockchain fixes.
  29. 29. What Smart Contracts are useful for? 29 To cut costs: • Blockchain technology could help the world’s largest investment banks cut their infrastructure costs by between $8 to $12 billion a year by 2025, according to a report by Accenture. As it creates a shared "golden record" of data that is virtually tamper-proof, it obviates the need for reconciliation and could prove a helpful resource for auditing. - • Finance-reporting costs could shrink by 70pc thanks to blockchain’s ability to optimize data and verification. Compliance costs could plummet by up to 50pc, thanks to "auditability". Other savings in support software for customer engagement procedures, as well as management procedures and office controls, could see the total saved at eight of the 10 largest investment banks top out at $12bn. - • …to cut bank infrastructure costs attributable to cross-border payments… These costs referred here are for carrying out certain functions at the desired destination points and at the desired authenticity, by trustworthy agents. -
  30. 30. What Smart Contracts are useful for? 30 To develop cryptocurrency/token processes : LaborX will serve as a decentralized marketplace where people in real-world professions will be able to sell labor-hours to anyone. LH (Labor Hour) tokens act as a substitute for payments enabling users to be rewarded for their work without cryptocurrency’s signature volatility risk. LH tokens can be bought and sold by companies to secure professional services, as well as by crypto traders who want to hedge their earnings in a stable, inflation-proof token. -
  31. 31. What Smart Contracts are useful for? 31 To raise finance fast through ICOs : • Golem: You can rent the unused cycles of your CPU or GPU to other people so they can use it to do work. They will pay you GNT in exchange. Alternately, if you need to do computation and don't have a CPU or GPU that's appropriate, you can rent those from others, and pat them in GNT. Total created: 1,000,000,000 GNT Funds raised: 820,000 ETH / 100% of cap - - - • MillionEther: A total of 1 million pixels are available for purchase. Advertisers can buy as much or as little ad space as they need, with the price per pixel starting at 0.01 ETH. Early birds may want to take advantage of this offer as soon as possible, as prices will go up as more pixels are sold. -
  32. 32. What Smart Contracts are useful for? 32 Be careful with blockchain ICOs!: Companies behind these ICOs are promising the moon and the stars, putting out polished websites, white papers, advisory boards, Slack channels, GitHubs, peppering with some legalese language, and topping it with the full dressing support enchilada they can think of; in order to appear as legitimate, as hard-working, as smart and as credible as possible. The 3 typical characteristics, team, product and market seem to have taken a secondary position to the 3 new magical words: tokens, blockchain and decentralization. The token is not the business model. The value proposition or utility that is enabled by the token is the business model, and that linkage needs to be there early on. If the direction is not right, the chosen path will not lead to a good place. A smart company would not release more funding to itself until milestones are reached… -
  33. 33. What Smart Contracts are useful for? 33 To decentralize the new sharing economy: Don Tapscott, author of "Blockchain Revolution" says that the technology underlying Bitcoins could be used to disrupt the likes of Uber and Airbnb.
  34. 34. What Smart Contracts are useful for? 34 Unfortunately, it lost around $50m after someone hacked one of the contracts. The Ethereum Foundation then had to create a "hard fork" of its own blockchain to try and get the money back, but some people didn’t follow along, resulting in a new Ethereum blockchain and a Coca Cola-style Ethereum Classic. Governance-wise, it was complete carnage. Not so fast, buddy! The DAO, the ill-fated organization created on the Ethereum blockchain last year, it was hailed as a new development in autonomous, self-governing corporations. Instead of relying on central parties such as lawyers, accountants or a board for its governance structure, it used smart contracts, which were designed to handle things like voting and the unlocking of funds for contractors.
  35. 35. How to improve business processes using Smart Contracts? 35 Trustless consensus: By removing middleman (disintermediation) we cut costs and simplify business processes. Immutability: Prior to blockchain, immutability existed in closed systems, through the benevolence of a custodian. Bye bye to backups and data lost. Security: No more worries about someone hacking the system. It is not possible anymore. Just focus on keeping secret your private keys and don't lose them.
  36. 36. How to improve business processes using Smart Contracts? 36 Maybe there is not much difference for the end user between paying using VISA or Bitcoins, or between triggering a process by calling an API or a Smart Contract. But who knows if current systems (VISA, APIs) become deprecated and replaced by decentralized systems (cryptocurrencies and smart contracts) in a medium-short term, forcing us to update our business processes to avoid losing customers and partners. Why Facebook instead of Orkut? Why Microsoft instead of Linux? (Desktop) Critical mass: In social dynamics, critical mass is a sufficient number of adopters of an innovation in a social system so that the rate of adoption becomes self-sustaining and creates further growth. Network effect: In economics and business, a network effect (also called network externality or demand-side economies of scale) is the effect that one user of a good or service has on the value of that product to other people. When a network effect is present, the value of a product or service is dependent on the number of others using it
  37. 37. UnwiredApp Smart Contract 37 A Smart Contract records messages related to a given user (wallet). Messages can only be read by the recipient (Blockchain ensures that only the recipient wallet has access to this information). Through a mobile/web interface a user with an Ethereum wallet will be able to read and write messages onto the Smart Contract, achieving this way a full DApp. This same idea can be extended to guaranteed delivery messaging systems, in such a way to make it possible to audit whether a given message has been really sent and read by its recipient or not. Maybe Smart Cities are going to need a mechanism to make secure in a decentralized fashion the transfer of messages among officials or even citizens. Pitch Video at
  38. 38. UnwiredApp Smart Contract 38 contract marketpayUnwiredApp is mortal { uint256 public countMessage; struct mess { uint256 idMessage; uint256 idPrevious; uint256 timestamp; address from; string message; } /* structure messages[to][idMessage] */ mapping (address => mapping (uint256 => mess) ) public messages;
  39. 39. Thanks! Francisco Aréchaga +34 630 95 94 85 Juan Ignacio Pérez +34 634 14 65 08 Ricardo Forn Palacin +34 609 85 83 44
  • AuroraLpezGarca

    Feb. 3, 2017
  • hossimin

    Feb. 3, 2017
  • lucialander

    Jan. 29, 2017
  • JuanIgnacioPrezSacri

    Jan. 26, 2017 What is a "Smart Contract"? What Smart Contracts are useful for? How to improve business processes using Smart Contracts?


Total de vistas


En Slideshare


De embebidos


Número de embebidos









Me gusta