# Smart contracts ... why should I care? Whether you are here just for entertainment or to learn some of the latest technology in software engineering, whether you want to create a business with NFTs or are interested in political philosophy, smart contracts have something to offer. I will touch on a few topics in order of increasing interest (my personal view). ## Entertainment The area of crypto currencies and smart contracts has some of the best true crime stories. Most famously, there is the one of Ross Ulbricht and the Silk Road, which has been masterfully retold in the book [American Kingpin](http://www.americankingpin.com/). Since then **crypto crime** has reinvented itself many times. Whether it is [the hack of The DAO](https://www.forbes.com/sites/laurashin/2022/02/22/exclusive-austrian-programmer-and-ex-crypto-ceo-likely-stole-11-billion-of-ether/?sh=6b7f015a7f58), the [Poly Network Hack](https://mudit.blog/poly-network-largest-crypto-hack/), or the recent news [Beanstalk cryptocurrency robbed after hacker votes to send themself $182 million](https://www.theverge.com/2022/4/18/23030754/beanstalk-cryptocurrency-hack-182-million-dao-voting). A list of crypto-frauds updated with the latest exploits is the [Molly White List](https://web3isgoinggreat.com/?theme=hack). Apart from true crime, crypto also has an intersting relationship with **scifi**. I personally know too little about the history of either crypto or scifi but am interested in projects on that topic. A starting point could be the [mailing list of the Cypherpunk movement](https://mailing-list-archive.cryptoanarchy.wiki/) of the 90s (which named itself with reference to cyberpunk scifi). ## New Technologies A *peer-to-peer (P2P) network* is a network of nodes (agents) that all have the same power and freedom to make decisions. Often P2P networks are contrasted with hierarchically structured systems. How can a P2P network create common knowledge? How can everybody in the network be sure that certain facts are known to everybody? Can a consensus be created without recognized authorities such as a notary or escrow or a central bank or government? The answer involves two main ideas, distributed ledgers (blockchains) and distributed consensus. - A *blockchain* is a public and immutable ledger, a distributed and write-only database, that records the globally accepted transactions in P2P networks. - *Distributed consensus algorithms* (proof-of-work, proof-of-stake, etc) make sure that if some transactions are incompatible according to the rules of the network, the network can agree on which transaction to choose. A *cryptocurrency* uses distributed consensus to make sure that each coin of a digital currency can only be spent once (the so-called *double spending problem* solved for the first time by [Bitcoin](https://nakamotoinstitute.org/)). Every cryptocurrency implements its own blockchain and its own algorithm for distributed consensus. Some blockchains support so-called smart contracts. [*Smart contracts*](https://firstmonday.org/ojs/index.php/fm/article/view/548/469) are programs that allow us to leverage the distributed consensus algorithm of a blockchain to reach distributed consenus on a wide range of societal, political and economic problems (as pioneered by [Ethereum](https://ethereum.org/en/whitepaper/) and the [EVM](https://github.com/ethereum/yellowpaper)). Smart contracts can be thought of as programming a globally distributed computer. Currently, the infrastructure necessary to bring these technologies to fruition is still under intense development. It is one of the aims of the Chapman Blockchain group to be part of this. Last but not least, smart contracts are closely related to a whole landscape of interesting technologies, such as *cryptography* (elliptic curve cryptography, RSA, ...) *distributed hash tables*, *zero-knowledge proofs*, ... Moreover, let us not forget that P2P networks and cryptocurrencies are part of the wider phenomeon of open source software and examples of public goods created by decentralized, non-hierarchical cooperation. ## Novel Applications Smart contracts allow us to create our own currencies, markets, tokens, voting mechanism, etc. Importantly, smart contracts are self-enforcing, they always run exactly as programmed. (In theory, smart contracts should make cheating and fraud impossible. It is interesting to ask why that is not true in practice.) *Example 1 (Tokens, NFTs):* One can use a smart contract to create tokens that can be traded according to bespoke rules. These tokens can be another cryptocurrency in their own right, but also used for a variety of other purposes. The most famous such tokens are [NFTs](https://www.youtube.com/watch?v=YQ_xWvX1n9g). *Example 2 ([Crowdfunding](https://ethresear.ch/t/explanation-of-daicos/465)):* Imagine a team of software developers that want to crowdfund their latest project. The team defines the rules of the funding scheme in a smart contract. If enough funds come in, the project starts and pays a salary to the team. But funders still maintain influence on the project as formalized and guaranteed by the smart contract. For example, funders may get to vote on raising salaries or on ending the project (and recovering their remaining funds). *Example 3 (DAOs):* The previous example describes a simple distributed autonomous organization (DAO). Of particular interest here is the question of governance: How to design smart contracts that strike a balance between flexibility and security, allowing people to govern themselves. New ideas come out all the time, often summarized by new terms such as DeFi, Transparent Supply Chains, Decentralized Prediction Markets, Virtual Power Plants, [Blockchain Games](https://medium.com/@jradoff), ... Blockchain technology also gives renewed impetus to the development of P2P networks not based on cryptocurrencies. Examples include P2P social media such as [Mastodon](https://en.wikipedia.org/wiki/Mastodon_(software)) or [federated machine learning](https://ai.googleblog.com/2017/04/federated-learning-collaborative.html), or ... ## A Look Into the Future The utopia of decentralization and P2P computing, which drives much of the interest in web3 technology, is deeply egalitarian: all people will have access to information and technology without having to pass via rent-extracting middle men; freedom and democracy will flourish; authoritarianism will not be able to resist the information revolution; etc. This recalls the optimism during the early years of the internet in the 1990s (web1) and the disappointment starting in the 2000s when platforms and governments took over web2. Where will web3 be going and how will it change our future? ## Further References Gary Gensler's [course](https://ocw.mit.edu/courses/15-s12-blockchain-and-money-fall-2018/video_galleries/video-lectures/) at MIT Open Courseware, 2018. See also the [readings](https://ocw.mit.edu/courses/15-s12-blockchain-and-money-fall-2018/pages/readings/) for further references. A sample from the media: - [Metaverse](https://www.nytimes.com/2021/07/10/style/metaverse-virtual-worlds.html) ... [Facebook is Meta](https://www.nytimes.com/2021/10/29/technology/meta-facebook-zuckerberg.html) ... [Web3](https://www.nytimes.com/2021/12/05/business/dealbook/what-is-web3.html) ... [Fintech](https://www.nytimes.com/2022/01/20/nyregion/eric-adams-bitcoin-cryptocurrency.html) ... [DeFi](https://www.coinbase.com/learn/crypto-basics/what-is-defi) ... Criticism: - [Sex, Drugs, and Bitcoin: How Much Illegal Activity is Financed through Cryptocurrencies?](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3102645) "around $76 billion of illegal activity per year involves bitcoin (46% of bitcoin transactions)" - [David Rosenthal](https://blog.dshr.org/2022/02/ee380-talk.html) - [Bitcoin Maximalism](https://vitalik.ca/general/2022/04/01/maximalist.html) - [Cambridge Bitcoin Electricity Consumption Index](https://ccaf.io/cbeci/index/comparisons) - ... History: - [Ian Grigg](https://www.youtube.com/watch?v=wokvO1ptE1k) - [Worse is Better](https://www.gwern.net/Bitcoin-is-Worse-is-Better) - [Bitcoin’s Academic Pedigree](https://dl.acm.org/doi/pdf/10.1145/3132259?download=true) - [Lawrence Lessig](https://lessig.org/product/code/) - ... <!-- SETI https://en.wikipedia.org/wiki/Search_for_extraterrestrial_intelligence -->