Cs236r Presentation Blockchain Applications.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
Blockchain Applications Grace Young & Eric Wasserman CryptoKitties ● Everything sent on the internet is a copy. CryptoKitties test whether a digital good can be rare. ● One of the first attempts to deploy blockchain technology for recreational purposes. Fungible Non-Fungible ERC-20 token standard ERC-721 token standard Owning a CryptoKitty ● Each CryptoKitty is unique and owned by the user ● CryptoKitty itself is a smart contract validated through the blockchain ● Value can appreciate or depreciated based on market ● Cannot be replicated ● Cannot be transferred without owner’s permission even by the game developers ● Users can buy, sell, and breed CryptoKitties by interacting with the smart contracts on the blockchain CryptoKitty Genetics ● Unlike physical collectibles, CryptoKitties breed ● Cats have 12 features (cattributes) determined by its genees (a 256 bit integer) which are stored in the smart contract ● Over 4 billion variations of phenotypes and genotypes Owning a CryptoKitty (con’t) You own the Axiom Zen code (256 bit owns the integer) images History Launch Cap Every 15 minutes the company Axiom Zen releases a Clock Cat Number of Clock Cats is capped at (Gen 0 Kitty) via smart contract 50,000 Dec 2017 Dec 2017 Nov Sales soar 2018 Congestion Sales hit $12 million The game became so popular that it was taking up a significant amount of available space on the Ethereum platform, causing the gas limit to increase Effect on Transaction Fees Gas price Gas limit Transaction fee How many What you offer to X operations you allow Gas limit * gas price pay the miners for each operation they miners to do before do to execute the they run out of gas smart contract and drop the transaction Dai & Maker Problem: Solution: Popular digital assets such as Bitcoin The Dai Stablecoin is a and Ether are too volatile to be used collateral-backed cryptocurrency as everyday currency. whose value is stable relative to the US Dollar. What could go wrong? Black Swan Event: Solution: Price of ether crashes well below the MKR, or makercoin, holders function one-to-one collateralization ratio in a as buyers of last resort time frame too short for the system to handle Augur What is Augur •Prediction market platform that is… •Trustless – current prediction markets require a trusted central party •Discussion – Do we need a prediction market to be decentralized? What are some pros/cons with centralized prediction markets? •Goal is to have low operational fees Stage 1 – Creation • Anyone can make a market on anything • Discussion- Are there things we would not want a market on? • Market creator picks Event end time and designated reporter • Resolution source is where market reporter should consult • Creator fee paid later by traders • Validity bond – returned to creator if market settles to something other than invalid (in Ether) and set dynamically • Designated report no-show bond – (in REP) returned to creator if designated reporter reports during first three days after event end time Stage 2 – Trading • Traders are not required to partake in reporting and do not need REP Ethereum Price End of March? • Complete set of shares – a collection of shares that consists of one share of each possible valid outcome of the event • Shares are issued by Augur’s matching engine and then can be traded freely on an order book • You can cancel your own orders on the order book https://cloudflare-ipfs.com/ipfs/QmRX5eYxoUMMP6HyyvaEng3NtLMFVPJ3KoepURe • aQHMkpd/?ethereum_node_http=https%3a%2f%2feth-mainnet.alchemyapi.io%2fjso All Augur assets including ownership of a nrpc%2f7sE1TzCIRIQA3NJPD5wg7YRiVjhxuWAE&augur_node=wss%3a%2f%2faugur-n ode.augur.casino#!/market?id=0xc9f0006902b67a7a8ef0e94f9140493243bd3019 market are transferable Stage 3 – Reporting • Designated reporting – three day window • If Designated Report does not report: • Open reporting - the no show bond goes to first public reporter if and only if they report correctly. Important note- they do not stake their own REP. Reported outcome becomes tentative outcome. • Else: waiting for next fee window to begin – reporting is on hold • Dispute round – stake REP on an outcome other than the market’s tentative outcome. A dispute is successful if total amount of dispute stake on some outcome meets dispute bond size requirement. Dispute bonds can be crowdsourced. Peterson, Jack, et al. "Augur: a Decentralized Oracle and Prediction Market Platform." Dispute Bond Size • An stake over market’s outcomes at beginning of dispute round n • ⍵ := any market outcome other than the market’s tentative outcome • S(⍵ ,n) := total amount of stake on outcome ⍵ at the beginning of dispute round n. • B(⍵,n) := The size of the dispute bond needed to dispute the current tentative outcome in favor of new outcome ⍵ during round n B(⍵ , n) = 2An – 3S(⍵,n) • 50 percent ROI for reporters who dispute false outcomes Stages of Reporting Continued • Fork state – if the size of the filled dispute bond is greater than 2.5% of all REP • Otherwise if filled dispute bond is less than 2.5% of all REP, we enter another dispute round with the newly chosen outcome becoming the tentative outcome • Finalized state – no state has stake above dispute bond size threshold during the 7 day dispute round. Tentative outcome becomes final outcome. Dispute stake is returned to owners from most recent dispute round. https://www.google.com/imgres?imgurl=https%3A %2F%2Ftarget.scene7.com%2Fis%2Fimage%2FTarge • Finalized- occurs without a dispute or after a fork. t%2FGUEST_9dab3a63-b46f-410a-acf0-b49c2bd786 6c%3Fwid%3D488%26hei%3D488%26fmt%3Dpjpeg &imgrefurl=https%3A%2F%2Fwww.target.com%2Fp %2Fnolan-dinner-fork-stainless-steel-room-essential s-153%2F-%2FA-51066339&docid=otSGwesOUxedD M&tbnid=qASGM_uJ-QQtuM%3A&vet=10ahUKEwjx 4d-08J7hAhWymOAKHUgJA4AQMwhqKAAwAA..i&w =488&h=488&bih=655&biw=1253&q=fork&ved=0ah UKEwjx4d-08J7hAhWymOAKHUgJA4AQMwhqKAAw AA&iact=mrc&uact=8 Fork State • Last up to 60 days Discussion – why can it be shorter? • Disputing for other non finalized markets is put on hold and no new markets can be created • During a fork child universes are made for each possible Parent outcome plus invalid • REP holders can permanently migrate their REP to one of the child universes for 5% more REP • Whichever child universe receives the most migrated REP becomes the winning universe • Unfinalized markets in the parent universe are migrated only to the winning universe Texas Michigan • Losing universe tokens ought to lose value Invalid Tech Stage 4 – Settlement • Traders settle their positions. Traders can sell their shares to other traders or give Augur a complete set or one share of the winning outcome (settling with the market contract). • Two fees - creator and reporter– paid in proportion to money being paid out • Reporting fee- set dynamically and paid to reporters who participate in reporting process, including just buying participation tokens • If there is an invalid market then everyone gets C (cost of complete set)/ N (possible outcomes not including invalid) – Discussion- How can this be exploited? This was in the news recently. • If the market finalizes without a fork, REP staked on outcomes other than the final outcome is distributed to the people who staked REP on the final outcome Security • We want the maximum benefit from a successful attacker to be less than the minimum cost of performing the attack in order to have security • The maximum benefits means an attacker would cause all non-finalized markets to migrate to the false universe, own the majority of REP, determine the outcome of all non https://www.google.com/imgres?imgurl=https%3A%2F%2Fwww.mobileworldlive.com%2Fwp-conte finalized markets, and in the extreme nt%2Fuploads%2F2018%2F06%2Fshutterstock_527048005-security-lock-privacy-650.jpg&imgrefurl= https%3A%2F%2Fwww.mobileworldlive.com%2Ffeatured-content%2Fhome-banner%2Fgsma-aims-t case if they owned all the shares get o-strike-balance-in-network-security-concerns%2F&docid=tsGzUrm6kZYsvM&tbnid=-0GL-b7K8oI98 M%3A&vet=10ahUKEwi5vs77z57hAhXjY98KHefzCUkQMwhqKAAwAA..i&w=650&h=433&bih=655&b iw=1253&q=security&ved=0ahUKEwi5vs77z57hAhXjY98KHefzCUkQMwhqKAAwAA&iact=mrc&uact= all of the escrow money 8 Maximum Benefits from An Attack •Ia := Augur’s native open interest which is the value of the sum of all funds escrowed in non-finalized Augur markets •Parasitic market := a market that settles according to an Augur market but does not pay Augur fees •Ip := parasitic open interest which is the sum of all funds escrowed in all parasitic markets •The maximum benefit to an attacker is Ia + Ip •Ip is unknown Cost of Attack • P := price of REP, ε := 1 attorep (10-18 REP), M := the money supply of REP • S := proportion of M that will be migrated to the True universe during the forking period of a fork • Pf := price of REP migrated to a False universe of the attacker’s choosing • Assume reporters that are not attackers never migrate REP to a false universe -> only an attacker will migrate REP to a False universe • Amount of REP migrated to the true universe is SM so the attacker must migrate SM + ε or roughly SM • Ignoring ε, the cost of an attack is SM(P-P ) which is the amount they migrated minus the difference in the value of REP betweenf the two universes Integrity •If S > ½ then an attack is impossible •The winning universe will be the true universe when the cost of an attack is less than the gains from an attack Ia + Ip < (P – Pf)SM or when S > ½ •Solving for market cap (PM), we have integrity when S > ½ or Pf <P and the market cap of REP > ((Ia+Ip)P)/((P -Pf)S) •They set Pf =0 and Assume Ia ≥ 2Ip •Assume at least 20 percent of REP will be migrated to the True universe during forking (S ≥ 1/5).