Lecture 8
DeFi, NFTs & Metaverse
Completely Transparent
Blockchain
Open-Source
Eliminates Middlemen
Trust-minimizing
Open and permissionless
Composable
Allows unprecedented automatization
algorithmic finance
programmable money
Allows things that have not been possible before
Stablecoin with no counterparty risk
Flash loans
1. Deposit ETH to Metamask
2. Wrap ETH --> WETH (via Dai.makerdao.com)
3.Exchange it for PETH (pool eth), used for collateral
4. Create CDP (the loan)
5. Lock your PETH collateral
6. Mint new DAI (max. 60% of collateral)
7. Exchange DAI for ETH at Oasis DEX
8. Send ETH to any exchange and get EUR, BTC etc.
1. Get some ETH
2. Exchange it for DAI (which you owe) and MKR (for governance fee) on Oasis DEX
3. Return DAI to the smart contract and pay the fee in MKR
4. You cancel CDP smart contract
5. Unlock your PETH
6. Exchange PETH for WETH
7. Unwrap WETH --> ETH
8. You have your ETH back
Uniswap is a fully decentralized on-chain protocol for token exchange on Ethereum that uses liquidity pools (AMM) instead of order books. Anyone can quickly swap between ETH and any ERC20 token or earn fees by supplying any amount of liquidity. And anyone can create a market (i.e., liquidity pool) by supplying an equal value of ETH and an ERC20 token.
Uniswap allows only one market per ERC20 token. The market creator sets the exchange rate, which shifts through trading due to Uniswap’s “constant product market maker” mechanism. When trading reduces one side of the pair’s liquidity relative to the other, the price changes. This creates arbitrage opportunities, encouraging more trading.
Uniswap from scratch:
- is a decentralized ecosystem of aggregators that utilize lending services such as Aave, Compound, Dydx, and Fulcrum to optimize your token lending. When you deposit your tokens to yearn.finance, they are converted to yTokens, which are periodically rebalanced to choose the most profitable lending service(s).
YFI, yearn.finance's governance token, is distributed only to users who provide liquidity with certain yTokens.
Compound is an algorithmic money market protocol on Ethereum that lets users earn interest or borrow assets against collateral. Anyone can supply assets to Compound’s liquidity pool and immediately begin earning continuously-compounding interest. Rates adjust automatically based on supply and demand.
Supplied asset balances are represented by cTokens: representations of the underlying asset that earn interest and serve as collateral. Users can borrow up to 50-75% of their cTokens’ value, depending on the quality of the underlying asset. Users can add or remove funds at any time, but if their debt becomes undercollateralized, anyone can liquidate; a 5% discount on liquidated assets serves as incentive for liquidators.
0x/AirSwap - set of open smart contracts for exchange of Ethereum based tokens. Developers can leverage these tools to create ‘relayers, --> essentially application interfaces that allow users to trade in a decentralized manner.
-->off-chain order books with on-chain settlement
Augur/Gnosis - decentralized prediction market around any event . --> ‘wisdom of the crowd’ --> great hedging tools. anyone can create a market for around $40 USD and trade outcome shares for a few dollars in fees --> global risk allocation much more efficient
dy/dx - creation, issuance, and trading of decentralized derivatives for ERC20 tokens
{Set} Protocol - indexing and collateralized baskets of ERC20 tokens of ERC20 tokens
Dharma - protocol for debt tokenization in form of ERC20 token. What this means is that anyone can leverage their development tools and smart contracts to originate, underwrite, issue, and administer debt agreements without a central third party.
In the fourth quarter of 2020 and first quarter of 2021, the gaming industry had two of its largest-ever initial public offerings (IPOs) in Unity Technologies and Roblox Corporation, both of which wrapped their corporate histories and ambitions in Metaverse-related narratives.
Start in the 1970s with text-based virtual worlds known as Multi-User Dungeons. MUDs were effectively a software-based version of the role-playing game Dungeons & Dragons.
Using text-based commands that resembled human languages, players could interact with one another, explore a fictional world populated by non-playable characters and monsters, attain power-ups and knowledge, and eventually retrieve a magical chalice, defeat an evil wizard, or rescue a princess
Great leap came in 1986 with the release of the Commodore 64 online game Habitat, which was published by Lucasfilm, the production company founded by Star Wars creator George Lucas.
Habitat was described as “a multi-participant online virtual environment” and, in a reference to Gibson’s novel Neuromancer, “a cyberspace.”
“Citizens” of Habitat were in charge of the laws and expectations of their virtual world, and had to barter with each other for necessary resources and avoid being robbed or killed for their wares. This challenge led to periods of chaos, after which new rules, regulations, and authorities were established by the player community to maintain order
The 1990s saw no major “proto-Metaverse” games, but advances continued. That decade, millions of consumers took part in the first isometric 3D (also known as 2.5D) virtual worlds, which gave the illusion of three-dimensional space, but only allowed users to move across two axes.
Not long after, full 3D virtual worlds emerged. A number of games, such as 1994’s Web World and 1995’s Activeworlds, also empowered users to collaboratively build a visible virtual space in real time, rather than through asynchronous commands and votes
2007 - stock exchange was launched in Second Life
with the aim of helping Second Life–based companies raise capital using the platform’s Linden Dollars currency.
Throughout the 2010s, bands of users collaborated in Minecraft to build cities as large as Los Angeles—roughly 500 square miles.
One video game streamer, Aztter, constructed a stunning cyberpunk city out of an estimated 370 million Minecraft blocks, having worked an average of 16 hours per day for a year.
Fortnite’s social experiences -- its famous 2020 concert with Travis Scott. In that case, “players” converged on a much smaller portion of the map.
The title’s standard cap of 100 players per instance was halved, while many items and actions, such as building, are disabled, thereby further reducing the workload. While Epic Games can rightly say that more than 12.5 million people attended this live concert, these attendees were split across 250,000 separate copies (meaning, they watched 250,000 versions of Scott) of the event that didn’t even start at the same time.
EVE Online stands apart from games like World of Warcraft and Fortnite because all users are part of one singular and persistent realm.
Over the course of an average day in 2021, over 350 million people participated in a battle royale game—just one genre of high CCU game—and billions were able to do so. In 2016, only 350 million people in the world owned the equipment needed to render a rich 3D virtual world. At its peak in 2021, Roblox had 225 million monthly users
Roblox and Minecraft are among the most popular games in the world, their reach is modest when considered in the broadest terms. These two supposed titans have 30–55 million daily active users, a fraction of the global internet population of 4.5–5 billion. In effect, they are still at the ICQ stage of virtual words
Concurrency is one of the foundational problems for the Metaverse, and for a fundamental reason: it leads to exponential increases in how much data must be processed, rendered, and synchronized per unit of time.
Microsfot Flight Simulator -the most realistic and expansive consumer-grade simulation in history. Its map is over 500,000,000 square kilometers—just like the “real” planet earth—and includes two trillion uniquely rendered trees (not two trillion copy-and-pasted trees, or two trillion trees made up of a few dozen varieties), 1.5 billion buildings, and nearly every road, mountain, city, and airport across the world.
Microsfot Flight Simulator -the most realistic and expansive consumer-grade simulation in history. Its map is over 500,000,000 square kilometers—just like the “real” planet earth—and includes two trillion uniquely rendered trees (not two trillion copy-and-pasted trees, or two trillion trees made up of a few dozen varieties), 1.5 billion buildings, and nearly every road, mountain, city, and airport across the world.
Microsoft Flight Simulator aspires for every town to not just differ from one another, but to exist as they do in real life. And it doesn’t want to store 100 types of clouds and then tell a device which cloud to render and with what coloring; rather, it wants to say exactly what that cloud should look like.
By the end of 2021, Adopt Me!’s virtual world had been visited more than 30 billion times—more than fifteen times the average number of global tourism visits in 2019.
Furthermore, developers on Roblox, many of whom are also small teams with fewer than 30 members, have received more than $1 billion in payments from the platform.
By the end of 2021, Roblox had become the most valuable gaming company outside of China, worth nearly 50% more than storied gaming giants Activision Blizzard and Nintendo.
1. DeFipulse.com --> metrics based on Total value Locked (TCL)
2. Zapper.fi --> Easy interface for multiple protocols
3. Duneanalytics.com --> on-chain data from various protocols
1. The Streaming Book by Matthew Ball, freely online
2. The Metaverse Book, and Blog by Matthew Ball
3. Virtual Economy by L'Atelier