Advertisement
Guest User

Untitled

a guest
Oct 1st, 2019
1,827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.73 KB | None | 0 0
  1. Blockchain is a shared, trusted, public ledger of transactions, that everyone can inspect but which no
  2. single user controls. It is a distributed database that maintains a continuously growing list of transaction
  3. data records, cryptographically secured from tampering and revision.
  4.  
  5. It allows us to trust the outputs of the system without trusting any actor within it.
  6.  
  7. A Blockchain protocol operates on top of the Internet, on a P2P Network of computers that all run the
  8. protocol and hold an identical copy of the ledger of transactions, enabling P2P value transactions without
  9. a middleman though machine consensus. Blockchain itself a file - a shared and public ledger of
  10. transactions that records all transactions from the genesis block (first block) until today.
  11.  
  12. The ledger is built using a linked list, or chain of blocks, where each block contains a certain number of
  13. transactions that were validated by the network in a given timespan. The crypto-economic rulesets of the
  14. blockchain protocol (consensus layer) regulate the behavioral rulesets and incentive mechanism of all
  15. stakeholders in the network.
  16.  
  17. BLOCKCHAIN TECHNOLOGY HANDBOOK------------------------------------> TEXT FROM IMAGES
  18.  
  19. This ledger runs on a Peer-to-Peer (P2P) network of computers. Distributed consensus based on economic
  20. incentive mechanisms (game theory) combined with cryptography allows for secure P2P validation of
  21. transactions, thus bypassing the need for traditional trusted third parties.
  22.  
  23. Removing the Middleman
  24. Instead of a single trusted third party validating transactions through their servers with authority (single
  25. vote), a peer to peer network of computers running the blockchain protocol validates transactions by
  26. consensus (majority vote). The blockchain protocol, therefore, formalizes pre-defined consensus rules for
  27. approving transactions on the P2P network, as hard-coded governance rules, managing and auto enforcing
  28. transactions of all participants in the network.
  29.  
  30. Smart Contracts
  31. Blockchain was initially designed for P2P money only. But it soon showed the potential to be used for any
  32. kind of P2P value transaction on top of the Internet. The Ethereum project thus introduced the idea of
  33. decoupling the contract layer from the blockchain layer, where the ledger itself is used by smart contracts
  34. that trigger transactions automatically when certain pre-defined conditions are met. By decoupling the
  35. smart contract layer from the blockchain layer, blockchains like Ethereum aim to provide a more flexible
  36. development environment than the Bitcoin blockchain.
  37. These smart contracts are a piece of code running on top of a blockchain network, where digital assets are
  38. controlled by that piece of code implementing arbitrary rules. They have properties of contractual
  39. agreements but should not be confused with legal contracts.
  40. If and when all parties to the smart contract fulfill the pre-defined arbitrary rules, the smart contract will
  41. auto execute the transaction. These smart contracts aim to provide transaction security superior to
  42. traditional contract law and reduce transaction costs of coordination and enforcement.
  43. With blockchains and smart contracts we can now imagine a world in which contracts are embedded in
  44. digital code and stored in transparent, shared databases, where they are protected from deletion,
  45. tampering, and revision.
  46. In this world every agreement, every process, task and payment would have a digital record and signature
  47. that could be identified, validated, stored, and shared.
  48. Intermediaries like lawyers, brokers, and bankers, and public administrators might no longer be necessary.
  49. Individuals, organizations, machines, and algorithms would freely transact and interact with one another
  50. with little friction and a fraction of current transaction costs.
  51.  
  52. PC isolati -> trasferimento dati a mano -> internet (client server) -> distributed
  53.  
  54. POF: trusted entity
  55.  
  56. While Blockchain is
  57. a great P2P way to record who did what and when, it is not ideal for storing large amounts of data, for two
  58. reasons: (1) scalability: blockchains are too slow, and (2) doesn't allow privacy by design: never store
  59. private data on the Blockchain.
  60. ARE BLOCKCHAIN LIKE CITIES?
  61.  
  62. Private institutions like banks realized that they could use the core idea of blockchain as a distributed
  63. ledger technology (DLT), and create a permissioned blockchain (private of federated), where the validator
  64. is a member of a consortium or separate legal entities of the same organization. The term blockchain in
  65. the context of permissioned private ledger is highly controversial and disputed. This is why the term
  66. distributed ledger technologies emerged as a more general term.
  67.  
  68. Private blockchains are valuable for solving efficiency, security and fraud problems within traditional
  69. financial institutions, but only incrementally. It's not very likely that private blockchains will revolutionize
  70. the financial system. Public blockchains, however, hold the potential to replace most functions of
  71. traditional financial institutions with software, fundamentally reshaping the way the financial system
  72. works.
  73.  
  74. Public Blockchains
  75. State of the art public Blockchain protocols based on Proof of Work (PoW) consensus algorithms are open
  76. source and not permissioned. Anyone can participate, without permission. (1) Anyone can download the
  77. code and start running a public node on their local device, validating transactions in the network, thus
  78. participating in the consensus process – the process for determining what blocks get added to the chain
  79. and what the current state is. (2) Anyone in the world can send transactions through the network and
  80. expect to see them included in the blockchain if they are valid. (3) Anyone can read transaction on the
  81. public block explorer. Transactions are transparent, but anonymous/pseudonumous.
  82. Effects:(1) Potential to disrupt current business models through disintermediation. (2) No infrastructure costs: No need to
  83. maintain servers or system admins radically reduces the costs of creating and running decentralized applications (dApps).
  84.  
  85. Federated Blockchains or Consortium Blockchains
  86. Federated Blockchains operate under the leadership of a group. As opposed to public Blockchains, they
  87. don't allow any person with access to the Internet to participate in the process of verifying transactions.
  88. Federated Blockchains are faster (higher scalability) and provide more transaction privacy. Consortium
  89. blockchains are mostly used in the banking sector. The consensus process is controlled by a pre-selected
  90. set of nodes; for example, one might imagine a consortium of 15 financial institutions, each of which
  91. operates a node and of which 10 must sign every block in order for the block to be valid. The right to read
  92. the blockchain may be public, or restricted to the participants.
  93. Effects : (1) reduces transaction costs and data redundancies and replaces legacy systems, simplifying document handling and
  94. getting rid of semi manual compliance mechanisms. (2) in that sense it can be seen as equivalent to SAP in the 1990's: reduces
  95. costs, but not disruptive.
  96. Note : Some would argue that such a system is not a blockchain. Also, Blockchain is still in it's early stages. It is unclear how the
  97. technology will pan out and will be adopted. Many argue that private or federated Blockchains might suffer the fate of Intranets
  98. in the 1990's , when private companies built their own private LANs or WANs instead of using the public Internet and all the
  99. services, but has more or less become obsolete especially with the advent of SAAS in the Web2.
  100.  
  101. Private Blockchains
  102. Write permissions are kept centralized to one organization. Read permissions may be public or restricted
  103. to an arbitrary extent. Example applications include database management, auditing, etc. which are
  104. internal to a single company, and so public readability may in many cases not be necessary at all. In other
  105. cases public audit ability is desired. Private blockchains are a way of taking advantage of blockchain
  106. technology by setting up groups and participants who can verify transactions internally. This puts you at
  107. the risk of security breaches just like in a centralized system, as opposed to public blockchain secured by
  108. game theoretic incentive mechanisms. However, private blockchains have their use case, especially when it
  109. comes to scalability and state compliance of data privacy rules and other regulatory issues. They have
  110. certain security advantages, and other security disadvantages (as stated before).
  111. Effects : (1) reduces transaction costs and data redundancies and replaces legacy systems, simplifying document handling and
  112. getting rid of semi manual compliance mechanisms. (2) in that sense it can be seen as equivalent to SAP in the 1990's: reduces
  113. costs, but not disruptive.
  114. Note : Some would argue that such a system is not a blockchain. Also, Blockchain is still in it's early stages. It is unclear how the
  115. technology will pan out and will be adopted. Many argue that private or federated Blockchains might suffer the fate of Intranets
  116. in the 1990's , when private companies built their own private LANs or WANs instead of using the public Internet and all the
  117. services, but has more or less become obsolete especially with the advent of SAAS in the Web2.
  118.  
  119. State of the art public blockchains currently have a scalability issue, which means that the network can
  120. only handle a few transactions per second, which makes them unfeasible for large scale applications with
  121. high transaction volumes. Bitcoin and Ethereum can only handle less than a dozen transactions per
  122. second, yet Visa alone would require 100k transactions per second at peak times.
  123.  
  124. The Bitcoin Blockchain is a game changer, because it is public and permissionless. Anyone in the world can
  125. download the open source code, and can start verifying transaction, being rewarded with bitcoin, through
  126. a concept called mining.
  127. All stakeholders in the bitcoin network, who do not know and trust each other, are coordinated through an
  128. economical incentive framework pre-defined in the protocol and auto enforced by machine consensus of
  129. the P2P Network. The smart contract in the blockchain protocol therefore provides an coordination
  130. framework for all network participants, without the use of traditional legal contracts. In private and
  131. permissioned blockchain, all network participants validating transactions are known. Bilateral or
  132. multilateral legal agreements provide a framework for trust, not the code.
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. Cryptoeconomics refers to as the study of economic interaction in adversarial environments. The
  141. underlying challenge is that in decentralized P2P systems, that do not give control to any centralized
  142. party, one must assume that there will be bad actors looking to disrupt the system. Cryptoeconomic
  143. approaches combine cryptography and economics to create robust decentralized P2P networks that thrive
  144. over time despite adversaries attempting to disrupt them. The cryptography underlying these systems is
  145. what makes the P2P communication within the networks secure, and the economics is what incentivizes all
  146. actors to contribute to the network so that it continues to develop over time.
  147. Before the advent of Bitcoin, it was commonly believed to be impossible to achieve fault tolerant and
  148. attack resistant consensus among nodes in a P2P network ( Byzantine General’s Problem ). Satoshi
  149. Nakamoto introduced economic incentives to a P2P Network and solved that problem in the Bitcoin White
  150. Paper published in 2008. While decentralized P2P systems based on cryptography were nothing new – see
  151. Kazaa and BitTorrent – what these P2P systems before Bitcoin lacked was economic incentive layer for
  152. coordination of the network of participants. Satoshi’s implementation of a Proof of Work (POW)
  153. consensus mechanism introduced a new field of economic coordination game, now referred to as
  154. cryptoeconomics.
  155.  
  156.  
  157. GAP TILL TOKENS
  158.  
  159. Tokens
  160. Native tokens of state of the art public & permissionless Blockchains like Bitcoin or Ethereum, are part of
  161. the incentive scheme to encourage a disparate group of people who do not know or trust each other
  162. organize themselves around the purpose of a specific blockchain.
  163.  
  164. These blockchain based cryptographic tokens enable "distributed Internet tribes" to emerge. As opposed
  165. to traditional companies that are structured in a top manner with many layers of management
  166. (bureaucratic coordination), blockchain disrupt classic top down governance structures with decentralized
  167. autonomous organizations (DAOs), where a group of people bound together not by a legal entity and
  168. formal contracts, but instead by cryptographic tokens (incentives) and fully transparent rules that are
  169. written into the software
  170.  
  171. The Bitcoin Network can be seen as the first true DAO that provides an infrastructure for money without
  172. banks and bank managers and has stayed attack resistant as well as fault tolerant since the first block was
  173. created in 2009. No central entity controls Bitcoin. In theory, only a worldwide power outage could shut
  174. down Bitcoin.
  175.  
  176. With the advent of Ethereum however, tokens have moved up the technology stack and can now be issued
  177. on the application layer as dApp tokens or DAO tokens. Smart contracts on the Ethereum Blockchain
  178. enable the creation of tokens with complex behaviors attached to them. Today, the token concept is
  179. central to most social and economic innovations developed with blockchain technology.
  180.  
  181. Only permissionless ledgers (public Blockchains like Bitcoin or Ethereum), need some sort of incentive
  182. mechanism to guarantee that block validators do their job according to the predefined rules. In
  183. permissioned (federated/consortium/private) distributed ledger systems, validators and block-creators
  184. may be doing their job for different reasons: i.e., if they are contractually obligated to do so. In
  185. permissioned environments, validators can only be members of the club and are manually and centrally
  186. controlled. Permissioned ledgers, therefore, don’t need a token. Also, please note that the term
  187. blockchain in the context of such ledgers is highly controversial.
  188.  
  189. Type of Tokens
  190. There are different ways to differentiate between tokens. Some of them are outlined below. Please note
  191. that Crypto Economics is so new, that we are still in the early stages of exploring different roles and types
  192. of tokens. With every new Blockchain and every new application layer we will collectively learn by trial and
  193. error of what works and what not.
  194. -Usage tokens: A token that is required to use a service. Bitcoin and Ether are the best examples of
  195. usage tokens — token ownership does not give you any specialized rights within the network, but
  196. it does give you access to the service (the Bitcoin payment network and the Ethereum Virtual
  197. Machine in the case of BTC and ETH). Scarce tokens combined with a useful service can create
  198. massive value for token holders and entrepreneurs.
  199. -Work tokens: A token that gives users the right to contribute work to a decentralized network or
  200. DAO (whether on blockchain level or smart contract level) and earn in exchange for their work.
  201. That work can be serving as an oracle (in the case of Augur ), being the backstop in a collateralized
  202. debt system (in the case of Maker ), or securing the network (in the case of Ethereum when it
  203. switches to proof of stake).
  204. These two types of tokens are not mutually exclusive and some tokens serve as both: usage tokens and
  205. work tokens. An example of a token with both characteristics will be ETH when Ethereum transitions from
  206. proof of work to proof of stake . Another way to differentiate between tokens is:
  207. -Intrinsic, Native or Built-in Tokens: of blockchains like Bitcoin, Ether, etc that serve as: (a) block
  208. validation incentives (‘miner rewards’); and (b) transaction spam prevention. The logic behind this
  209. is that if all transactions are paid, it limits the ability to spam.
  210. - Application Tokens: With Ethereum, tokens can now easily be issued on the application layer
  211. through smart contracts on the Ethereum Blockchain as so-called complex dApp tokens or
  212. complex DAO tokens.
  213. - Asset-backed tokens: that are issued by a party onto a blockchain for later redemption. They are
  214. the digital equivalent to physical assets. They are claims on an underlying asset (like the gold), that
  215. you need to claim from a specific issuer (the goldsmith). The transactions as tokens get passed
  216. between people are recorded on the blockchain. To claim the underlying asset, you send your
  217. token to the issuer, and the issuer sends you the underlying asset.
  218.  
  219. Smart Contracts
  220. A smart contract is a computer code running on top of a blockchain containing a set of rules under which
  221. the parties to that smart contract agree to interact with each other. If and when the pre-defined rules are
  222. met, the agreement is automatically enforced. The smart contract code facilitates, verifies, and enforces
  223. the negotiation or performance of an agreement or transaction. It is the simplest form of decentralized
  224. automation. It is a mechanism involving digital assets and two or more parties, where some or all of the
  225. parties deposit assets into the smart contract and the assets automatically get redistributed among those
  226. parties according to a formula based on certain data, which is not known at the time of contract initiation.
  227.  
  228. The term smart contract is a bit unfortunate since a smart contract is neither smart nor are they to be
  229. confused with a legal contract:
  230. - A smart contract can only be as smart as the people coding taking into account all available
  231. information at the time of coding.
  232. - While smart contracts have the potential to become legal contracts if certain conditions are met,
  233. they should not be confused with legal contracts accepted by courts and or law enforcement.
  234. However, we will probably see a fusion of legal contracts and smart contracts emerge over the
  235. next few years as the technology becomes more mature and widespread and legal standards are
  236. adopted.
  237.  
  238. Slashing Transactions Costs
  239. Would you enter into a contract with someone whom you’ve never met? Would you agree to lend money
  240. to some farmer in Ethiopia? Would you become an investor in a minority-run newspaper in a war zone?
  241. Would you go to the hassle of writing up a legal binding contract for a $5 purchase over the internet? For
  242. most people the answer would be no, as the transaction costs for these examples exceed the value
  243. transferred.
  244. The term smart contract proceeds blockchains and was first proposed by Nick Szabo in 1996. The aim is to
  245. provide security that is superior to traditional contract law and to reduce other transaction costs
  246. associated with contracting. Auto enforceable code – whether on the protocol level or on the application
  247. level – standardizes transaction rules, thus reducing the transaction costs of:
  248. - Reaching an agreement
  249. -Formalization
  250. - Enforcement
  251. A smart contract can formalize the relationships between people, institutions and the assets they own.
  252. The transaction rulesets (agreement) of the smart contract define the conditions – rights and obligations –
  253. to which the parties of a protocol or smart contract consent. It is often predefined, and agreement is
  254. reached by simple opt-in actions. This transaction rule set is formalized in digital form, in
  255. machine-readable code (formalization). These rights and obligations established in the smart contract can now be automatically executed by a computer or a network of computers as soon as the parties have
  256. come to an agreement and met the conditions of the agreement (enforcement).
  257.  
  258. Although the concept of smart contracts is not new, blockchain technologies seem to be the catalyst for
  259. smart contract implementation. The most primitive form of a smart contract is a vending machine. The
  260. rules of a transaction are programmed into a machine. You select a product by pressing a number related
  261. to that product, insert the coins, the machine acts as a smart contract checking whether you inserted
  262. enough money. If yes, the machine is programmed to eject the product, and if you inserted too much
  263. money, it will also eject the change. If you didn’t insert enough money, or if the machine ran out of the
  264. money, you will get your change back. Automatic vending machines not only slashed transaction costs by
  265. making human vendors obsolete, but they also expanded service, offering 24/7 availability instead of
  266. limited opening hours of a kiosk.
  267.  
  268. Smart contracts are capable of tracking performance in real time and can bring tremendous cost savings.
  269. Compliance and controlling happen on the fly. In order to get external information, a smart contract needs
  270. information oracles , which feed the smart contract with external information that can trigger transactions.
  271. Oracles:
  272. Oracles feed the smart contract with external information that can trigger predefined actions of the smart contract. This external data stems either from so ware (Big-data application) or hardware (Internet-of-Things). Such a condition could be any data, like weather temperature, successful payment, or price fluctuations. However, it is important to note that a smart contract does not wait for the data from an outside source to ow into the system. The contract has to be invoked, which means that one has to spend network resources for calling data from the outside world. This induces network transaction costs. In the case of Ethereum, this would be “gas.”
  273. Software Oracles
  274. handle information data that originates from online sources, like temperature, prices of commodities and goods, flight or train delays, etc. The so ware oracle extracts the needed information and pushes it into the smart contract.
  275. Hardware Oracles
  276. Some smart contracts need information directly from the physical world, for example, a car crossing a barrier where movement sensors must detect the vehicle and send the data to a smart contract, or RFID sensors in the supply chain industry.
  277. Inbound Oracles
  278. provide data from the external world.
  279. Outbound Oracles
  280. provide smart contracts with the ability to send data to the outside world. An example would be a smart lock in the physical world, which receives payment on its blockchain address and needs to unlock automatically.
  281. Consensus-based Oracles
  282. get their data from human consensus and prediction markets like Augur and Gnosis. Using only one source of information could be risky and unreliable. To avoid market manipulation, prediction markets implement a rating system for oracles. For further security, a combination of different oracles may be used, where, for example, three out of ve oracles could determine the outcome of an event.
  283. The main challenge with oracles is that people need to trust these outside sources of information, whether they come from a website or a sensor. Since oracles are third-party services that are not part of the blockchain consensus mechanism, they are not subject to the underlying security mechanisms that this public infrastructure provides. One could replicate “man-in-the-middle attacks” standing between contracts and oracles.
  284. The robustness assurance of this “second layer” is of utmost importance. Different trusted computing techniques can be used as a way of solving these issues. However, this topic will need more attention, as secure oracles are a bottleneck for smart contract security. If oracle security is not adequately provided, it will be a show stopper for widespread smart contract implementation.
  285. Oracles
  286. An oracle, in the context of blockchains and smart contracts, is an agent that finds and verifies real-world
  287. occurrences and submits this information to a blockchain to be used by smart contracts.
  288. Smart contracts contain value and only unlock that value if certain pre-defined conditions are met. When a
  289. particular value is reached, the smart contract changes its state and executes the programmatically
  290. predefined algorithms, automatically triggering an event on the blockchain. The primary task of oracles is
  291. to provide these values to the smart contract in a secure and trusted manner.
  292. Blockchains cannot access data outside their network. An oracle is a data feed – provided by third party
  293. service – designed for use in smart contracts on the blockchain. Oracles provide external data and trigger
  294. smart contract executions when pre-defined conditions meet. Such condition could be any data like
  295. weather temperature, successful payment, price fluctuations, etc.
  296. Oracles are part of multi-signature contracts where for example the original trustees sign a contract for
  297. future release of funds only if certain conditions are met. Before any funds get released an oracle has to
  298. sign the smart contract as well.
  299.  
  300.  
  301.  
  302. Smart Contract Example
  303. If A and B don’t know and don’t trust each other, they usually need a trusted third party to serve as an
  304. intermediary to verify transactions and enforce them. With smart contracts & blockchains, you don’t need
  305. those trusted intermediaries anymore for clearing or settlement of your transactions. Take the example of
  306. buying and selling a car: If Alice wants to purchase a car from Bob, a series of trusted third parties are
  307. required to verify and authenticate the deal. The process differs from country to country but always
  308. involves at least one, but usually more, trusted third parties: motor vehicle registration authority, in
  309. combination with a notary and/or insurance company. It is a complicated and lengthy process, and
  310. considerable fees for these middlemen apply.
  311. On the Blockchain, once all involved authorities and companies are on a blockchain, a smart contract could
  312. be used to define all the rules of a valid care sale. If Alice wanted to buy the car from Bob using a smart
  313. contract on the blockchain, the transaction would be verified by each node in the Blockchain Network to
  314. see if Bob is the owner of the car and if Alice has enough money to pay Bob.
  315. If the network agrees that both conditions are true, Alice automatically gets the access code to the smart
  316. lock for the garage. The blockchain registers Alice as the new owner of the car. Bob has € 20,000 more on
  317. his account, and Alice € 20,000 less. No middlemen required. On the Blockchain, who owns what is
  318. transparent and at the same time anonymous or pseudonymous. This means that every computer running
  319. the blockchain protocol could check whether a certain person is the rightful owner of the car or not.
  320. Stealing cars won’t be as easy as today, especially once we have smart keys granting access control
  321. verified on the blockchain, to unlock our future vehicles. As the owner of the car, you could authorize
  322. other people to drive it (stating the public key of the respective individual). In such cases opening the car
  323. would only be possible with a smart key on the Blockchain.
  324. Types of Smart Contracts
  325. Blockchain and smart contracts have the potential to disrupt many industries. Use cases can be found in
  326. banking, insurance, energy, e-government, telecommunication, music & film industry, art world, mobility,
  327. education and many more. Smart contract use cases range from simple to complex.
  328. Time-stamping services like ascribe (art registry) or governmental and semi-governmental registries (land
  329. titles, birth certificates, birth certificates, school and university degrees) are examples for simpler
  330. technological use cases (the regulatory aspects might be more complex). Decentralized autonomous
  331. organizations, on the other hand, are the most complex form of a smart contract. TheDAO in 2016 was an
  332. example for such a complex smart contract.
  333. Given the fact that Blockchain is still a new technology, some industries might adopt smart contracts later
  334. than others, especially if they are subject to heavy government regulation or if the uses cases require high
  335. network effects – like widespread technology adoption along the supply chain, standardization, etc. In
  336. general, it’s advisable to start out with a small pilot project of a less complex use case to build expertise
  337. and understand the technology better and move on to more complex use case at a later stage.
  338.  
  339. 29/58
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement