<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Btceic</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Btceic"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Btceic"/>
	<updated>2026-05-15T15:02:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Network&amp;diff=48567</id>
		<title>Network</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Network&amp;diff=48567"/>
		<updated>2014-06-30T23:56:12Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Bitcoin uses a simple broadcast network to propagate transactions and blocks. All communications are done over TCP. Bitcoin is fully able to use ports other than 8333 via the -port parameter. IPv6 is [https://bitcointalk.org/index.php?topic=81378.0 suported] with Bitcoind/Bitcoin-Qt v0.7.&lt;br /&gt;
&lt;br /&gt;
== Messages ==&lt;br /&gt;
* &#039;&#039;version&#039;&#039; - Information about program version and block count. Exchanged when first connecting.&lt;br /&gt;
* &#039;&#039;verack&#039;&#039; - Sent in response to a version message to acknowledge that we are willing to connect.&lt;br /&gt;
* &#039;&#039;addr&#039;&#039; - List of one or more IP addresses and ports.&lt;br /&gt;
* &#039;&#039;inv&#039;&#039; - &amp;quot;I have these blocks/transactions: ...&amp;quot; Normally sent only when a &#039;&#039;new&#039;&#039; block or transaction is being relayed. This is only a list, not the actual data.&lt;br /&gt;
* &#039;&#039;getdata&#039;&#039; - Request a single block or transaction by hash.&lt;br /&gt;
* &#039;&#039;getblocks&#039;&#039; - Request an &#039;&#039;inv&#039;&#039; of all blocks in a range.&lt;br /&gt;
* &#039;&#039;getheaders&#039;&#039; - Request a &#039;&#039;headers&#039;&#039; message containing all block headers in a range.&lt;br /&gt;
* &#039;&#039;tx&#039;&#039; - Send a transaction. This is sent only in response to a &#039;&#039;getdata&#039;&#039; request.&lt;br /&gt;
* &#039;&#039;block&#039;&#039; - Send a block. This is sent only in response to a &#039;&#039;getdata&#039;&#039; request.&lt;br /&gt;
* &#039;&#039;headers&#039;&#039; - Send up to 2,000 block headers. Non-generators can download the headers of blocks instead of entire blocks.&lt;br /&gt;
* &#039;&#039;getaddr&#039;&#039; - Request an &#039;&#039;addr&#039;&#039; message containing a bunch of known-active peers (for bootstrapping).&lt;br /&gt;
* &#039;&#039;submitorder&#039;&#039;, &#039;&#039;checkorder&#039;&#039;, and &#039;&#039;reply&#039;&#039; - Used when performing an [[IP address|IP transaction]].&lt;br /&gt;
* &#039;&#039;alert&#039;&#039; - Send a network alert.&lt;br /&gt;
* &#039;&#039;ping&#039;&#039; - Does nothing. Used to check that the connection is still online. A TCP error will occur if the connection has died.&lt;br /&gt;
&lt;br /&gt;
More information and in-depth technical information is in the [[Protocol Specification]].&lt;br /&gt;
&lt;br /&gt;
== Connection ==&lt;br /&gt;
&lt;br /&gt;
To connect to a peer, you send a &#039;&#039;version&#039;&#039; message containing your version number, block count, and current time. The remote peer will send back a &#039;&#039;verack&#039;&#039; message and his own &#039;&#039;version&#039;&#039; message if he is accepting connections from your version. You will respond with your own &#039;&#039;verack&#039;&#039; if you are accepting connections from his version.&lt;br /&gt;
&lt;br /&gt;
The time data from all of your peers is collected, and the median is used by Bitcoin for all network tasks that use the time (except for other version messages).&lt;br /&gt;
&lt;br /&gt;
You then exchange &#039;&#039;getaddr&#039;&#039; and &#039;&#039;addr&#039;&#039; messages, storing all addresses that you don&#039;t know about. &#039;&#039;addr&#039;&#039; messages often contain only one address, but sometimes contain up to 1000. This is most common at the beginning of an exchange.&lt;br /&gt;
&lt;br /&gt;
== Standard relaying ==&lt;br /&gt;
&lt;br /&gt;
When someone sends a transaction, they send an &#039;&#039;inv&#039;&#039; message containing it to all of their peers. Their peers will request the full transaction with &#039;&#039;getdata&#039;&#039;. If they consider the transaction valid after receiving it, they will also broadcast the transaction to all of their peers with an &#039;&#039;inv&#039;&#039;, and so on. Peers ask for or relay transactions only if they don&#039;t already have them. A peer will never rebroadcast a transaction that it already knows about, though transactions will eventually be forgotten if they don&#039;t get into a block after a while. The sender and receiver of the transaction will rebroadcast, however.&lt;br /&gt;
&lt;br /&gt;
Anyone who is generating will collect valid received transactions and work on including them in a block. When someone does find a block, they send an &#039;&#039;inv&#039;&#039; containing it to all of their peers, as above. It works the same as transactions.&lt;br /&gt;
&lt;br /&gt;
Everyone broadcasts an &#039;&#039;addr&#039;&#039; containing their own IP address every 24 hours. Nodes relay these messages to a couple of their peers and store the address if it&#039;s new to them. Through this system, everyone has a reasonably clear picture of which IPs are connected to the network at the moment. After connecting to the network, you get added to everyone&#039;s address database almost instantly because of your initial &#039;&#039;addr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Network alerts are broadcast with &#039;&#039;alert&#039;&#039; messages. No &#039;&#039;inv&#039;&#039;-like system is used; these contain the entire alert. If a received alert is valid (signed by one of the people with the private key), it is relayed to all peers. For as long as an alert is still in effect, it is rebroadcast at the start of every new connection.&lt;br /&gt;
&lt;br /&gt;
== Initial block download ==&lt;br /&gt;
&lt;br /&gt;
At the start of a connection, you send a &#039;&#039;getblocks&#039;&#039; message containing the hash of the latest block you know about. If the peer doesn&#039;t think that this is the latest block, it will send an &#039;&#039;inv&#039;&#039; that contains up to 500 blocks ahead of the one you listed. You will then request all of these blocks with &#039;&#039;getdata&#039;&#039;, and the peer will send them to you with &#039;&#039;block&#039;&#039; messages. After you have downloaded and processed all of these blocks, you will send another &#039;&#039;getblocks&#039;&#039;, etc., until you have all of the blocks.&lt;br /&gt;
&lt;br /&gt;
== Thin SPV Clients ==&lt;br /&gt;
&lt;br /&gt;
[[BIP 0037]] introduced support for thin or lite clients by way of Simple Payment Verification. SPV clients do not need to download the full block contents to verify the existence of funds in the blockchain, but rely on the chain of block headers and bloom filters to obtain the data they need from other nodes. This method of client communication allows high security trustless communication with full nodes, but at the expensive of some privacy as the peers can deduce which addresses the SPV client is seeking information about. &lt;br /&gt;
&lt;br /&gt;
[[MultiBit]] and [[Bitcoin Wallet]] work in this fashion using the library [[bitcoinj]] as their foundation.  &lt;br /&gt;
&lt;br /&gt;
== Bootstrapping ==&lt;br /&gt;
&lt;br /&gt;
You choose which peers to connect to by sorting your address database by the time since you last saw the address and then adding a bit of randomization.&lt;br /&gt;
&lt;br /&gt;
Bitcoin has three methods of finding peers.&lt;br /&gt;
&lt;br /&gt;
=== Addr ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;addr&#039;&#039; messages described above create an effect similar to the IRC bootstrapping method. You know reasonably quickly whenever a peer joins, though you won&#039;t know for a while when they leave.&lt;br /&gt;
&lt;br /&gt;
Bitcoin comes with a list of addresses known as &amp;quot;seed nodes&amp;quot;. If you are unable to connect to IRC and you&#039;ve never connected to the network before, the client will update the address database by connecting to one of the nodes from this list.&lt;br /&gt;
&lt;br /&gt;
The -addnode command line option can be used to manually add a node.  The -connect option can force bitcoin to connect only to a specific node.&lt;br /&gt;
&lt;br /&gt;
=== DNS ===&lt;br /&gt;
&lt;br /&gt;
Bitcoin looks up the IP Addresses of several host names and adds those to the list of potential addresses.  This is the default seeding mechanism, as of v0.6.x and later.&lt;br /&gt;
&lt;br /&gt;
=== IRC ===&lt;br /&gt;
&lt;br /&gt;
As-of version 0.6.x of the Bitcoin client, IRC bootstrapping is no longer enabled by default.  The information below is accurate for most versions prior.&lt;br /&gt;
&lt;br /&gt;
Bitcoin joins a random channel between #bitcoin00 and #bitcoin99 on irc.lfnet.org. Your nick is set to an encoded form of your IP address. By decoding all the nicks of all users on the channel, you get a list of all IP addresses currently connected to Bitcoin.&lt;br /&gt;
&lt;br /&gt;
For hosts that cannot make outbound connections on port 6667, the lfnet servers are also [[FAQ#Do_I_need_to_configure_my_firewall_to_run_bitcoin?|listening on port 7777]].&lt;br /&gt;
&lt;br /&gt;
== Heartbeat ==&lt;br /&gt;
&lt;br /&gt;
If thirty minutes or more has passed since the client has transmitted any messages it will transmit a message to keep the connection to the peer node alive.&lt;br /&gt;
&lt;br /&gt;
If ninety minutes has passed since a peer node has communicated any messages, then the client will assume that connection has closed.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Protocol Specification]]&lt;br /&gt;
* [[Satoshi Client Node Discovery]]&lt;br /&gt;
* [http://bitcoinstatus.rowit.co.uk/ Historical Network Status (no longer updated)]&lt;br /&gt;
* [http://getaddr.bitnodes.io/ Bitnodes.io&#039;s network size estimate]&lt;br /&gt;
* [http://fullnode.info/howto.html How to run your own cheap full bitcoin node]&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
&lt;br /&gt;
[[pl:Sieć]]&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin_pdf&amp;diff=45436</id>
		<title>Bitcoin pdf</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin_pdf&amp;diff=45436"/>
		<updated>2014-03-26T11:22:02Z</updated>

		<summary type="html">&lt;p&gt;Btceic: Redirected page to Bitcoin white paper&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Bitcoin white paper]]&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Btceic&amp;diff=45435</id>
		<title>User:Btceic</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Btceic&amp;diff=45435"/>
		<updated>2014-03-26T11:20:48Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Eric Cogen&lt;br /&gt;
&lt;br /&gt;
Developer, Bitcoin Enthusiast&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [https://plus.google.com/+EricCogen +EricCogen] Google+ account&lt;br /&gt;
* [https://twitter.com/ericcogen @EricCogen] Twitter account&lt;br /&gt;
* [https://bitcoinrt.info/ Monitor all of your bitcoin addresses! Safely. Securely. In Real Time. For Free] BitcoinRT.info&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay_talk:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45434</id>
		<title>Essay talk:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay_talk:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45434"/>
		<updated>2014-03-26T11:18:07Z</updated>

		<summary type="html">&lt;p&gt;Btceic: Created page with &amp;quot;user:btceic This page could use some help with formatting.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[user:btceic]] This page could use some help with formatting.&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=White_paper&amp;diff=45433</id>
		<title>White paper</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=White_paper&amp;diff=45433"/>
		<updated>2014-03-26T11:14:46Z</updated>

		<summary type="html">&lt;p&gt;Btceic: redirect to bitcoin white paper&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Bitcoin white paper]]&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Bitcoin&amp;diff=45432</id>
		<title>Bitcoin</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Bitcoin&amp;diff=45432"/>
		<updated>2014-03-26T11:13:13Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&#039;&#039;&#039;Bitcoin&#039;&#039;&#039; is a decentralized [[digital currency]] created by developer [[Satoshi Nakamoto]]. It does not rely on a central server to process transactions or store funds. There are a maximum of 2,100,000,000,000,000 Bitcoin elements (called satoshis), currently most commonly measured in units of 100,000,000 known as BTC.&lt;br /&gt;
&lt;br /&gt;
{{As of|April 2013}}, it is the most widely used alternative currency,&amp;lt;ref name=&amp;quot;Quantitative Analysis of the Full Bitcoin Transaction Graph&amp;quot;&amp;gt;{{cite web|title=Quantitative Analysis of the Full Bitcoin Transaction Graph|url=http://eprint.iacr.org/2012/584.pdf|publisher=Cryptology ePrint Archive|accessdate=18 October 2012|author=Ron Dorit|coauthors=Adi Shamir|page=17|quote=The Bitcoin system is the best known and most widely used alternative payment scheme,...}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Mt.Gox data&amp;quot;&amp;gt;{{Cite web|title=Mt.Gox data|url=http://bitcoincharts.com/markets/mtgoxUSD.html|publisher=Bitcoincharts}}&amp;lt;/ref&amp;gt;  now with the total market cap over 11 billion US dollars&amp;lt;ref&amp;gt;{{cite web|title=Market Capitalization|url=http://blockchain.info/charts/market-cap|publisher=Blockchain.info|accessdate=7 April 2013}}&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Bitcoin has no central issuer; instead, the peer-to-peer network regulates Bitcoins, transactions and issuance according to consensus in network software.&lt;br /&gt;
Bitcoins are issued to various nodes that verify transactions through computing power;&lt;br /&gt;
it is established that there will be a limited and scheduled release of no more than 21 million BTC worth of coins, which will be fully issued by the year 2140.&lt;br /&gt;
&lt;br /&gt;
Internationally, Bitcoins can be exchanged and managed through various websites and [[software]] along with physical banknotes and coins.&amp;lt;ref&amp;gt;{{Cite web|title=Physical Bitcoins by Casascius|url=https://www.casascius.com/|publisher=Casascius Coins|accessdate=29 September 2012}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|title=Bitbills|url=http://www.bitbills.com/|publisher=Bitbills|accessdate=29 September 2012}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
:Main article: [[History]]&lt;br /&gt;
&lt;br /&gt;
A cryptographic system for untraceable payments was first described by David Chaum in 1982.&amp;lt;ref&amp;gt;[http://blog.koehntopp.de/uploads/Chaum.BlindSigForPayment.1982.PDF David Chaum, Blind signatures for untraceable payments], Advances in Cryptology - Crypto &#039;82, Springer-Verlag (1983), 199–203.&amp;lt;/ref&amp;gt; In 1990 Chaum extended this system to create the first cryptographic anonymous electronic cash system.,&amp;lt;ref&amp;gt;{{cite journal|journal=Lecture Notes in Computer Science|last1=Chaum|first1=David|last2=Fiat|first2=Amos|last3=Naor|first3=Moni|title=Untraceable Electronic Cash|url=http://blog.koehntopp.de/uploads/chaum_fiat_naor_ecash.pdf}}&amp;lt;/ref&amp;gt; which became known as ecash.&lt;br /&gt;
&amp;lt;ref&amp;gt;{{cite web|url=http://www.wired.com/wired/archive/2.12/emoney.html|publisher=Wired|title=E-Money (That&#039;s What I Want)|date=1994–2012|author=Steven Levy}}&amp;lt;/ref&amp;gt; In 1998 Wei Dai published a description of an anonymous, distributed electronic cash system which he called &amp;quot;b-money&amp;quot;.&amp;lt;ref&amp;gt;{{cite web|title=B-Money|url=http://www.weidai.com/bmoney.txt|author=Wei Dai|year=1998}}&amp;lt;/ref&amp;gt; Around the same time, Nick Szabo created &#039;&#039;bit gold&#039;&#039;.&amp;lt;ref&amp;gt;{{cite web|url=http://spectrum.ieee.org/computing/software/bitcoin-the-cryptoanarchists-answer-to-cash/0|title=Bitcoin: The Cryptoanarchists’ Answer to Cash|publisher=IEEE Spectrum|quote=Around the same time, Nick Szabo, a computer scientist who now blogs about law and the history of money, was one of the first to imagine a new digital currency from the ground up. Although many consider his scheme, which he calls “bit gold,” to be a precursor to Bitcoin}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;bitgold&amp;quot;&amp;gt;{{cite web|title=Bit gold|url=http://unenumerated.blogspot.co.uk/2005/12/bit-gold.html|author=Nick Szabo|quote=My proposal for bit gold is based on computing a string of bits from a string of challenge bits, using functions called variously &amp;quot;client puzzle function,&amp;quot; &amp;quot;proof of work function,&amp;quot; or &amp;quot;secure benchmark function.&amp;quot;. The resulting string of bits is the proof of work.... The last-created string of bit gold provides the challenge bits for the next-created string.}}&amp;lt;/ref&amp;gt; Like Bitcoin, &#039;&#039;Bit gold&#039;&#039; was a currency system where users would compete to solve a [[proof of work]] function, with solutions being cryptographically chained together and published via a distributed property title registry. A variant of &#039;&#039;Bit gold&#039;&#039;, called &#039;&#039;Reusable Proofs of Work&#039;&#039;, was implemented by Hal Finney.&amp;lt;ref name=&amp;quot;bitgold&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In 2008, Satoshi Nakamoto published a [[Bitcoin_white_paper|paper]]&amp;lt;ref name=&amp;quot;whitepaper&amp;quot;&amp;gt;{{cite web&lt;br /&gt;
 |last= Nakamoto&lt;br /&gt;
 |first= Satoshi&lt;br /&gt;
 |title= Bitcoin: A Peer-to-Peer Electronic Cash System&lt;br /&gt;
 |url= http://www.cs.kent.edu/~JAVED/class-P2P12F/papers-2012/PAPER2012-p2p-bitcoin-satoshinakamoto.pdf&lt;br /&gt;
 |accessdate = 14 December 2010&lt;br /&gt;
 |date= 24 May 2009&lt;br /&gt;
 |postscript=&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |url= http://article.gmane.org/gmane.comp.encryption.general/12588/&lt;br /&gt;
 |title= Bitcoin P2P e-cash paper&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; on The Cryptography Mailing list at metzdowd.com&amp;lt;ref&amp;gt;[http://www.mail-archive.com/search?l=cryptography@metzdowd.com&amp;amp;q=from:%22Satoshi+Nakamoto%22 Satoshi&#039;s posts to Cryptography mailing list]&amp;lt;/ref&amp;gt; describing the Bitcoin protocol.&lt;br /&gt;
&lt;br /&gt;
The Bitcoin network came into existence on 3 January 2009 with the release of the first Bitcoin client, [[wxBitcoin]], and the issuance of the first Bitcoins.&amp;lt;ref&amp;gt;{{cite web |title=Block 0 – Bitcoin Block Explorer |url=http://blockexplorer.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |url=http://www.mail-archive.com/cryptography@metzdowd.com/msg10142.html |title=Bitcoin v0.1 released}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |url=http://sourceforge.net/news/?group_id=244765 |title=SourceForge.net: Bitcoin}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
A year after, the initial exchange rates for Bitcoin were set by individuals on the bitcointalk forums.{{Citation needed|date=October 2012}} The most significant transaction involved a 10,000 BTC pizza.&amp;lt;ref&amp;gt;{{cite web|title=The Rise and Fall of Bitcoin|url=http://www.wired.com/magazine/2011/11/mf_bitcoin/|publisher=Wired|accessdate=13 October 2012}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
Today, the majority of Bitcoin exchanges occur on the [[MtGox]] Bitcoin exchange.&lt;br /&gt;
&lt;br /&gt;
In 2011, Wikileaks,&amp;lt;ref&amp;gt;{{cite news&lt;br /&gt;
 |last= Greenberg&lt;br /&gt;
 |first= Andy&lt;br /&gt;
 |url= http://blogs.forbes.com/andygreenberg/2011/06/14/wikileaks-asks-for-anonymous-bitcoin-donations/&lt;br /&gt;
 |title= WikiLeaks Asks For Anonymous Bitcoin Donations – Andy Greenberg – The Firewall – Forbes&lt;br /&gt;
 |publisher= Blogs.forbes.com&lt;br /&gt;
 |date= 2011-06-14&lt;br /&gt;
 |accessdate = 2011-06-22&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; [[Freenet]],&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |url= https://freenetproject.org/donate.html&lt;br /&gt;
 |title= /donate&lt;br /&gt;
 |publisher= The Freenet Project&lt;br /&gt;
 |date=&lt;br /&gt;
 |accessdate = 2011-06-22&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; Singularity Institute,&amp;lt;ref&amp;gt;[http://singinst.org/donate/ SIAI donation page]&amp;lt;/ref&amp;gt; Internet Archive,&amp;lt;ref&amp;gt;[http://www.archive.org/donate/index.php Internet Archive donation page]&amp;lt;/ref&amp;gt; Free Software Foundation&amp;lt;ref&amp;gt;[https://my.fsf.org/donate/other/ Other ways to donate]&amp;lt;/ref&amp;gt; and others, began to accept donations in Bitcoin. The Electronic Frontier Foundation did so for a while but has since stopped, citing concerns about a lack of legal precedent about new currency systems, and because they &amp;quot;generally don&#039;t endorse any type of product or service.&amp;quot;&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |url= https://www.eff.org/deeplinks/2011/06/eff-and-bitcoin&lt;br /&gt;
 |title= EFF and Bitcoin &amp;amp;#124; Electronic Frontier Foundation&lt;br /&gt;
 |publisher= Eff.org&lt;br /&gt;
 |date= 2011-06-14&lt;br /&gt;
 |accessdate = 2011-06-22&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; Some small businesses had started to adopt Bitcoin. LaCie, a public company, accepts Bitcoin for its Wuala service.&amp;lt;ref&amp;gt;{{Cite web|url=http://www.wuala.com/en/bitcoin |title=Secure Online Storage – Backup. Sync. Share. Access Everywhere |publisher=Wuala |date= |accessdate = 2012-01-24}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In 2012, BitPay reports of having over 1000 merchants accepting Bitcoin under its payment processing service.&amp;lt;ref&amp;gt;{{cite web|title=BitPay Signs 1,000 Merchants to Accept Bitcoin Payments|url=http://www.americanbanker.com/issues/177_176/bitpay-signs-1000-merchants-to-accept-bitcoin-payments-1052538-1.html|publisher=American Banker|accessdate=12 October 2012}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Administration==&lt;br /&gt;
Bitcoin is administered through a decentralized peer-to-peer network.&amp;lt;ref name=&amp;quot;whitepaper&amp;quot;/&amp;gt; Cryptographic technologies and the peer-to-peer network of computing power enables users to make and verify irreversible, instant online Bitcoin payments, without an obligation to trust and use centralized banking institutions and authorities. Dispute resolution services are not made directly available. Instead it is left to the users to verify and trust the parties they are sending money to through their choice of methods. &lt;br /&gt;
&lt;br /&gt;
Bitcoins are issued according to rules agreed to by the majority of the computing power within the Bitcoin network. The core rules describing the predictable issuance of Bitcoins to its verifying servers, a voluntary and competitive transaction fee system and the hard limit of no more than 21 million BTC issued in total.&amp;lt;ref name=&amp;quot;whitepaper&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bitcoin does not require a central bank, State,&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |url= http://spectrum.ieee.org/computing/software/bitcoin-the-cryptoanarchists-answer-to-cash/3&lt;br /&gt;
 |title= Bitcoin: The Cryptoanarchists&#039; Answer to Cash&lt;br /&gt;
 |publisher= IEEE.org&lt;br /&gt;
 |date= June 2012&lt;br /&gt;
 |accessdate = 2012-06-05&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; or incorporated backers.&lt;br /&gt;
&lt;br /&gt;
==Services==&lt;br /&gt;
:Main article: [[Wallet]]&lt;br /&gt;
&lt;br /&gt;
Bitcoins are sent and received through software and websites called wallets. They send and confirm transactions to the network through Bitcoin addresses, the identifiers for users&#039; Bitcoin wallets within the network.&amp;lt;ref name=&amp;quot;whitepaper&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Bitcoin addresses===&lt;br /&gt;
:Main article: [[Address]]&lt;br /&gt;
&lt;br /&gt;
Payments are made to Bitcoin &amp;quot;addresses&amp;quot;: human-readable strings of numbers and letters around 33 characters in length, always beginning with the digit 1 or 3, as in the example of &#039;&#039;31uEbMgunupShBVTewXjtqbBv5MndwfXhb&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Users obtain new Bitcoin addresses from their Bitcoin software. Creating a new address can be a completely offline process and require no communication with the Bitcoin network.&lt;br /&gt;
&lt;br /&gt;
===Transaction fees===&lt;br /&gt;
:Main article: [[Transaction fees]]&lt;br /&gt;
Transaction fees may be included with any transfer of Bitcoins. {{As of|2012}} many transactions are processed in a way which makes no charge for the transaction. For transactions which consume or produce many coins (and therefore have a large data size), a small transaction fee is usually expected.&lt;br /&gt;
&lt;br /&gt;
===Confirmations===&lt;br /&gt;
:Main article: [[Confirmation]]&lt;br /&gt;
&lt;br /&gt;
The network&#039;s software confirms a transaction when it records it in a block. Further blocks of transactions confirm it even further. After six confirmations/blocks, a transaction is confirmed beyond reasonable doubt.&lt;br /&gt;
&lt;br /&gt;
The network must store the whole transaction history inside the blockchain, which grows constantly as new records are added and never removed. Nakamoto conceived that as the database became larger, users would desire applications for Bitcoin that didn&#039;t store the entire database on their computer. To enable this, the blockchain uses a [[merkle tree]] to organize the transaction records in such a way that client software can locally delete portions of its own database it knows it will never need, such as earlier transaction records of Bitcoins that have changed ownership multiple times.&lt;br /&gt;
&lt;br /&gt;
==Economics==&lt;br /&gt;
&lt;br /&gt;
===Initial distribution===&lt;br /&gt;
&lt;br /&gt;
Bitcoin has no centralized issuing authority.&amp;lt;ref name=&amp;quot;ars-06-08-11&amp;quot;&amp;gt;&lt;br /&gt;
{{Cite news&lt;br /&gt;
 |first= Thomas&lt;br /&gt;
 |last= Lowenthal&lt;br /&gt;
 |title= Bitcoin: inside the encrypted, peer-to-peer digital currency&lt;br /&gt;
 |newspaper= Ars Technica&lt;br /&gt;
 |date= 8 June 2011&lt;br /&gt;
 |url= http://arstechnica.com/tech-policy/news/2011/06/bitcoin-inside-the-encrypted-peer-to-peer-currency.ars&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite news&lt;br /&gt;
 |author= Sponsored by&lt;br /&gt;
 |url= http://www.economist.com/blogs/babbage/2011/06/virtual-currency&lt;br /&gt;
 |title= Virtual currency: Bits and bob&lt;br /&gt;
 |publisher= The Economist&lt;br /&gt;
 |date=&lt;br /&gt;
 |accessdate = 2011-06-22&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |last= Geere&lt;br /&gt;
 |first= Duncan&lt;br /&gt;
 |url= http://www.wired.co.uk/news/archive/2011-05/16/bitcoin-p2p-currency&lt;br /&gt;
 |title= Peer-to-peer currency Bitcoin sidesteps financial institutions (Wired UK)&lt;br /&gt;
 |publisher= Wired.co.uk&lt;br /&gt;
 |date=&lt;br /&gt;
 |accessdate = 2011-06-22&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; The network is programmed to increase the money supply as a geometric series until the total number of Bitcoins reaches 21 million BTC.&amp;lt;ref name=&amp;quot;Quantitative Analysis of the Full Bitcoin Transaction Graph&amp;quot;/&amp;gt; {{As of|2012|10}} slightly over 10 million of the total 21 million BTC had been created; the current total number created is available online.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |title= Total Number of Bitcoins in Existence&lt;br /&gt;
 |url= http://blockexplorer.com/q/totalbc&lt;br /&gt;
 |work= Bitcoin Block Explorer&lt;br /&gt;
 |accessdate = 2012-10-03&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; By 2013 half of the total supply will have been generated, and by 2017, three-quarters will have been generated. To ensure sufficient granularity of the [[money supply]], clients can divide each BTC unit down to eight decimal places (a total of 2.1&amp;amp;nbsp;×&amp;amp;nbsp;10&amp;lt;sup&amp;gt;15&amp;lt;/sup&amp;gt; or 2.1 quadrillion units).&amp;lt;ref name=&amp;quot;lwn&amp;quot;&amp;gt;{{Cite news&lt;br /&gt;
 |author= Nathan Willis&lt;br /&gt;
 |date= 2010-11-10&lt;br /&gt;
 |title= Bitcoin: Virtual money created by CPU cycles&lt;br /&gt;
 |publisher= LWN.net&lt;br /&gt;
 |url= http://lwn.net/Articles/414452/&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The network {{As of|2012|lc=on}} required over one million times more work for confirming a block and receiving an award (25 BTC {{As of|2012|2|lc=on}}) than when the first blocks were confirmed.&lt;br /&gt;
The difficulty is automatically adjusted every 2016 blocks based on the time taken to find the previous 2016 blocks such that one block is created roughly every 10 minutes.&lt;br /&gt;
&lt;br /&gt;
Those who chose to put computational and electrical resources toward mining early on had a greater chance at receiving awards for block generations. This served to make available enough processing power to process blocks. Indeed, without miners there are no transactions and the Bitcoin economy comes to a halt.&lt;br /&gt;
&lt;br /&gt;
===Exchange rate===&lt;br /&gt;
Prices fluctuate relative to goods and services more than more widely accepted currencies;&lt;br /&gt;
the price of a Bitcoin is not static.&lt;br /&gt;
&lt;br /&gt;
In August 2012, 1 BTC traded at around $10.00 USD. Taking into account the total number of Bitcoins mined, the monetary base of the Bitcoin network stands at over 110 million USD.&amp;lt;ref&amp;gt;[http://www.bitcoinwatch.com/ http://www.bitcoinwatch.com/] Bitcoin statistics&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Security ==&amp;lt;!--Please keep as starting template--&amp;gt;&lt;br /&gt;
:Main article: [[Weaknesses]]&lt;br /&gt;
&lt;br /&gt;
In the history of bitcoin, there have been a few [[incidents]], caused by problematic as well as malicious transactions. In the worst such incident, and the only one of its type, a person was able to pretend that he had a practically infinite supply of bitcoins, for almost 9 hours.&lt;br /&gt;
&lt;br /&gt;
Bitcoin relies, among other things, on [http://en.wikipedia.org/wiki/Public-key_cryptography public key cryptography] and thus may be vulnerable to [http://en.wikipedia.org/wiki/Elliptic_curve_cryptography#Quantum_computing_attacks quantum computing attacks] if and when practical quantum computers can be constructed.&lt;br /&gt;
&lt;br /&gt;
If multiple different software packages, whose usage becomes widespread on the Bitcoin network, disagree on the protocol and the rules for transactions, this could potentially cause a fork in the block chain, with each faction of users being able to accept only their own version of the history of transactions. This could influence the price of bitcoins.&lt;br /&gt;
&lt;br /&gt;
A global, organized campaign against the currency or the software could also influence the demand for bitcoins, and thus the exchange price.&lt;br /&gt;
&lt;br /&gt;
==Bitcoin mining==&lt;br /&gt;
:Main article: [[Mining]]&lt;br /&gt;
&lt;br /&gt;
Bitcoin mining nodes are responsible for managing the Bitcoin network.&lt;br /&gt;
&lt;br /&gt;
Bitcoins are awarded to Bitcoin nodes known as &amp;quot;miners&amp;quot; for the solution to a difficult [[proof-of-work]] problem which confirms transactions and prevents double-spending. This incentive, as the Nakamoto white paper describes it, encourages &amp;quot;nodes to support the network, and provides a way to initially distribute coins into circulation, since no central authority issues them.&amp;quot;&amp;lt;ref name=&amp;quot;whitepaper&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nakamoto compared the generation of new coins by expending CPU time and electricity to gold miners expending resources to add gold to circulation.&amp;lt;ref name=&amp;quot;whitepaper&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Node operation===&lt;br /&gt;
&lt;br /&gt;
The node software for the Bitcoin network is based on peer-to-peer networking, digital signatures and cryptographic proof to make and verify transactions. Nodes broadcast transactions to the network, which records them in a public record of all transactions, called the &#039;&#039;blockchain&#039;&#039;, after validating them with a [[proof-of-work|proof-of-work system]].&lt;br /&gt;
&lt;br /&gt;
Satoshi Nakamoto designed the first Bitcoin node and mining software&amp;lt;ref name=&amp;quot;processors&amp;quot;&amp;gt;{{Cite news&lt;br /&gt;
 |last= Davis&lt;br /&gt;
 |first= Joshua&lt;br /&gt;
 |title= The Crypto-Currency&lt;br /&gt;
 |url= http://www.wired.com/magazine/2011/11/mf_bitcoin/all&lt;br /&gt;
 |accessdate = 11 November 2011&lt;br /&gt;
 |newspaper= Wired Magazine&lt;br /&gt;
 |date= 10 November 2011&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; and developed the majority of the first implementation, Bitcoind, from 2007 to mid-2010.&amp;lt;ref name=&amp;quot;code_start&amp;quot;&amp;gt;{{cite web&lt;br /&gt;
 |url= https://bitcointalk.org/index.php?topic=13.msg46#msg46&lt;br /&gt;
 |title= Questions about Bitcoin&lt;br /&gt;
 |publisher= Bitcoin forum&lt;br /&gt;
 |date= 2009-12-10&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Node implementations include core software such as Bitcoind/Bitcoin-Qt, [[libbitcoin]], [[cbitcoin]]&amp;lt;ref&amp;gt;{{Cite web|title=cbitcoin|url=https://github.com/MatthewLM/cbitcoin|accessdate=3 October 2012}}&amp;lt;/ref&amp;gt; and [[BitCoinJ|bitcoinj]].&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |url= http://news.slashdot.org/story/11/03/23/0210207/Google-Engineer-Releases-Open-Source-Bitcoin-Client&lt;br /&gt;
 |title= Google Engineer Releases Open Source Bitcoin Client&lt;br /&gt;
 |author= angry tapir, timothy&lt;br /&gt;
 |date= 23 March 2011&lt;br /&gt;
 |publisher= Slashdot&lt;br /&gt;
 |accessdate = 2011-05-18&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |url= http://www.javaworld.com/javaworld/jw-01-2012/120110-bitcoin-for-beginners-3.html?page=1&lt;br /&gt;
 |title= Bitcoin for beginners: The BitcoinJ API&lt;br /&gt;
 |author= Dirk Merkel&lt;br /&gt;
 |date= 10 January 2012&lt;br /&gt;
 |publisher= JavaWorld&lt;br /&gt;
 |accessdate = 2012-08-03&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every node in the Bitcoin network collects all the unacknowledged transactions it knows of in a file called a &#039;&#039;block&#039;&#039;, which also contains a reference to the previous valid block known to that node. It then appends a [[nonce]] value to this previous block and computes the SHA-256 cryptographic hash of the block and the appended nonce value. The node repeats this process until it adds a nonce that allows for the generation of a hash with a value lower than a specified &#039;&#039;target&#039;&#039;. Because computers cannot practically reverse the hash function, finding such a nonce is hard and requires on average a predictable amount of repetitious trial and error. This is where the &#039;&#039;[[proof-of-work]]&#039;&#039; concept comes in to play.  When a node finds such a solution, it announces it to the rest of the network. Peers receiving the new solved block validate it by computing the hash and checking that it really starts with the given number of zero bits (i.e., that the hash is within the target). Then they accept it and add it to the chain.&lt;br /&gt;
&lt;br /&gt;
===Mining rewards===&lt;br /&gt;
In addition to receiving the pending transactions confirmed in the block, a generating node adds a &#039;&#039;generate&#039;&#039; transaction, which awards new Bitcoins to the operator of the node that generated the block. The system sets the payout of this generated transaction according to its defined inflation schedule.  The miner that generates a block also receives the fees that users have paid as an incentive to give particular transactions priority for faster confirmation.&lt;br /&gt;
&lt;br /&gt;
The network never creates more than a 50&amp;amp;nbsp;BTC reward per block and this amount will decrease over time towards zero, such that no more than 21 million BTC will ever exist.&amp;lt;ref name=&amp;quot;lwn&amp;quot; /&amp;gt; As this payout decreases, the incentive for users to run block-generating nodes is intended to change to earning [[#Transaction fees|transaction fees]].&lt;br /&gt;
&lt;br /&gt;
===Mining pools===&lt;br /&gt;
:Main article: [[Pooled mining]]&lt;br /&gt;
&lt;br /&gt;
Bitcoin users often pool computational effort to increase the stability of the collected fees and subsidy they receive.&amp;lt;ref name=&amp;quot;We Use Coins Mining&amp;quot;&amp;gt;{{cite web|title=About Bitcoin Mining|url=http://www.weusecoins.com/mining-guide.php|publisher=We Use Coins|accessdate=18 October 2012}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mining difficulty===&lt;br /&gt;
:Main article: [[Difficulty]]&lt;br /&gt;
&lt;br /&gt;
In order to throttle the creation of blocks, the difficulty of generating new blocks is adjusted over time.  If mining output increases or decreases, the difficulty increases or decreases accordingly.&lt;br /&gt;
&lt;br /&gt;
The adjustment is done by changing the threshold that a hash is required to be less than. A lower threshold means fewer possible hashes can be accepted, and thus a higher degree of difficulty.  The target rate of block generation is one block every 10 minutes, or 2016 blocks every two weeks.  Bitcoin changes the difficulty of finding a valid block every 2016 blocks, using the difficulty that would have been most likely to cause the prior 2016 blocks to have taken two weeks to generate, according to the timestamps on the blocks.  Technically, this is done by modeling the generation of Bitcoins as Poisson process.  All nodes perform and enforce the same difficulty calculation.&lt;br /&gt;
&lt;br /&gt;
Difficulty is intended as an automatic stabilizer allowing mining for Bitcoins to remain profitable in the long run for the most efficient miners, independently of the fluctuations in demand of Bitcoin in relation to other currencies.&lt;br /&gt;
&lt;br /&gt;
===Mining hardware===&lt;br /&gt;
:Main article: [[Mining Hardware Comparison]]&lt;br /&gt;
&lt;br /&gt;
Bitcoins used to be mined through Intel/AMD CPUs. {{As of | 2012}}, mining has gradually moved to [[GPU]] and [[FPGA]] hardware.&amp;lt;ref name=&amp;quot;bitcoinmag-butterfly&amp;quot; /&amp;gt; [[Application-specific integrated circuit|ASIC]]-based hardware for Bitcoin mining has been announced by several manufacturers who intend to ship products from late 2012 to early 2013.&amp;lt;ref name=&amp;quot;bitcoinmag-butterfly&amp;quot;&amp;gt;{{Cite web|title=Bitpay Breaks Daily Volume Record with Butterfly ASIC mining release|url=http://bitcoinmagazine.net/bitpay-breaks-daily-volume-record-with-butterfly-asic-mining-release/|publisher=Bitcoin Magazine}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Concerns==&lt;br /&gt;
&lt;br /&gt;
===As an investment===&lt;br /&gt;
Bitcoin describes itself as an experimental digital currency. Reuben Grinberg has noted that Bitcoin&#039;s supporters have argued that Bitcoin is neither a security or an investment because it fails to meet the criteria for either category.&amp;lt;ref name=&amp;quot;grinberg&amp;quot;&amp;gt;{{cite web | url=http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1817857 | title=Bitcoin: An Innovative Alternative Digital Currency | publisher=SSRN | date=9 December 2011 | accessdate=4 December 2012 | author=Grinberg, Reuben}}&amp;lt;/ref&amp;gt;  Although it is a virtual currency, some people see it as an investment&amp;lt;ref name=&amp;quot;cnbc&amp;quot;&amp;gt;{{cite web | url=http://www.cnbc.com/id/45030812/The_Pros_And_Cons_Of_Biting_on_Bitcoins | title=The Pros And Cons Of Biting on Bitcoins | publisher=CNBC | date=23 November 2011 | accessdate=4 December 2012 | author=Gustke, Constance}}&amp;lt;/ref&amp;gt; or accuse it of being a form of investment fraud known as a Ponzi scheme.&amp;lt;ref&amp;gt;{{cite web |url=http://www.theregister.co.uk/2011/06/08/bitcoin_under_attack/ |title=US senators draw a bead on Bitcoin |last1=Chirgwin |first1=Richard |date=8 June 2011 |publisher=The Register |accessdate=14 November 2012}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |url=http://uk.reuters.com/article/2012/04/01/uk-traders-bitcoin-idUKBRE8300JL20120401 |title=Bitcoin, the City traders&#039; anarchic new toy |last1=O&#039;Leary |first1=Naomi |date=2 April 2012 |publisher=Reuters |accessdate=14 November 2012}}&amp;lt;/ref&amp;gt; A report by the European Central Bank, using the U.S. Securities and Exchange Commission&#039;s definition of a Ponzi scheme, found that the use of bitcoins shares some characteristics with Ponzi schemes, but also has characteristics of its own which contradict several common aspects of Ponzi schemes.&amp;lt;ref name=&amp;quot;ecbreport&amp;quot;&amp;gt;{{cite web | url=http://www.ecb.europa.eu/pub/pdf/other/virtualcurrencyschemes201210en.pdf | title=Virtual Currency Schemes | publisher=European Central Bank | date=October 2012 | accessdate=4 December 2012}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Privacy===&lt;br /&gt;
Because transactions are broadcast to the entire network, they are inherently public. Unlike regular banking,&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |url= http://spectrum.ieee.org/computing/software/bitcoin-the-cryptoanarchists-answer-to-cash/0&lt;br /&gt;
 |title= Bitcoin: The Cryptoanarchists&#039; Answer to Cash&lt;br /&gt;
 |publisher= IEEE.org&lt;br /&gt;
 |date= June 2012&lt;br /&gt;
 |accessdate = 2012-06-05&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; which preserves customer privacy by keeping transaction records private, loose transactional privacy is accomplished in Bitcoin by using many unique addresses for every wallet, while at the same time publishing all transactions. As an example, if Alice sends 123.45 BTC to Bob, the network creates a public record that allows anyone to see that 123.45 has been sent from one address to another. However, unless Alice or Bob make their ownership of these addresses known, it is difficult for anyone else to connect the transaction with them. However, if someone connects an address to a user at any point they could follow back a series of transactions as each participant likely knows who paid them and may disclose that information on request or under duress.&lt;br /&gt;
&lt;br /&gt;
It can be difficult to associate Bitcoin identities with real-life identities.&amp;lt;ref name=&amp;quot;An Analysis of Anonymity in the Bitcoin System&amp;quot;&amp;gt;Fergal Reid and Martin Harrigan (24 July 2011). [http://anonymity-in-bitcoin.blogspot.com/2011/07/bitcoin-is-not-anonymous.html An Analysis of Anonymity in the Bitcoin System]. An Analysis of Anonymity in the Bitcoin System.&amp;lt;/ref&amp;gt; This property makes Bitcoin transactions attractive to sellers of illegal products.&amp;lt;ref name=&amp;quot;Forbes&amp;quot;&amp;gt;Andy Greenberg (20 April 2011). [http://www.forbes.com/forbes/2011/0509/technology-psilocybin-bitcoins-gavin-andresen-crypto-currency.html Crypto Currency]. Forbes Magazine.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |last= Madrigal&lt;br /&gt;
 |first= Alexis&lt;br /&gt;
 |title= Libertarian Dream? A Site Where You Buy Drugs With Digital Dollars&lt;br /&gt;
 |publisher= The Atlantic Monthly&lt;br /&gt;
 |date= 2011-06-01&lt;br /&gt;
 |url= http://www.theatlantic.com/technology/archive/2011/06/libertarian-dream-a-site-where-you-buy-drugs-with-digital-dollars/239776/&lt;br /&gt;
 |accessdate = 2011-06-05&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Illicit use===&lt;br /&gt;
&lt;br /&gt;
====Cracking====&lt;br /&gt;
The cracking organization &amp;quot;LulzSec&amp;quot; accepted donations in Bitcoin, having said that the group &amp;quot;needs Bitcoin donations to continue their hacking efforts&amp;quot;.&amp;lt;ref name=&amp;quot;CNET&amp;quot;&amp;gt;{{cite web&lt;br /&gt;
 |last= Reisinger&lt;br /&gt;
 |first= Don&lt;br /&gt;
 |url= http://news.cnet.com/8301-13506_3-20070268-17/senators-target-bitcoin-currency-citing-drug-sales/&lt;br /&gt;
 |title= Senators target Bitcoin currency, citing drug sales &amp;amp;#124; The Digital Home – CNET News&lt;br /&gt;
 |publisher= News.cnet.com&lt;br /&gt;
 |date= 2011-06-09&lt;br /&gt;
 |accessdate = 2011-06-22&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite news&lt;br /&gt;
 |last= Olson&lt;br /&gt;
 |first= Parmy&lt;br /&gt;
 |url= http://blogs.forbes.com/parmyolson/2011/06/06/lulzsec-hackers-posts-sony-dev-source-code-get-7k-donation/&lt;br /&gt;
 |title= LulzSec Hackers Post Sony Dev. Source Code, Get $7K Donation – Parmy Olson – Disruptors – Forbes&lt;br /&gt;
 |publisher= Blogs.forbes.com&lt;br /&gt;
 |date= 6 June 2011&lt;br /&gt;
 |accessdate = 2011-06-22&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Silk Road====&lt;br /&gt;
[[Silk Road]] is an anonymous black market that uses only the Bitcoin.&amp;lt;ref name=&amp;quot;npr-06-12-11&amp;quot;&amp;gt;&lt;br /&gt;
{{Cite news&lt;br /&gt;
 |url= http://www.npr.org/2011/06/12/137138008/silk-road-not-your-fathers-amazon-com&lt;br /&gt;
 |date= 12 June 2011&lt;br /&gt;
 |newspaper= NPR&lt;br /&gt;
 |title= Silk Road: Not Your Father&#039;s Amazon.com&lt;br /&gt;
 |author= Staff&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In a 2011 letter to Attorney General Eric Holder and the Drug Enforcement Administration, senators Charles Schumer of New York and Joe Manchin of West Virginia called for an investigation into Silk Road and the Bitcoin.&amp;lt;ref name=&amp;quot;npr-06-12-11&amp;quot;/&amp;gt;&lt;br /&gt;
Schumer described the use of Bitcoins at Silk Road as a form of money laundering.&amp;lt;ref name=&amp;quot;ars-06-08-11&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Botnet mining====&lt;br /&gt;
In June 2011, Symantec warned about the possibility of botnets engaging in covert &amp;quot;mining&amp;quot; of Bitcoins,&amp;lt;ref&amp;gt;{{Cite web|author=Updated: 17 June 2011 | Translations available: 日本語 |url=http://www.symantec.com/connect/blogs/bitcoin-botnet-mining |title=Bitcoin Botnet Mining &amp;amp;#124; Symantec Connect Community |publisher=Symantec.com |date=2011-06-17 |accessdate = 2012-01-24}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=http://www.zdnet.com/blog/security/researchers-find-malware-rigged-with-bitcoin-miner/8934 |title=Researchers find malware rigged with Bitcoin miner |publisher=ZDNet |date=2011-06-29 |accessdate = 2012-01-24}}&amp;lt;/ref&amp;gt; consuming computing cycles, using extra electricity and possibly increasing the temperature of the computer. Later that month, the Australian Broadcasting Corporation caught an employee using the company&#039;s servers to generate Bitcoins without permission.&amp;lt;ref&amp;gt;{{Cite web|url=http://thenextweb.com/au/2011/06/23/abc-employee-caught-mining-for-bitcoins-on-company-servers/ |title=ABC employee caught mining for Bitcoins on company servers |publisher=The Next Web |date=2011-06-23 |accessdate = 2012-01-24}}&amp;lt;/ref&amp;gt; Some malware also uses the parallel processing capabilities of the GPUs built into many modern-day video cards.&amp;lt;ref&amp;gt;{{Cite news |url=http://www.theregister.co.uk/2011/08/16/gpu_bitcoin_brute_forcing/ |title=Malware mints virtual currency using victim&#039;s GPU |date=16 August 2011&amp;lt;!-- 20:00 GMT --&amp;gt;|first=Dan |last=Goodin }}&amp;lt;/ref&amp;gt; In mid August 2011, Bitcoin miner botnets were found;&amp;lt;ref&amp;gt;{{Cite web|url=http://www.infosecurity-magazine.com/view/20211/researcher-discovers-distributed-bitcoin-cracking-trojan-malware/ |title=Infosecurity – Researcher discovers distributed bitcoin cracking trojan malware |publisher=Infosecurity-magazine.com |date=2011-08-19 |accessdate = 2012-01-24}}&amp;lt;/ref&amp;gt; trojans infecting Mac OS X have also been uncovered.&amp;lt;ref&amp;gt;{{Cite web|url=http://www.techworld.com.au/article/405849/mac_os_x_trojan_steals_processing_power_produce_bitcoins |title=Mac OS X Trojan steals processing power to produce Bitcoins – sophos, security, malware, Intego – Vulnerabilities – Security |publisher=Techworld |date=2011-11-01 |accessdate = 2012-01-24}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Theft and fraud===&lt;br /&gt;
On 19 June 2011, a security breach of the Mt.Gox (an acronym for &#039;&#039;M&#039;&#039;agic: &#039;&#039;T&#039;&#039;he &#039;&#039;G&#039;&#039;athering &#039;&#039;O&#039;&#039;nline E&#039;&#039;x&#039;&#039;change, its original purpose) Bitcoin Exchange caused the price of a Bitcoin to briefly drop to US$0.01 on the Mt.Gox exchange (though it remained unaffected on other exchanges) after a hacker allegedly used credentials from a Mt.Gox auditor&#039;s compromised computer to illegally transfer a large number of Bitcoins to him- or herself and sell them all, creating a massive &amp;quot;ask&amp;quot; order at any price. Within minutes the price rebounded to over $15 before Mt.Gox shut down their exchange and canceled all trades that happened during the hacking period.&amp;lt;ref&amp;gt;[https://mtgox.com/press_release_20110630.html Clarification of Mt Gox Compromised Accounts and Major Bitcoin Sell-Off]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://www.youtube.com/watch?v=T1X6qQt9ONg YouTube. Bitcoin Report]&amp;lt;/ref&amp;gt; The exchange rate of Bitcoins quickly returned to near pre-crash values.&amp;lt;ref name=&amp;quot;mick&amp;quot;&amp;gt;Jason Mick, 19 June 2011, [http://www.dailytech.com/Inside+the+MegaHack+of+Bitcoin+the+Full+Story/article21942.htm Inside the Mega-Hack of Bitcoin: the Full Story], DailyTech&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Timothy B. Lee, 19 June 2011, [http://arstechnica.com/tech-policy/news/2011/06/bitcoin-price-plummets-on-compromised-exchange.ars Bitcoin prices plummet on hacked exchange], Ars Technica&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Mark Karpeles, 20 June 2011, [https://support.mtgox.com/entries/20208066-huge-bitcoin-sell-off-due-to-a-compromised-account-rollback Huge Bitcoin sell off due to a compromised account – rollback], Mt.Gox Support&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;register1&amp;quot;&amp;gt;{{Cite news&lt;br /&gt;
 |title= Bitcoin collapses on malicious trade – Mt Gox scrambling to raise the Titanic&lt;br /&gt;
 |url= http://www.theregister.co.uk/2011/06/19/bitcoin_values_collapse_again/&lt;br /&gt;
 |date= 2011-06-19&lt;br /&gt;
 |author= Chirgwin, Richard&lt;br /&gt;
 |publisher= The Register&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; Accounts with the equivalent of more than USD 8,750,000 were affected.&amp;lt;ref name=&amp;quot;mick&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In July 2011, The operator of Bitomat, the third largest Bitcoin exchange, announced that he lost access to his wallet.dat file with about 17,000 BitCoins (roughly equivalent to 220,000 USD at that time). He announced that he would sell the service for the missing amount, aiming to use funds from the sale to refund his customers.&amp;lt;ref&amp;gt;[http://siliconangle.com/blog/2011/08/01/third-largest-bitcoin-exchange-bitomat-lost-their-wallet-over-17000-bitcoins-missing/ Third Largest Bitcoin Exchange Bitomat Lost Their Wallet, Over 17,000 Bitcoins Missing]. SiliconAngle&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In August 2011, MyBitcoin, one of popular Bitcoin transaction processors, declared that it was hacked, which resulted in it being shut down, with paying 49% on customer deposits, leaving more than 78,000 BitCoins (roughly equivalent to 800,000 USD at that time) unaccounted for.&amp;lt;ref&amp;gt;[http://betabeat.com/2011/08/mybitcoin-spokesman-finally-comes-forward-what-did-you-think-we-did-after-the-hack-we-got-shitfaced/ MyBitcoin Spokesman Finally Comes Forward: “What Did You Think We Did After the Hack? We Got Shitfaced”]. BetaBeat&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://betabeat.com/2011/08/search-for-owners-of-mybitcoin-loses-steam/ Search for Owners of MyBitcoin Loses Steam]. BetaBeat&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In early August 2012, a lawsuit was filed in San Francisco court against Bitcoinica, claiming about 460,000 USD from the company. Bitcoinica was hacked twice in 2012, which led to allegations of neglecting the safety of customers&#039; money and cheating them out of withdrawal requests.&amp;lt;ref&amp;gt;[http://arstechnica.com/tech-policy/2012/08/bitcoinica-users-sue-for-460k-in-lost-bitcoins/ Bitcoinica users sue for $460k in lost Bitcoins]. Arstechnica&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://spectrum.ieee.org/tech-talk/computing/networks/first-bitcoin-lawsuit-filed-in-san-francisco First Bitcoin Lawsuit Filed In San Francisco]. IEEE Spectrum&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In late August 2012, Bitcoin Savings and Trust was shut down by the owner, allegedly leaving around $5.6 million in debts; this led to allegations of the operation being a Ponzi scheme.&amp;lt;ref&amp;gt;{{Cite web|title=Bitcoin ponzi scheme – investors lose $5 million USD in online hedge fund|url=http://rt.com/usa/news/investors-currency-digital-fund-868/|publisher=RT}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|last=Jeffries|first=Adrianne|title=Suspected multi-million dollar Bitcoin pyramid scheme shuts down, investors revolt|url=http://www.theverge.com/2012/8/27/3271637/bitcoin-savings-trust-pyramid-scheme-shuts-down|publisher=The Verge}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|last=Mick|first=Jason|title=&amp;quot;Pirateat40&amp;quot; Makes Off $5.6M USD in BitCoins From Pyramid Scheme|url=http://www.dailytech.com/Pirateat40+Makes+Off+56M+USD+in+BitCoins+From+Pyramid+Scheme/article25538.htm|publisher=DailyTech}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://pandodaily.com/2012/08/31/bitcoin-how-a-virtual-currency-became-real-with-a-5-6m-fraud/ Bitcoin: How a Virtual Currency Became Real with a $5.6M Fraud]. PandoDaily&amp;lt;/ref&amp;gt; In September 2012, it was reported that U.S. Securities and Exchange Commission has started an investigation on the case.&amp;lt;ref&amp;gt;[http://blogs.telegraph.co.uk/technology/willardfoxton2/100007836/bitcoin-pirate-scandal-sec-steps-in-amid-allegations-that-the-whole-thing-was-a-ponzi-scheme/ Bitcoin &#039;Pirate&#039; scandal: SEC steps in amid allegations that the whole thing was a Ponzi scheme ]. The Telegraph&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In September 2012, Bitfloor Bitcoin exchange also reported being hacked, with 24,000 BitCoins (roughly equivalent to 250,000 USD) stolen. As a result, Bitfloor suspended operations.&amp;lt;ref&amp;gt;[http://www.bbc.co.uk/news/technology-19486695 Bitcoin theft causes Bitfloor exchange to go offline]. BBC&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://www.theverge.com/2012/9/5/3293375/bitfloor-bitcoin-exchange-suspended-theft Bitcoin exchange BitFloor suspends operations after $250,000 theft Bitcoin exchange BitFloor suspends operations after $250,000 theft]. The Verge&amp;lt;/ref&amp;gt; The same month, Bitfloor resumed operations, with its founder saying that he reported the theft to FBI, and that he is planning to repay the victims, though the time frame for such repayment is unclear.&amp;lt;ref&amp;gt;[http://www.pcworld.com/article/2010586/bitcoin-exchange-back-online-after-hack.html?tk=rel_news Bitcoin exchange back online after hack]. PCWorld&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Taxation===&lt;br /&gt;
In September 2012, the Intra-European Organization of Tax Administrations (IOTA), in Tbilisi, Georgia, held a workshop titled &amp;quot;Auditing Individuals and Legal Entities in the Use of e-Money.&amp;quot; The workshop was attended by representatives from 23 countries.&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;  Jerry Taylor, IOTA&#039;s technical taxation expert, said, &amp;quot;There&#039;s an awful lot happening on the Internet environment which is fascinating at the moment and introducing new challenges for auditors when it comes to virtual currency.&amp;quot;&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;  Bitcoin was mentioned during the workshop.&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
Matthew Elias, founder of the [[Cryptocurrency Legal Advocacy Group]] (CLAG) published &amp;quot;Staying Between the Lines: A Survey of U.S. Income Taxation and its Ramifications on Cryptocurrencies&amp;quot;, which discusses &amp;quot;the taxability of cryptocurrencies such as bitcoin.&amp;quot;&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;  CLAG &amp;quot;stressed the importance for taxpayers to determine on their own whether taxes are due on a bitcoin-related transaction based on whether one has &amp;quot;experienced a realization event.&amp;quot;&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;  Such examples are &amp;quot;when a taxpayer has provided a service in exchange for bitcoins, a realization event has probably occurred, and any gain or loss would likely be calculated using fair market values for the service provided.&amp;quot;&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Peter Vessenes]], [[Bitcoin Foundation|Bitcoin Foundation&#039;s]] executive director, said, since the foundation is trying to pay for everything in bitcoin, including salaries, &amp;quot;How do we W-2 someone for their bitcoins? Do we mark-to-market every time a transfer happens? Payroll companies cringe.&amp;quot;&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;  The Bitcoin Foundation hopes &amp;quot;to push for solid guidance about its legal and tax treatment.&amp;quot; [[Patrick Murck]], legal counsel for the Bitcoin Foundation, said he would like &amp;quot;to help regulators understand the technology better so they can make better decisions.&amp;quot;&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt; Murck said, &amp;quot;Bitcoin has the potential to become much more than a niche currency, but it needs the guidance and understanding of regulators.&amp;quot; and &amp;quot;The full potential of bitcoin could be realized through clearer guidelines and a better understanding by financial and tax regulators.&amp;quot; and &amp;quot;Part of making that happen is to talk to regulators, the IRS, and tax professionals and helping them understand that bitcoin is not this nefarious thing, it&#039;s just software, it&#039;s a community, and there&#039;s nothing inherently nefarious about either of those things.&amp;quot;&amp;lt;ref name=&amp;quot;BitCoin Tax issues Oct 2012&amp;quot;&amp;gt;{{cite journal | title=2012 TNT 209-4 NEWS ANALYSIS: VIRTUAL CURRENCY: A NEW WORRY FOR TAX ADMINISTRATORS?. (Release Date: OCTOBER 17, 2012) (Doc 2012-21516) | author=Stewart, David D. and Soong Johnston, Stephanie D. | journal=Tax Notes Today | year=2012 | month=October 29 | volume=2012 TNT 209-4 | issue=2012 TNT 209-4}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
* [[Introduction]]&lt;br /&gt;
* [[Getting started]]&lt;br /&gt;
* [[Using_Bitcoin|Detailed tutorial]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Digital currencies]]&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Satoshi_Nakamoto&amp;diff=45430</id>
		<title>Satoshi Nakamoto</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Satoshi_Nakamoto&amp;diff=45430"/>
		<updated>2014-03-26T11:11:06Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Satoshi Nakamoto&#039;&#039;&#039; is the pseudonymous person or group of people who designed and created the original [[Bitcoin]] software, currently known as [[Bitcoin-Qt]].&lt;br /&gt;
&lt;br /&gt;
His involvement in the original [[Bitcoin]] software does not appear to extend past mid-2010.&lt;br /&gt;
&lt;br /&gt;
==Identity==&lt;br /&gt;
&lt;br /&gt;
There are no records of Nakamoto&#039;s identity or identities prior to the creation of [[Bitcoin]]. On his [http://p2pfoundation.ning.com/profile/SatoshiNakamoto P2P foundation profile], Nakamoto claimed to be an individual male at the age of 37 and living in Japan, which was met with great skepticism due to his use of English and his Bitcoin [[software]] not being documented nor labeled in Japanese.&lt;br /&gt;
&lt;br /&gt;
British formatting in his written work implies Nakamoto is of British origin. However, he also sometimes used American spelling, which may indicate that he was intentionally trying (but failed) to mask his writing style, or that he is more than one person.&lt;br /&gt;
&lt;br /&gt;
The first release of his original [[Bitcoin]] software is speculated to be of a collaborative effort, leading some to claim that Satoshi Nakamoto was a collective pseudonym for a group of people.&lt;br /&gt;
&lt;br /&gt;
Investigations into the real identity of Satoshi Nakamoto have been attempted by &#039;&#039;The New Yorker&#039;&#039; and &#039;&#039;Fast Company&#039;&#039;. &#039;&#039;The New Yorker&#039;&#039; arrived at Michael Clear, a young graduate student in cryptography at Trinity College in Dublin, who was named the top computer-science undergraduate at Trinity in 2008. The next year, he was hired by Allied Irish Banks to improve its currency-trading software, and he co-authored an academic paper on peer-to-peer technology.&amp;lt;ref&amp;gt;[http://betabeat.com/2011/10/did-the-new-yorkers-joshua-davis-nail-the-identity-of-bitcoin-creator-satoshi-nakamoto/ The New Yorker’s Joshua Davis Attempts to Identify Bitcoin Creator Satoshi Nakamoto]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fast Company&#039;&#039;&#039;s investigation brought up circumstantial evidence that indicated a link between an encryption patent application filed by Neal King, Vladimir Oksman and Charles Bry on 15 August 2008, and the bitcoin.org domain name which was registered 72 hours later. The [http://www.google.com/patents/US20100042841 patent application] contained networking and encryption technologies similar to Bitcoin&#039;s. After textual analysis, the phrase &amp;quot;...computationally impractical to reverse&amp;quot; was found in both the patent application and bitcoin&#039;s whitepaper.&amp;lt;ref name=&amp;quot;whitepaper&amp;quot;&amp;gt;{{cite web |last= Nakamoto |first= Satoshi |title= Bitcoin: A Peer-to-Peer Electronic Cash System |url= http://bitcoin.org/bitcoin.pdf |date= 24 May 2009}}&amp;lt;/ref&amp;gt; All three inventors explicitly denied being Satoshi Nakamoto.&amp;lt;ref&amp;gt;{{cite web|last= Penenberg |first= Adam |title= The Bitcoin Crypto-Currency Mystery Reopened |url= http://www.fastcompany.com/1785445/bitcoin-crypto-currency-mystery-reopened |publisher= FastCompany |accessdate= 16 February 2013}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web|last= Greenfield |first= Rebecca |title= The Race to Unmask Bitcoin&#039;s Inventor(s) |url= http://www.theatlanticwire.com/technology/2011/10/race-unmask-bitcoins-inventors/43535/ |publisher= The Atlantic |date=11 October 2011|accessdate= 16 February 2013}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Work==&lt;br /&gt;
&lt;br /&gt;
Nakamoto has claimed that he has been working on [[Bitcoin]] since 2007. In 2008, he published a [[Bitcoin_white_paper|paper]] on The Cryptography Mailing List at metzdowd.com describing the Bitcoin [[digital currency]]. In 2009, he released the first Bitcoin software that launched the network and the first units of the Bitcoin currency.&lt;br /&gt;
&lt;br /&gt;
Version 0.1 was for Windows only and had no command-line interface. It was compiled using Microsoft Visual Studio. The code was elegant in some ways and inelegant in others. The code does not appear to have been written by either a total amateur or a professional programmer; some people speculate based on this that Satoshi was an academic with a lot of theoretical knowledge but not much programming experience. Version 0.1 was remarkably complete. If Satoshi truly only worked on it alone for two years, he must have spent a massive amount of time on the project.&lt;br /&gt;
&lt;br /&gt;
Nakamoto was active in making modifications to the Bitcoin software and posting technical information on the [[Bitcoin Forum]] until his contact with other Bitcoin developers and the community gradually began to fade in mid-2010. Until a few months before he left, almost all modifications to the source code were done by Satoshi -- he accepted contributions relatively rarely. Just before he left, he set up [[User:Gavinandresen|Gavin Andresen]] as his successor by giving him access to the Bitcoin SourceForge project and a copy of the [[Alerts|alert key]].&lt;br /&gt;
&lt;br /&gt;
==Motives==&lt;br /&gt;
&lt;br /&gt;
Nakamoto&#039;s work appears to be politically motivated, as quoted:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Yes, [we will not find a solution to political problems in cryptography,] but we can win a major battle in the arms race and gain a new territory of freedom for several years. Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own.&amp;quot; - Satoshi Nakamoto&lt;br /&gt;
&lt;br /&gt;
&amp;quot;[Bitcoin is] very attractive to the libertarian viewpoint if we can explain it properly. I&#039;m better with code than with words though.&amp;quot; - Satoshi Nakamoto&lt;br /&gt;
&lt;br /&gt;
In the Bitcoin network&#039;s transaction database, the original entry has a note by Nakamoto that reads as:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The Times 03/Jan/2009 Chancellor on brink of second bailout for banks&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Some claim this quote implies Nakamoto had great concern or contempt for the current [[central banking]] system.&lt;br /&gt;
&lt;br /&gt;
==Influence==&lt;br /&gt;
The smallest unit of the [[Bitcoin]] currency (1/100,000,000) has been named &amp;quot;satoshi&amp;quot; in collective homage to his founding of [[Bitcoin]].&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
*[http://www.wired.com/magazine/2011/11/mf_bitcoin/ The Rise and Fall of Bitcoin]&lt;br /&gt;
*[http://www.newyorker.com/reporting/2011/10/10/111010fa_fact_davis The Crypto-Currency: Bitcoin and its mysterious inventor]&lt;br /&gt;
*[http://www.mail-archive.com/search?l=cryptography@metzdowd.com&amp;amp;q=from:%22Satoshi+Nakamoto%22 Satoshi&#039;s posts to Cryptography mailing list]&lt;br /&gt;
*[[Bitcoin white paper]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Pseudonyms]]&lt;br /&gt;
[[de:Satoshi Nakamoto]]&lt;br /&gt;
[[es:Satoshi Nakamoto]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Individuals]]&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Satoshi_Nakamoto&amp;diff=45429</id>
		<title>Satoshi Nakamoto</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Satoshi_Nakamoto&amp;diff=45429"/>
		<updated>2014-03-26T11:07:30Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Satoshi Nakamoto&#039;&#039;&#039; is the pseudonymous person or group of people who designed and created the original [[Bitcoin]] software, currently known as [[Bitcoin-Qt]].&lt;br /&gt;
&lt;br /&gt;
His involvement in the original [[Bitcoin]] software does not appear to extend past mid-2010.&lt;br /&gt;
&lt;br /&gt;
==Identity==&lt;br /&gt;
&lt;br /&gt;
There are no records of Nakamoto&#039;s identity or identities prior to the creation of [[Bitcoin]]. On his [http://p2pfoundation.ning.com/profile/SatoshiNakamoto P2P foundation profile], Nakamoto claimed to be an individual male at the age of 37 and living in Japan, which was met with great skepticism due to his use of English and his Bitcoin [[software]] not being documented nor labeled in Japanese.&lt;br /&gt;
&lt;br /&gt;
British formatting in his written work implies Nakamoto is of British origin. However, he also sometimes used American spelling, which may indicate that he was intentionally trying (but failed) to mask his writing style, or that he is more than one person.&lt;br /&gt;
&lt;br /&gt;
The first release of his original [[Bitcoin]] software is speculated to be of a collaborative effort, leading some to claim that Satoshi Nakamoto was a collective pseudonym for a group of people.&lt;br /&gt;
&lt;br /&gt;
Investigations into the real identity of Satoshi Nakamoto have been attempted by &#039;&#039;The New Yorker&#039;&#039; and &#039;&#039;Fast Company&#039;&#039;. &#039;&#039;The New Yorker&#039;&#039; arrived at Michael Clear, a young graduate student in cryptography at Trinity College in Dublin, who was named the top computer-science undergraduate at Trinity in 2008. The next year, he was hired by Allied Irish Banks to improve its currency-trading software, and he co-authored an academic paper on peer-to-peer technology.&amp;lt;ref&amp;gt;[http://betabeat.com/2011/10/did-the-new-yorkers-joshua-davis-nail-the-identity-of-bitcoin-creator-satoshi-nakamoto/ The New Yorker’s Joshua Davis Attempts to Identify Bitcoin Creator Satoshi Nakamoto]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fast Company&#039;&#039;&#039;s investigation brought up circumstantial evidence that indicated a link between an encryption patent application filed by Neal King, Vladimir Oksman and Charles Bry on 15 August 2008, and the bitcoin.org domain name which was registered 72 hours later. The [http://www.google.com/patents/US20100042841 patent application] contained networking and encryption technologies similar to Bitcoin&#039;s. After textual analysis, the phrase &amp;quot;...computationally impractical to reverse&amp;quot; was found in both the patent application and bitcoin&#039;s whitepaper.&amp;lt;ref name=&amp;quot;whitepaper&amp;quot;&amp;gt;{{cite web |last= Nakamoto |first= Satoshi |title= Bitcoin: A Peer-to-Peer Electronic Cash System |url= http://bitcoin.org/bitcoin.pdf |date= 24 May 2009}}&amp;lt;/ref&amp;gt; All three inventors explicitly denied being Satoshi Nakamoto.&amp;lt;ref&amp;gt;{{cite web|last= Penenberg |first= Adam |title= The Bitcoin Crypto-Currency Mystery Reopened |url= http://www.fastcompany.com/1785445/bitcoin-crypto-currency-mystery-reopened |publisher= FastCompany |accessdate= 16 February 2013}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web|last= Greenfield |first= Rebecca |title= The Race to Unmask Bitcoin&#039;s Inventor(s) |url= http://www.theatlanticwire.com/technology/2011/10/race-unmask-bitcoins-inventors/43535/ |publisher= The Atlantic |date=11 October 2011|accessdate= 16 February 2013}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Work==&lt;br /&gt;
&lt;br /&gt;
Nakamoto has claimed that he has been working on [[Bitcoin]] since 2007. In 2008, he published a paper on The Cryptography Mailing List at metzdowd.com describing the Bitcoin [[digital currency]]. In 2009, he released the first Bitcoin software that launched the network and the first units of the Bitcoin currency.&lt;br /&gt;
&lt;br /&gt;
Version 0.1 was for Windows only and had no command-line interface. It was compiled using Microsoft Visual Studio. The code was elegant in some ways and inelegant in others. The code does not appear to have been written by either a total amateur or a professional programmer; some people speculate based on this that Satoshi was an academic with a lot of theoretical knowledge but not much programming experience. Version 0.1 was remarkably complete. If Satoshi truly only worked on it alone for two years, he must have spent a massive amount of time on the project.&lt;br /&gt;
&lt;br /&gt;
Nakamoto was active in making modifications to the Bitcoin software and posting technical information on the [[Bitcoin Forum]] until his contact with other Bitcoin developers and the community gradually began to fade in mid-2010. Until a few months before he left, almost all modifications to the source code were done by Satoshi -- he accepted contributions relatively rarely. Just before he left, he set up [[User:Gavinandresen|Gavin Andresen]] as his successor by giving him access to the Bitcoin SourceForge project and a copy of the [[Alerts|alert key]].&lt;br /&gt;
&lt;br /&gt;
==Motives==&lt;br /&gt;
&lt;br /&gt;
Nakamoto&#039;s work appears to be politically motivated, as quoted:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Yes, [we will not find a solution to political problems in cryptography,] but we can win a major battle in the arms race and gain a new territory of freedom for several years. Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own.&amp;quot; - Satoshi Nakamoto&lt;br /&gt;
&lt;br /&gt;
&amp;quot;[Bitcoin is] very attractive to the libertarian viewpoint if we can explain it properly. I&#039;m better with code than with words though.&amp;quot; - Satoshi Nakamoto&lt;br /&gt;
&lt;br /&gt;
In the Bitcoin network&#039;s transaction database, the original entry has a note by Nakamoto that reads as:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The Times 03/Jan/2009 Chancellor on brink of second bailout for banks&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Some claim this quote implies Nakamoto had great concern or contempt for the current [[central banking]] system.&lt;br /&gt;
&lt;br /&gt;
==Influence==&lt;br /&gt;
The smallest unit of the [[Bitcoin]] currency (1/100,000,000) has been named &amp;quot;satoshi&amp;quot; in collective homage to his founding of [[Bitcoin]].&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
*[http://www.wired.com/magazine/2011/11/mf_bitcoin/ The Rise and Fall of Bitcoin]&lt;br /&gt;
*[http://www.newyorker.com/reporting/2011/10/10/111010fa_fact_davis The Crypto-Currency: Bitcoin and its mysterious inventor]&lt;br /&gt;
*[http://www.mail-archive.com/search?l=cryptography@metzdowd.com&amp;amp;q=from:%22Satoshi+Nakamoto%22 Satoshi&#039;s posts to Cryptography mailing list]&lt;br /&gt;
*[[Bitcoin white paper]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Pseudonyms]]&lt;br /&gt;
[[de:Satoshi Nakamoto]]&lt;br /&gt;
[[es:Satoshi Nakamoto]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Individuals]]&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45428</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45428"/>
		<updated>2014-03-26T11:01:30Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
q&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that &#039;&#039;p &amp;gt; q&#039;&#039;, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
   double p = 1.0 - q;&lt;br /&gt;
   double lambda = z * (q / p);&lt;br /&gt;
   double sum = 1.0;&lt;br /&gt;
   int i, k;&lt;br /&gt;
   for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
   {&lt;br /&gt;
      double poisson = exp(-lambda);&lt;br /&gt;
      for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
         poisson *= lambda / i;&lt;br /&gt;
&lt;br /&gt;
     sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
   }&lt;br /&gt;
   return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
q = 0.1&lt;br /&gt;
&lt;br /&gt;
z = 0   P = 1.0000000&lt;br /&gt;
&lt;br /&gt;
z = 1   P = 0.2045873&lt;br /&gt;
&lt;br /&gt;
z = 2   P = 0.0509779&lt;br /&gt;
&lt;br /&gt;
z = 3   P = 0.0131722&lt;br /&gt;
&lt;br /&gt;
z = 4   P = 0.0034552&lt;br /&gt;
&lt;br /&gt;
z = 5   P = 0.0009137&lt;br /&gt;
&lt;br /&gt;
z = 6   P = 0.0002428&lt;br /&gt;
&lt;br /&gt;
z = 7   P = 0.0000647&lt;br /&gt;
&lt;br /&gt;
z = 8   P = 0.0000173&lt;br /&gt;
&lt;br /&gt;
z = 9   P = 0.0000046&lt;br /&gt;
&lt;br /&gt;
z = 10   P = 0.0000012&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
q = 0.3&lt;br /&gt;
&lt;br /&gt;
z = 0   P = 1.0000000&lt;br /&gt;
&lt;br /&gt;
z = 5   P = 0.1773523&lt;br /&gt;
&lt;br /&gt;
z = 10   P = 0.0416605&lt;br /&gt;
&lt;br /&gt;
z = 15   P = 0.0101008&lt;br /&gt;
&lt;br /&gt;
z = 20   P = 0.0024804&lt;br /&gt;
&lt;br /&gt;
z = 25   P = 0.0006132&lt;br /&gt;
&lt;br /&gt;
z = 30   P = 0.0001522&lt;br /&gt;
&lt;br /&gt;
z = 35   P = 0.0000379&lt;br /&gt;
&lt;br /&gt;
z = 40   P = 0.0000095&lt;br /&gt;
&lt;br /&gt;
z = 45   P = 0.0000024&lt;br /&gt;
&lt;br /&gt;
z = 50   P = 0.0000006&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q = 0.10   z = 5&lt;br /&gt;
&lt;br /&gt;
q = 0.15   z = 8&lt;br /&gt;
&lt;br /&gt;
q = 0.20   z = 11&lt;br /&gt;
&lt;br /&gt;
q = 0.25   z = 15&lt;br /&gt;
&lt;br /&gt;
q = 0.30   z = 24&lt;br /&gt;
&lt;br /&gt;
q = 0.35   z = 41&lt;br /&gt;
&lt;br /&gt;
q = 0.40   z = 89&lt;br /&gt;
&lt;br /&gt;
q = 0.45   z = 340&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45427</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45427"/>
		<updated>2014-03-26T10:58:59Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
q&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that &#039;&#039;p &amp;gt; q&#039;&#039;, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
   double p = 1.0 - q;&lt;br /&gt;
   double lambda = z * (q / p);&lt;br /&gt;
   double sum = 1.0;&lt;br /&gt;
   int i, k;&lt;br /&gt;
   for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
   {&lt;br /&gt;
      double poisson = exp(-lambda);&lt;br /&gt;
      for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
         poisson *= lambda / i;&lt;br /&gt;
&lt;br /&gt;
     sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
   }&lt;br /&gt;
   return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
q = 0.1&lt;br /&gt;
&lt;br /&gt;
z = 0   P = 1.0000000&lt;br /&gt;
&lt;br /&gt;
z = 1   P = 0.2045873&lt;br /&gt;
&lt;br /&gt;
z = 2   P = 0.0509779&lt;br /&gt;
&lt;br /&gt;
z = 3   P = 0.0131722&lt;br /&gt;
&lt;br /&gt;
z = 4   P = 0.0034552&lt;br /&gt;
&lt;br /&gt;
z = 5   P = 0.0009137&lt;br /&gt;
&lt;br /&gt;
z = 6   P = 0.0002428&lt;br /&gt;
&lt;br /&gt;
z = 7   P = 0.0000647&lt;br /&gt;
&lt;br /&gt;
z = 8   P = 0.0000173&lt;br /&gt;
&lt;br /&gt;
z = 9   P = 0.0000046&lt;br /&gt;
&lt;br /&gt;
z = 10   P = 0.0000012&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
q = 0.3&lt;br /&gt;
&lt;br /&gt;
z = 0   P = 1.0000000&lt;br /&gt;
&lt;br /&gt;
z = 5   P = 0.1773523&lt;br /&gt;
&lt;br /&gt;
z = 10   P = 0.0416605&lt;br /&gt;
&lt;br /&gt;
z = 15   P = 0.0101008&lt;br /&gt;
&lt;br /&gt;
z = 20   P = 0.0024804&lt;br /&gt;
&lt;br /&gt;
z = 25   P = 0.0006132&lt;br /&gt;
&lt;br /&gt;
z = 30   P = 0.0001522&lt;br /&gt;
&lt;br /&gt;
z = 35   P = 0.0000379&lt;br /&gt;
&lt;br /&gt;
z = 40   P = 0.0000095&lt;br /&gt;
&lt;br /&gt;
z = 45   P = 0.0000024&lt;br /&gt;
&lt;br /&gt;
z = 50   P = 0.0000006&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q = 0.10   z = 5&lt;br /&gt;
&lt;br /&gt;
q = 0.15   z = 8&lt;br /&gt;
&lt;br /&gt;
q = 0.20   z = 11&lt;br /&gt;
&lt;br /&gt;
q = 0.25   z = 15&lt;br /&gt;
&lt;br /&gt;
q = 0.30   z = 24&lt;br /&gt;
&lt;br /&gt;
q = 0.35   z = 41&lt;br /&gt;
&lt;br /&gt;
q = 0.40   z = 89&lt;br /&gt;
&lt;br /&gt;
q = 0.45   z = 340&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45426</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45426"/>
		<updated>2014-03-26T10:56:40Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
q&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that &#039;&#039;p &amp;gt; q&#039;&#039;, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
   double p = 1.0 - q;&lt;br /&gt;
   double lambda = z * (q / p);&lt;br /&gt;
   double sum = 1.0;&lt;br /&gt;
   int i, k;&lt;br /&gt;
   for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
   {&lt;br /&gt;
      double poisson = exp(-lambda);&lt;br /&gt;
      for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
         poisson *= lambda / i;&lt;br /&gt;
&lt;br /&gt;
     sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
   }&lt;br /&gt;
   return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
q = 0.1&lt;br /&gt;
&lt;br /&gt;
z = 0   P = 1.0000000&lt;br /&gt;
&lt;br /&gt;
z = 1   P = 0.2045873&lt;br /&gt;
&lt;br /&gt;
z = 2   P = 0.0509779&lt;br /&gt;
&lt;br /&gt;
z = 3   P = 0.0131722&lt;br /&gt;
&lt;br /&gt;
z = 4   P = 0.0034552&lt;br /&gt;
&lt;br /&gt;
z = 5   P = 0.0009137&lt;br /&gt;
&lt;br /&gt;
z = 6   P = 0.0002428&lt;br /&gt;
&lt;br /&gt;
z = 7   P = 0.0000647&lt;br /&gt;
&lt;br /&gt;
z = 8   P = 0.0000173&lt;br /&gt;
&lt;br /&gt;
z = 9   P = 0.0000046&lt;br /&gt;
&lt;br /&gt;
z = 10   P = 0.0000012&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
q = 0.3&lt;br /&gt;
&lt;br /&gt;
z = 0   P = 1.0000000&lt;br /&gt;
&lt;br /&gt;
z = 5   P = 0.1773523&lt;br /&gt;
&lt;br /&gt;
z = 10   P = 0.0416605&lt;br /&gt;
&lt;br /&gt;
z = 15   P = 0.0101008&lt;br /&gt;
&lt;br /&gt;
z = 20   P = 0.0024804&lt;br /&gt;
&lt;br /&gt;
z = 25   P = 0.0006132&lt;br /&gt;
&lt;br /&gt;
z = 30   P = 0.0001522&lt;br /&gt;
&lt;br /&gt;
z = 35   P = 0.0000379&lt;br /&gt;
&lt;br /&gt;
z = 40   P = 0.0000095&lt;br /&gt;
&lt;br /&gt;
z = 45   P = 0.0000024&lt;br /&gt;
&lt;br /&gt;
z = 50   P = 0.0000006&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q = 0.10   z = 5&lt;br /&gt;
&lt;br /&gt;
q = 0.15   z = 8&lt;br /&gt;
&lt;br /&gt;
q = 0.20   z = 11&lt;br /&gt;
&lt;br /&gt;
q = 0.25   z = 15&lt;br /&gt;
&lt;br /&gt;
q = 0.30   z = 24&lt;br /&gt;
&lt;br /&gt;
q = 0.35   z = 41&lt;br /&gt;
&lt;br /&gt;
q = 0.40   z = 89&lt;br /&gt;
&lt;br /&gt;
q = 0.45   z = 340&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45425</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45425"/>
		<updated>2014-03-26T10:51:06Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
q&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that &#039;&#039;p &amp;gt; q&#039;&#039;, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
   double p = 1.0 - q;&lt;br /&gt;
   double lambda = z * (q / p);&lt;br /&gt;
   double sum = 1.0;&lt;br /&gt;
   int i, k;&lt;br /&gt;
   for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
   {&lt;br /&gt;
      double poisson = exp(-lambda);&lt;br /&gt;
      for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
         poisson *= lambda / i;&lt;br /&gt;
&lt;br /&gt;
     sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
   }&lt;br /&gt;
   return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45424</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45424"/>
		<updated>2014-03-26T10:49:31Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
q&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that &#039;&#039;p &amp;gt; q&#039;&#039;, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
double p = 1.0 - q;&lt;br /&gt;
double lambda = z * (q / p);&lt;br /&gt;
double sum = 1.0;&lt;br /&gt;
int i, k;&lt;br /&gt;
for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
{&lt;br /&gt;
double poisson = exp(-lambda);&lt;br /&gt;
for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
poisson *= lambda / i;&lt;br /&gt;
sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
}&lt;br /&gt;
return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45423</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45423"/>
		<updated>2014-03-26T10:48:09Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
q&amp;lt;sub&amp;gt;z&amp;lt;/sub&amp;gt; = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that &#039;&#039;p &amp;gt; q&#039;&#039;, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45422</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45422"/>
		<updated>2014-03-26T10:41:17Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45421</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45421"/>
		<updated>2014-03-26T10:40:45Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45420</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45420"/>
		<updated>2014-03-26T10:39:22Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref name=&amp;quot;ref_1&amp;quot;&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref name=&amp;quot;ref_2&amp;quot;&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_3&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_4&amp;quot;&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref name=&amp;quot;ref_6&amp;quot;&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref name=&amp;quot;ref_7&amp;quot;&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt; &amp;lt;ref name=&amp;quot;ref_2&amp;quot;/&amp;gt; &amp;lt;ref name=&amp;quot;ref_5&amp;quot;/&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref name=&amp;quot;ref_8&amp;quot;&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45409</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45409"/>
		<updated>2014-03-26T01:59:06Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Calculations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt;  [2] [5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows &amp;lt;ref&amp;gt;W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45408</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45408"/>
		<updated>2014-03-26T01:58:30Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Reclaiming Disk Space */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt;  [2] [5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45407</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45407"/>
		<updated>2014-03-26T01:56:59Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Reclaiming Disk Space */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree &amp;lt;ref&amp;gt;R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and Privacy, IEEE Computer Society, pages 122-133, April 1980.&amp;lt;/ref&amp;gt;  &amp;lt;ref&amp;gt;[2]&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;[5]&amp;lt;/ref&amp;gt;, with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45406</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45406"/>
		<updated>2014-03-26T01:56:07Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Proof-of-Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash &amp;lt;ref&amp;gt;A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot; http://www.hashcash.org/papers/hashcash.pdf, 2002.&amp;lt;/ref&amp;gt;, rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45405</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45405"/>
		<updated>2014-03-26T01:54:27Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot; In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&amp;lt;/ref&amp;gt; &amp;lt;ref&amp;gt;S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45404</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45404"/>
		<updated>2014-03-26T01:51:24Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Transactions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced &amp;lt;ref&amp;gt;W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&amp;lt;/ref&amp;gt;, and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;[2-5]&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45402</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45402"/>
		<updated>2014-03-26T01:49:39Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;[2-5]&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45401</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45401"/>
		<updated>2014-03-26T01:47:34Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;[2-5]&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45400</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45400"/>
		<updated>2014-03-26T01:45:32Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;[2-5]&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
[1] W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&lt;br /&gt;
&lt;br /&gt;
[2] H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&lt;br /&gt;
&lt;br /&gt;
[3] S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&lt;br /&gt;
&lt;br /&gt;
[4] D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot;&lt;br /&gt;
In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&lt;br /&gt;
&lt;br /&gt;
[5] S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&lt;br /&gt;
&lt;br /&gt;
[6] A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot;&lt;br /&gt;
http://www.hashcash.org/papers/hashcash.pdf, 2002.&lt;br /&gt;
&lt;br /&gt;
[7] R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and&lt;br /&gt;
Privacy, IEEE Computer Society, pages 122-133, April 1980.&lt;br /&gt;
&lt;br /&gt;
[8] W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45399</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45399"/>
		<updated>2014-03-26T01:44:47Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;[2-5]&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
[1] W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&lt;br /&gt;
&lt;br /&gt;
[2] H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&lt;br /&gt;
&lt;br /&gt;
[3] S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&lt;br /&gt;
&lt;br /&gt;
[4] D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot;&lt;br /&gt;
In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&lt;br /&gt;
&lt;br /&gt;
[5] S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&lt;br /&gt;
&lt;br /&gt;
[6] A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot;&lt;br /&gt;
http://www.hashcash.org/papers/hashcash.pdf, 2002.&lt;br /&gt;
&lt;br /&gt;
[7] R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and&lt;br /&gt;
Privacy, IEEE Computer Society, pages 122-133, April 1980.&lt;br /&gt;
&lt;br /&gt;
[8] W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45398</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45398"/>
		<updated>2014-03-26T01:43:54Z</updated>

		<summary type="html">&lt;p&gt;Btceic: /* Timestamp Server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post &amp;lt;ref&amp;gt;[2-5]&amp;lt;/ref&amp;gt;. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1] W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&lt;br /&gt;
&lt;br /&gt;
[2] H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&lt;br /&gt;
&lt;br /&gt;
[3] S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&lt;br /&gt;
&lt;br /&gt;
[4] D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot;&lt;br /&gt;
In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&lt;br /&gt;
&lt;br /&gt;
[5] S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&lt;br /&gt;
&lt;br /&gt;
[6] A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot;&lt;br /&gt;
http://www.hashcash.org/papers/hashcash.pdf, 2002.&lt;br /&gt;
&lt;br /&gt;
[7] R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and&lt;br /&gt;
Privacy, IEEE Computer Society, pages 122-133, April 1980.&lt;br /&gt;
&lt;br /&gt;
[8] W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45396</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45396"/>
		<updated>2014-03-26T01:38:40Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:right&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float:left;&amp;quot;&amp;gt;&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;Satoshi Nakamoto&amp;lt;br/&amp;gt;satoshin@gmx.com&amp;lt;br/&amp;gt;www.bitcoin.org&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 80%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for non-reversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Timestamp Server ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The solution we propose begins with a timestamp server. A timestamp server works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper or Usenet post [2-5]. The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-timestamp-server.png|frame|center|alt=Bitcoin TimeStamp Server]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Proof-of-Work ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of- work system similar to Adam Back&#039;s Hashcash [6], rather than newspaper or Usenet posts. The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the hash begins with a number of zero bits. The average work required is exponential in the number of zero bits required and can be verified by executing a single hash. For our timestamp network, we implement the proof-of-work by incrementing a nonce in the block until a value is found that gives the block&#039;s hash the required zero bits. Once the CPU effort has been expended to make it satisfy the proof-of-work, the block cannot be changed without redoing the work. As later blocks are chained after it, the work to change the block would include redoing all the blocks after it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-proof-of-work.png|frame|center|alt=Bitcoin Proof of Work]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains. To modify a past block, an attacker would have to redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the work of the honest nodes. We will show later that the probability of a slower attacker catching up diminishes exponentially as subsequent blocks are added. To compensate for increasing hardware speed and varying interest in running nodes over time, the proof-of-work difficulty is determined by a moving average targeting an average number of blocks per hour. If they&#039;re generated too fast, the difficulty increases.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The steps to run the network are as follows:&lt;br /&gt;
&lt;br /&gt;
# New transactions are broadcast to all nodes.&lt;br /&gt;
# Each node collects new transactions into a block.&lt;br /&gt;
# Each node works on finding a difficult proof-of-work for its block.&lt;br /&gt;
# When a node finds a proof-of-work, it broadcasts the block to all nodes.&lt;br /&gt;
# Nodes accept the block only if all transactions in it are valid and not already spent.&lt;br /&gt;
# Nodes express their acceptance of the block by working on creating the next block in the&lt;br /&gt;
chain, using the hash of the accepted block as the previous hash.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Nodes always consider the longest chain to be the correct one and will keep working on extending it. If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but save the other branch in case it becomes longer. The tie will be broken when the next proof-of-work is found and one branch becomes longer; the nodes that were working on the other branch will then switch to the longer one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
New transaction broadcasts do not necessarily need to reach all nodes. As long as they reach many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped messages. If a node does not receive a block, it will request it when it receives the next block and realizes it missed one.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Incentive ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.&lt;br /&gt;
&lt;br /&gt;
The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.&lt;br /&gt;
&lt;br /&gt;
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reclaiming Disk Space ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Once the latest transaction in a coin is buried under enough blocks, the spent transactions before it can be discarded to save disk space. To facilitate this without breaking the block&#039;s hash, transactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block&#039;s hash. Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do not need to be stored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-reclaiming-disk-space.png|frame|center|alt=Bitcoin Reclaiming Disk Space]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A block header with no transactions would be about 80 bytes. If we suppose blocks are generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems typically selling with 2GB of RAM as of 2008, and Moore&#039;s Law predicting current growth of 1.2GB per year, storage should not be a problem even if the block headers must be kept in memory.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Simplified Payment Verification ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;It is possible to verify payments without running a full network node. A user only needs to keep a copy of the block headers of the longest proof-of-work chain, which he can get by querying network nodes until he&#039;s convinced he has the longest chain, and obtain the Merkle branch linking the transaction to the block it&#039;s timestamped in. He can&#039;t check the transaction for himself, but by linking it to a place in the chain, he can see that a network node has accepted it, and blocks added after it further confirm the network has accepted it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-simplified-payment-verification.png|frame|center|alt=Bitcoin Simplified Payment Verification]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As such, the verification is reliable as long as honest nodes control the network, but is more vulnerable if the network is overpowered by an attacker. While network nodes can verify transactions for themselves, the simplified method can be fooled by an attacker&#039;s fabricated transactions for as long as the attacker can continue to overpower the network. One strategy to protect against this would be to accept alerts from network nodes when they detect an invalid block, prompting the user&#039;s software to download the full block and alerted transactions to confirm the inconsistency. Businesses that receive frequent payments will probably still want to run their own nodes for more independent security and quicker verification.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Combining and Splitting Value ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-combining-and-splitting-value.png|frame|center|alt=Bitcoin Combining and Splitting Value]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction&#039;s history.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Privacy ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;The traditional banking model achieves a level of privacy by limiting access to information to the parties involved and the trusted third party. The necessity to announce all transactions publicly precludes this method, but privacy can still be maintained by breaking the flow of information in another place: by keeping public keys anonymous. The public can see that someone is sending an amount to someone else, but without information linking the transaction to anyone. This is similar to the level of information released by stock exchanges, where the time and size of individual trades, the &amp;quot;tape&amp;quot;, is made public, but without telling who the parties were.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-privacy.png|frame|center|alt=Bitcoin Privacy]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an additional firewall, a new key pair should be used for each transaction to keep them from being linked to a common owner. Some linking is still unavoidable with multi-input transactions, which necessarily reveal that their inputs were owned by the same owner. The risk is that if the owner of a key is revealed, linking could reveal other transactions that belonged to the same owner.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculations ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.&lt;br /&gt;
&lt;br /&gt;
The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker&#039;s chain being extended by one block, reducing the gap by -1.&lt;br /&gt;
&lt;br /&gt;
The probability of an attacker catching up from a given deficit is analogous to a Gambler&#039;s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:&lt;br /&gt;
&lt;br /&gt;
p = probability an honest node finds the next block&lt;br /&gt;
&lt;br /&gt;
q = probability the attacker finds the next block&lt;br /&gt;
&lt;br /&gt;
qz = probability the attacker will ever catch up from z blocks behind&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Given our assumption that p &amp;gt; q, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn&#039;t make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.&lt;br /&gt;
&lt;br /&gt;
We now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can&#039;t change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.&lt;br /&gt;
&lt;br /&gt;
The receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.&lt;br /&gt;
&lt;br /&gt;
The recipient waits until the transaction has been added to a block and z blocks have been linked after it. He doesn&#039;t know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker&#039;s potential progress will be a Poisson distribution with expected value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-1.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the probability the attacker could still catch up now, we multiply the Poisson density for&lt;br /&gt;
each amount of progress he could have made by the probability he could catch up from that point:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-2.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rearranging to avoid summing the infinite tail of the distribution...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:bitcoin-calculations-3.png|frame|center|alt=Bitcoin Calculations]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Converting to C code...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
double AttackerSuccessProbability(double q, int z)&lt;br /&gt;
{&lt;br /&gt;
:::double p = 1.0 - q;&lt;br /&gt;
:::double lambda = z * (q / p);&lt;br /&gt;
:::double sum = 1.0;&lt;br /&gt;
:::int i, k;&lt;br /&gt;
:::for (k = 0; k &amp;lt;= z; k++)&lt;br /&gt;
:::{&lt;br /&gt;
::::::double poisson = exp(-lambda);&lt;br /&gt;
::::::for (i = 1; i &amp;lt;= k; i++)&lt;br /&gt;
:::::::::poisson *= lambda / i;&lt;br /&gt;
::::::sum -= poisson * (1 - pow(q / p, z - k));&lt;br /&gt;
:::}&lt;br /&gt;
:::return sum;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Running some results, we can see the probability drop off exponentially with z.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.1&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=1   P=0.2045873&lt;br /&gt;
&lt;br /&gt;
z=2   P=0.0509779&lt;br /&gt;
&lt;br /&gt;
z=3   P=0.0131722&lt;br /&gt;
&lt;br /&gt;
z=4   P=0.0034552&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.0009137&lt;br /&gt;
&lt;br /&gt;
z=6   P=0.0002428&lt;br /&gt;
&lt;br /&gt;
z=7   P=0.0000647&lt;br /&gt;
&lt;br /&gt;
z=8   P=0.0000173&lt;br /&gt;
&lt;br /&gt;
z=9   P=0.0000046&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0000012&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
q=0.3&lt;br /&gt;
&lt;br /&gt;
z=0   P=1.0000000&lt;br /&gt;
&lt;br /&gt;
z=5   P=0.1773523&lt;br /&gt;
&lt;br /&gt;
z=10   P=0.0416605&lt;br /&gt;
&lt;br /&gt;
z=15   P=0.0101008&lt;br /&gt;
&lt;br /&gt;
z=20   P=0.0024804&lt;br /&gt;
&lt;br /&gt;
z=25   P=0.0006132&lt;br /&gt;
&lt;br /&gt;
z=30   P=0.0001522&lt;br /&gt;
&lt;br /&gt;
z=35   P=0.0000379&lt;br /&gt;
&lt;br /&gt;
z=40   P=0.0000095&lt;br /&gt;
&lt;br /&gt;
z=45   P=0.0000024&lt;br /&gt;
&lt;br /&gt;
z=50   P=0.0000006&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Solving for P less than 0.1%...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P &amp;lt; 0.001&lt;br /&gt;
&lt;br /&gt;
q=0.10   z=5&lt;br /&gt;
&lt;br /&gt;
q=0.15   z=8&lt;br /&gt;
&lt;br /&gt;
q=0.20   z=11&lt;br /&gt;
&lt;br /&gt;
q=0.25   z=15&lt;br /&gt;
&lt;br /&gt;
q=0.30   z=24&lt;br /&gt;
&lt;br /&gt;
q=0.35   z=41&lt;br /&gt;
&lt;br /&gt;
q=0.40   z=89&lt;br /&gt;
&lt;br /&gt;
q=0.45   z=340&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear:both;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
[1] W. Dai, &amp;quot;b-money,&amp;quot; http://www.weidai.com/bmoney.txt, 1998.&lt;br /&gt;
&lt;br /&gt;
[2] H. Massias, X.S. Avila, and J.-J. Quisquater, &amp;quot;Design of a secure timestamping service with minimal&lt;br /&gt;
trust requirements,&amp;quot; In 20th Symposium on Information Theory in the Benelux, May 1999.&lt;br /&gt;
&lt;br /&gt;
[3] S. Haber, W.S. Stornetta, &amp;quot;How to time-stamp a digital document,&amp;quot; In Journal of Cryptology, vol 3, no&lt;br /&gt;
2, pages 99-111, 1991.&lt;br /&gt;
&lt;br /&gt;
[4] D. Bayer, S. Haber, W.S. Stornetta, &amp;quot;Improving the efficiency and reliability of digital time-stamping,&amp;quot;&lt;br /&gt;
In Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.&lt;br /&gt;
&lt;br /&gt;
[5] S. Haber, W.S. Stornetta, &amp;quot;Secure names for bit-strings,&amp;quot; In Proceedings of the 4th ACM Conference&lt;br /&gt;
on Computer and Communications Security, pages 28-35, April 1997.&lt;br /&gt;
&lt;br /&gt;
[6] A. Back, &amp;quot;Hashcash - a denial of service counter-measure,&amp;quot;&lt;br /&gt;
http://www.hashcash.org/papers/hashcash.pdf, 2002.&lt;br /&gt;
&lt;br /&gt;
[7] R.C. Merkle, &amp;quot;Protocols for public key cryptosystems,&amp;quot; In Proc. 1980 Symposium on Security and&lt;br /&gt;
Privacy, IEEE Computer Society, pages 122-133, April 1980.&lt;br /&gt;
&lt;br /&gt;
[8] W. Feller, &amp;quot;An introduction to probability theory and its applications,&amp;quot; 1957.&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations-3.png&amp;diff=45395</id>
		<title>File:Bitcoin-calculations-3.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations-3.png&amp;diff=45395"/>
		<updated>2014-03-26T01:38:00Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations-2.png&amp;diff=45394</id>
		<title>File:Bitcoin-calculations-2.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations-2.png&amp;diff=45394"/>
		<updated>2014-03-26T01:37:23Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations-1.png&amp;diff=45393</id>
		<title>File:Bitcoin-calculations-1.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations-1.png&amp;diff=45393"/>
		<updated>2014-03-26T01:36:43Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations.png&amp;diff=45392</id>
		<title>File:Bitcoin-calculations.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-calculations.png&amp;diff=45392"/>
		<updated>2014-03-26T01:14:58Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-privacy.png&amp;diff=45391</id>
		<title>File:Bitcoin-privacy.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-privacy.png&amp;diff=45391"/>
		<updated>2014-03-26T01:10:58Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-combining-and-splitting-value.png&amp;diff=45390</id>
		<title>File:Bitcoin-combining-and-splitting-value.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-combining-and-splitting-value.png&amp;diff=45390"/>
		<updated>2014-03-26T01:07:31Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-simplified-payment-verification.png&amp;diff=45389</id>
		<title>File:Bitcoin-simplified-payment-verification.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-simplified-payment-verification.png&amp;diff=45389"/>
		<updated>2014-03-26T01:03:55Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-reclaiming-disk-space.png&amp;diff=45388</id>
		<title>File:Bitcoin-reclaiming-disk-space.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-reclaiming-disk-space.png&amp;diff=45388"/>
		<updated>2014-03-26T00:58:22Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-proof-of-work.png&amp;diff=45387</id>
		<title>File:Bitcoin-proof-of-work.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-proof-of-work.png&amp;diff=45387"/>
		<updated>2014-03-26T00:13:30Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-timestamp-server.png&amp;diff=45385</id>
		<title>File:Bitcoin-timestamp-server.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-timestamp-server.png&amp;diff=45385"/>
		<updated>2014-03-26T00:07:13Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45362</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45362"/>
		<updated>2014-03-25T12:09:09Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--STUB WILL FINISH TONIGHT--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;&lt;br /&gt;
Satoshi Nakamoto&amp;lt;br/&amp;gt;&lt;br /&gt;
satoshin@gmx.com&amp;lt;br/&amp;gt;&lt;br /&gt;
www.bitcoin.org&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 50%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1. Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for nonreversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2. Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45361</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45361"/>
		<updated>2014-03-25T11:17:38Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bitcoin: A Peer-to-Peer Electronic Cash System ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: auto; margin-left: auto; margin-right: auto;&amp;quot;&amp;gt;&lt;br /&gt;
Satoshi Nakamoto&amp;lt;br/&amp;gt;&lt;br /&gt;
satoshin@gmx.com&amp;lt;br/&amp;gt;&lt;br /&gt;
www.bitcoin.org&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot; style=&amp;quot;width: 50%; margin-left: auto; margin-right: auto; text-align:justify;&amp;quot;&amp;gt;&#039;&#039;&#039;Abstract.&#039;&#039;&#039; A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they&#039;ll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1. Introduction ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;Commerce on the Internet has come to rely almost exclusively on financial institutions serving as trusted third parties to process electronic payments. While the system works well enough for most transactions, it still suffers from the inherent weaknesses of the trust based model. Completely non-reversible transactions are not really possible, since financial institutions cannot avoid mediating disputes. The cost of mediation increases transaction costs, limiting the minimum practical transaction size and cutting off the possibility for small casual transactions, and there is a broader cost in the loss of ability to make non-reversible payments for nonreversible services. With the possibility of reversal, the need for trust spreads. Merchants must be wary of their customers, hassling them for more information than they would otherwise need. A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties can be avoided in person by using physical currency, but no mechanism exists to make payments over a communications channel without a trusted party.&lt;br /&gt;
&lt;br /&gt;
What is needed is an electronic payment system based on cryptographic proof instead of trust, allowing any two willing parties to transact directly with each other without the need for a trusted third party. Transactions that are computationally impractical to reverse would protect sellers from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed timestamp server to generate computational proof of the chronological order of transactions. The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2. Transactions ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align:justify;&amp;quot;&amp;gt;We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the&lt;br /&gt;
next by digitally signing a hash of the previous transaction and the public key of the next owner&lt;br /&gt;
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of&lt;br /&gt;
ownership.&lt;br /&gt;
&lt;br /&gt;
[[File:Bitcoin-transactions-white-paper.png|frame|center|alt=Bitcoin Transactions]]&lt;br /&gt;
&lt;br /&gt;
The problem of course is the payee can&#039;t verify that one of the owners did not double-spend the coin. A common solution is to introduce a trusted central authority, or mint, that checks every transaction for double spending. After each transaction, the coin must be returned to the mint to issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. The problem with this solution is that the fate of the entire money system depends on the company running the mint, with every transaction having to go through them, just like a bank. We need a way for the payee to know that the previous owners did not sign any earlier transactions. For our purposes, the earliest transaction is the one that counts, so we don&#039;t care about later attempts to double-spend. The only way to confirm the absence of a transaction is to be aware of all transactions. In the mint based model, the mint was aware of all transactions and decided which arrived first. To accomplish this without a trusted party, transactions must be publicly announced [1], and we need a system for participants to agree on a single history of the order in which they were received. The payee needs proof that at the time of each transaction, the majority of nodes agreed it was the first received.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=File:Bitcoin-transactions-white-paper.png&amp;diff=45360</id>
		<title>File:Bitcoin-transactions-white-paper.png</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=File:Bitcoin-transactions-white-paper.png&amp;diff=45360"/>
		<updated>2014-03-25T11:13:40Z</updated>

		<summary type="html">&lt;p&gt;Btceic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45358</id>
		<title>Essay:Bitcoin: A Peer-to-Peer Electronic Cash System</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Essay:Bitcoin:_A_Peer-to-Peer_Electronic_Cash_System&amp;diff=45358"/>
		<updated>2014-03-25T10:53:28Z</updated>

		<summary type="html">&lt;p&gt;Btceic: Bitcoin White Paper pdf by Satoshi Nakamoto&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The original bitcoin white-paper by [[Satoshi Nakamoto]] ==&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/0B7oIwqaAZzRTYzE0cU9vdFhXbU0/edit?usp=sharing Bitcoin White Paper (pdf)]&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=User:Btceic&amp;diff=45357</id>
		<title>User:Btceic</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=User:Btceic&amp;diff=45357"/>
		<updated>2014-03-25T10:28:56Z</updated>

		<summary type="html">&lt;p&gt;Btceic: btceic - Eric Cogen user page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Eric Cogen&lt;br /&gt;
&lt;br /&gt;
Developer, Bitcoin Enthusiast&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [https://plus.google.com/+EricCogen +EricCogen] Google+ account&lt;br /&gt;
* [https://twitter.com/ericcogen @EricCogen] Twitter account&lt;/div&gt;</summary>
		<author><name>Btceic</name></author>
	</entry>
</feed>