Bitcoin en blockchain Jan Bergstra Section Theory of Computer Science Informatics Institute Faculty of Science University of Amsterdam
[email protected]
9 maart, 2016
Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
1 / 19
Gewoon geld wat zou dat zijn? BV: EUR: munten, papiergeld, banktegoeden, tegoeden van een handelsbank bij de DNB (pseudobasisgeld). tegoeden van de DNB bij de ECB (basisgeld)
Er wordt geen enkele poging gedaan de mensen uit te leggen hoe geld thans werkt. Vragen: Hoe fundamenteel is de rol van de banken: creatie: (tegoed X aan klant, claim C op klant), dat maakt X , maar uitsluitend giraal. annihilatie: (vernietiging tegoed X , opheffing claim C op klant). Maar als dit niet functioneert, wat is de status van X Giraal geld bewaren kost niets, maar waarom dan negatieve rente? Waarom bestaat er geen“positief” giraal geld. Ofwel: HUBER: Vollgeld, plain money: waarom hebben we dat niet? Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
2 / 19
Negatieve rente als sleutelmeachnisme nog wat issues: munten, (twee munten kunnen identiek zijn), ´ papiergeld, (bij twee identieke bankbiljetten is er minstens e´ en vals), banktegoeden, moeten dagelijks (overnight) bij de DNB/ECB worden geplaatst: daar kan negatieve rente geheven worden, ontwijken van negatieve rente: HET monetaire issue van dit moment. VOLLGELD (Huber) is giraal maar het is basisgeld dat de eigenaar (niet een bank) direct bij de DNB/ECB heeft staan. Er staat geen schuld tegenover. Maar wel kwetsbaar voor negatieve rente.
papiergeld wordt weer belangrijk. ECB wil er vanaf (negatieve rente kan niet), banken overwegen bewaren papiergeld in kluizen. papiergeld is net als goud “positief”, maar wel kwetsbaar voor vermogensbelasting. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
3 / 19
Informational money idee komt uit Nederland: David Chaum, CWI jaren 80 en 90. Nu mondiaal de´ bekende naam in de “digital currencies” (Digicash + reeks van fundamentele concepten). BITCOIN (eenheid BTC): uit 2008 (ontwerp en bouw af), 2009 (introductie), maker (pseudoniem) Satoshi Nakamoto (zoiets als Jan de Vries in het Japans, ofwel een veel voorkomende naam). Wie of wat hier achter zit is nog steeds niet bekend. Creatieve ideologie: men kan zelf bedenken waar Bitcoin goed voor is of kan zijn, dat wisselt in de tijd. Inmiddels vele varianten beschikbaar: altcoins. Er zijn nu plm. 10.000.000 BTC in omloop, huidige koers ongeveer EUR 375. Heel complex systeem! Geen eenvoudige uitleg mogelijk. Geen garanties op validiteit mogelijk. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
4 / 19
MLIC: Money-Like Informational Commodity (2014 met Peter Weijland:) MLIC is neutraal inzake huidige en toekomstige status als geld. Status kan zelfs fluctueren. Bitcoin: is een MLIC (2015:) Bitcoin: niet een currency-like informational commodity “currency” heeft meer formele status dan“geld”) (2013 met Karl de Leeuw:) Exclusively Informational Money (EXIM), CLAIM: Bitcoin is een EXIM! Men heeft uitsluitend toegang tot “commodity” via informatie. Geen rechten die op enigerlei andere wijze afgedwongen kunnen worden. CONSEQUENTIE: Bitcoin kan men niet bezitten (en daarom ook niet stelen). Samen Bitcoin is Money-like Exclusively Informational Commodity Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
5 / 19
Bitcoin: naam is geen toeval Ontwerper: Satoshi Nakamoto, release 2008, operationeel vanaf begin 2009. Pseudoniem van (nog steeds) onbekende ontwerper(s). Ontwerp, evolutie en policy nu in handen van core developer team (dat in 2010 de passwords voor de source files van SN heeft gekregen). Met een munt kun je in principe anoniem betalen. Maar betaling met munten garandeert geen anonimiteit. Bitcoin doet dat na: geen enkele authenticatie, geen user id’s, geen passwords. Ook geen harde garantie van anonimiteit. Coin-like Informational Commodity (CLIC, waarbij CLIC ⊆ MLIC) deelnemers in P2P netwerk Geen rolverdeling tussen deelnemers (authenticatie nodig om een centrale rol te kunnen spelen, zonder authenticatie verregaande symmetrie) CLAIM: dit bij elkaar vereist al een blockchain. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
6 / 19
Bitcoin: aspecten I Totaal van BTC groeit in zo’n 40 jaar naar 21.000.000. Vaste bovengrens. Geen beheerder kan het volume manipuleren en daarmee inflatie veroorzaken. (Oorspronkelijke ideologie.) Rente op BTC is net zo onzinnig als rente op goud. Zelfde circulatietheorie. Net als goud in willekeurig kleine units op te delen. (met wat wijzigingen) uitstekende optie voor Islamic Finance, onkwetsbaar voor negatieve rente, ook onzinnig voor BTC, bij voldoende anonimiteit onkwetsbaar voor vermogensbelasting, onafhankelijk van enige nationale staat of nationale bank, volstrekt internationaal bruikbaar (als het internet maar functioneert).
Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
7 / 19
Bitcoin: aspecten II in het P2P (peer to peer ) netwerk ontstaat een rolverdeling: gewone gebruikers (betalen met BTC, ontvangen betalingen in BTC, kopen BTC met ander geld) full node gebruikers (beheren een kopie van de complete transactiehistorie, checken steeds, d.w.z. bij elke nieuwe transactie die ze zien, de consistentie daarvan), miners, verdienen BTC (uit het systeem) door hard te werken, dat werk is: verificatie van reeksen van transactievoorstellen, plus puzzelcompetitie (mining) om erkenning voor het werk als ´ verificator te krijgen, (elke transactie heeft uiteindelijk precies e´ en erkende verificator). Wie op lange termijn die erkenning krijgt heeft ook de opbrengst van de mining.
Mining leidt nu tot speciale hardware. Schatting: wereldwijd permanent permanent 200.000 maal de rekenkracht van de grootste supercomputer die er nu is. Niet te verantwoorden ecologische impact. (Is Bitcoin domweg onethisch?) Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
8 / 19
Sterk vereenvoudigd transactiemodel Deelnemers kunnen naar willekeur accounts maken (natuurlijke getallen). Op enig moment t bevat account a het bedrag Bt (a) BTC, met Bt (a) een getal tussen 10−8 en 2, 1 × 107 . B 0 (a) = 0 BTC. transactievoorstel: tvα (a →p b, a →q a), eis: Bt (a) ≥ p + q, Bt+1 (a) = q, Bt+1 (b) = Bt (b) + p, fee is Bt (a) − p − q. finaliteit: β die toegang tot b heeft weet dat de overboeking heeft plaats gevonden (liefst meteen op t + 1 maar zeg op t + 10) en levert nu een (onomkeerbare) tegenprestatie, pseudofinaliteit: β wacht (b.v. tot t + 10) totdat de (subjectieve) kans dat de overboeking blijft staan zo groot is dat hij/zij het aandurft om de (onomkeerbare) tegenprestatie te leveren. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
9 / 19
Nu in een P2P netwerk er is een aparte eerste transactie nodig (genesis transactie), en het is niet duidelijk waar de commodity vandaan komt. we nemen aan dat elke deelnemer een complete rij van transactievoorstellen bijhoudt, alle transactievoorstellen bereiken iedereen, evt. met vertraging. (Ofwel: elke deelnemer levert een full node), elke deelnemer maakt steeds een zo lang mogelijke passende rij van de items die hij/zij/het heeft ontvangen, een transactie finaal (voor β) als ie in een helemaal passende rij staat in de database van β, dit gaat goed als de transactievoorstellen iedereen in de juiste volgorde bereiken EN met elkaar kloppen, ofwel op den duur allemaal in een rij passen (α moet niet vrijwel tegelijk tvα (a →25 b, a →3 a) en tvα (a →26 c, a →4 a) opsturen als zeg Bt (a) = 30. Het zou beide apart kunnen slagen maar niet vlak na elkaar. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
10 / 19
Links tussen transactievoorstellen de volgorde-eis is onredelijk zwaar want vertragingen zijn niet te vermijden. We maken links tussen de transactievoorstellen, elk voorstel krijgt een nieuwe naam (zeg j) en verwijst (zeg i) naar de laatste transactie die van invloed was op de “balance” van de source. tvα (i; a →p b, a →q a; j), β die een bijschrijving verwacht op account b kan wachten tot deze is ontvangen en in een compleet pasende rij is opgenomen. Dat gaat nooit meer “onderuit”. Dit levert finaliteit. Nu beginnen de problemen! Stel α wil voor 25 BTC dienst S van β kopen, we nemen aan Bt (a) = 30. α stuurt voorstel TV1 = tvα (i; a →25 b, a →3 a; j) rond, en kort daarna TV2 = tvα (i; a →25 c, a →3 a; j) waarbij c “van α is”. β weet niet of alle deelnemers TV1 in hun database zetten. Wie TV2 heeft staan ontkent later dat β (op b) 25 BTC heeft ontvangen, en weigert mogelijk een transfer (door β) vanuit b. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
11 / 19
(In)consistente item rijen Een transactievoorstel noem ik een item. Zowel item TV1 als item TV2 kan een deelnemer aan de eigen rij toevoegen, maar niet beide, men moet kiezen, maar hoe? Men gaat toevoegen en mogelijk weer weggooien. Nu moeten we voorkomen dat een deelnemer steeds items toevoegt die dichtbij zijn geproduceerd. Oplossing: verzamel items gedurende een tijdsinterval en voeg die “en bloc” aan de eigen rij toe. BLOK: rij van items met een naam (j) en met een verwijzing (i) naar “vorig blok”: (i; H1 , . . . , Hk ; j). BLOKKENRIJ: (lineair) geordende rij van blokken waarin alles “past”. KLEIN WERK: maak een nieuw blok (alles moet goed passen) uit de pool van items en stuur dat rond. Iedereen probeert zo snel mogelijk aan een extra blok te komen. Probleem: als iedereen alleen “klein werk” doet dan worden er veel te veel blokken rond gestuurd (congestie). Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
12 / 19
Blokkenrij I Iedereen probeert nieuw blok te maken uit recent binnengekomen items die nog niet in een blok zitten. Bovendien gaat men een puzzel oplossen. De moeilijkheidsgraad van de puzzel wordt (in Bitcoin) dynamisch aangepast zodat de verwachtingswaarde van de tijd die men op de eerste oplossing moet wachten 10 minuten is. Spectaculair succesvol idee: de zaak wordt hardware onafhankelijk, puzzeloplossers hebben nu ASICs speciale racks met dedicated chips, de rekencapaciteit die er mondiaal in omgaat is fenomenaal. Dit gepuzzel kost naar men zegt 200.000 maal de capaciteit van de grootse supercomputer van dit moment (ecologisch volstrekt onverantwoord!)
Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
13 / 19
Blokkenrij II een blok is nu (i; H1 , . . . , Hk ; j; X ; coinbase →q+r c) gecombineerde fee is q en met X een oplossing van het probleem met de gewenste moeilijkheidsgraad (de correctheid van X kan iedereen gemakkelijk controleren). r is een premie die het systeem levert voor wie een nieuwe blok maakt (wordt om de zoveel jaar gehalveerd.) r resultaat van “mining”. er kunnen nog steeds verschillende incompatibele blokken ontstaan. Wanneer een item in een “goed blok zit” (met X erbij) dan wordt het van transactievoorstel een transactie. elke deelnemer (α) probeert uit de binnenkomende blokken (met eerder ontvangen blokken) steeds de langste rij te maken die geheel klopt. Dat is de locale BCN van α. Het P2P netwerk probeert nu aan consensus te komen door de blokken vaak rond te sturen. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
14 / 19
Blokkenrij III
Nu kan blijken dat een deelnemer door soms een blok (laatste blok uit de locale BCN) weg te halen twee blokken toe kan voegen. Soms moeten er zelfs 2 blokken worden weggegooid, of 3 (of meer) steeds omdat men ziet dat men uit de toegestuurde blokken een langere keten zou kunnen maken. Wie sneller kan puzzelen dan de anderen bij elkaar kan op den duur de hele blokkenrij bij elke deelnemer afbreken en vervangen! AANNAME: geen enkele partij kan dat monopolie bereiken (daar is geen enkel argument voor gegeven).
Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
15 / 19
Blokkenrij IV
Ervaringsfeit: op een incident 2 jaar geleden na toen vele deelnemers tot 24 blokken moesten dumpen heeft nog geen enkele actieve deelnemer ooit meer dan de 4 laatste blokken weg hoeven gooien. empirische pseudofinaliteit: de transactie die β binnen wil krijgen is aangekomen wanneer ie (lokaal voor β) in een blok zit waar nog minstens 6 blokken achteraan zijn gekomen (gemiddeld zal dat ruim een uur duren). hoe ouder het blok hoe groter de kans dat het “blijft”. Bij eerder genoemde TV1 en TV2 zal het zo zijn dat na verloop van elke actieve deelnemer dezelfde (van beide opties) in een van de locale blokken ziet staan.
Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
16 / 19
een definitie van de globale BCN (gBCN) gBCN (op enig moment t) is de langste blokkenrij die voor een meerderheid van de deelnemers een beginstuk is van de locale BCN (op hetzelfde moment t). elke deelnemer (zeg α) zit steeds met de volgende vragen: 1
2
3
mag men aannemen dat de blokken die nu in gBCN zitten er ook in blijven, is de locale BCN een verlenging van gBCN (zo niet dan is de kans heel groot dat er blokken weg moeten), als α de laatste 6 blokken uit de eigen locale BCN wegdenkt, ontstaat dan een beginstuk van gBCN.
Door aan te nemen dat het antwoord op de laatste vraag JA is (aannemende dat men goed actief is en bovendien op het nieuws zo nauwkeurig volgt of er problemen met “het systeem” zijn dat men dat snel genoeg weet) krijgt men pseudofinaliteit. BCN: probabilistisch rekenen (net als quantum computing, ook zo’n “hype”?). Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
17 / 19
Assessment Bitcoin en andere BCN gebaseerde systemen leveren NOOIT finaliteit, uitsluitend pseudofinaliteit. de bijbehorende kansrekening is eigenlijk een belief-theorie (geen enkele kans is bekend), Bitcoin is “cryptologisch naief” (tot onverdedigbaar), maar dit aspect valt te verbeteren (wachten op nieuwe USA/NIST standaards en dan ook compliance nastreven), En de pseudofinaliteit geldt niet voor de gehele toekomst maar slechts voor een beperkte periode. Op de lange termijn kan het heel fout gaan (miningmonopolie), pseudofinaliteit is er voor beperkte tijd en dan nog alleen onder de aanname van goed nieuws (= geen slecht nieuws, = geen melding dat er een ongewenst miningmonopolie is waargenomen), En nu is de mining de de daarbij behoren reward nog niet behandeld. Maar mining is essentieel voor Bitcoin want zo ontstaat het volume aan BTXs. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
18 / 19
Tot slot Een account is een public key van een PK systeem. Er zijn er zoveel, iedereen mag er dagelijks duizenden aanmaken en dan raakt het nog niet “op”. Private key zoek, BTC ook zoek, en komt nooit meer terug. (Vererven vergt overdracht van de key, niet alleen de notaris.) De blockchain is voor iedereen altijd in te zien (ga meedoen en je krijgt ’m toegestuurd). Anonimiteit is niet gegarandeerd. Dat vergt een laag met mixing er bovenop (oud idee van David Chaum). Bitcoin is/wordt gebruikt door “de onderwereld”. Bitcoin staat voor het meest conservatieve concept van geld!: anoniem te gebruiken munten (in theorie). Bitcoin is zelf geen nieuwlichterlij, in tegendeel het wil juist een REM zetten op innovaties die de soliditeit van het bestaande geldsysteem verlagen. Met alleen Bitcoin geen QE. Jan Bergstra (STCS)
Informatics Institute
9 maart, 2016
19 / 19