BitcoinandBitcoin MiningIntroductionLab ofProfessor Hidetoshi ShimodairaZehady Abdullah KhanBachelor 4th year,Mathematical...
ContentsIntroduction of Bitcoin.What is Bitcoin Mining?Different Mining Methods.Pool-Hopping Problem.Introduction of Hoppi...
BitcoinBitcoinDigitalCurrencyPublic KeyCryptographyInternetSecurityCryptographyFinancialTransactionE-CashComplex NetworkIn...
What is Bitcoin? A digital currency Unit: BTC (1 BTC = 110 USD). Buy or sell goods. Differences Decentralized and Dis...
How Bitcoin looks like? Not a physical object like gold or paper-money. A chain of digital signatures in a block-chain....
Block: Human Readable format6
Block Confirmation: Proof of Work Current target(Tcur): “Bits” field Maximum target(Tmax):0x00000000FFFF0000000000000000...
Block Validation Probability 0x00000000FFFF0000000000000000000000000000000000000000000000000000The offset for difficulty ...
Bitcoin Mining Intro If your hash rate is h and you mine for time , on average thenumber of found blocks is D = Difficul...
Solo Mining as a Poisson Process Number of trial is depends on miner’s hash rate h p: Probability of success(very small)...
Pooled Mining Joint effort & reward distribution. H: Total hash rate of all miners. Single miner’s hash rate h = qH (0<...
Pooled Mining f: Fee/Block, B = Block reward. Operator’s fee for a block = fB. Actual Reward for the pool miners = B – ...
Pooled Mining Reward System A pool has the potential to improve the variance of a miner. Dividing a reward in a fair way...
Proportional Pool14
Proportional Pool (1-f)B is distributed in proportion to the number of shares in aRound. Round: Round is the time betwee...
Proportional Pool: Expected Value &Variance After the success in the previous round, in the next round, wehave N-1 failed...
Proportional Pool: Expected Value &Variance After the success in the previous round, in the next round, wehave N-1 shares...
Pool-Hopping Problem18 Pool-Hopping: Some miners leave pool early to increasetheir profit but that decrease the profit of...
Simplification…19
Pool-hopping Amplification factor20 Represents the amplification factor when xD = (pI )(1/p)=Ishares have already been s...
Pay-per-share Pool21
Pay-per-share pool(PPS) A hopping-proof method. Reward is given per share. When a participant submits a share, he is im...
Marcov chain Modeling in PPS pool When will the PPS pool go bankrupt? Goal: Estimate the financial reserves that the poo...
Marcov chain Modeling in PPS pool(continued) By the central limit theorem, Long term behavior of thestochastic process is...
Bankruptcy Recurrence Equation an: Probability to ever reach 0 (represents bankruptcy). Given: We start in state n and d...
Safe reserve for a PPS pool R: Starting reserve of the pool operator. δ: Probability that the pool will ever go bankrupt...
Hopping Immunity Theorem It’s impossible to stop hopping if you pay rewards tounsuccessful shares. Theorem: Suppose, di...
Methods not discussed PPS is not that good. Hopping-proof methods. First attempt done in Slush’s pool using exponential...
Things I want to research Statistical analysis of pooled mining. Statistical analysis of transaction graphs. Integrate ...
Bibliography Bitcoin: A Peer-to-Peer Electronic Cash System- S. Nakamoto, Tech Report, 2009 Analysis of Bitcoin Pooled M...
The End31
Bitcoin Global NodesCharts32
Bitcoin DemographicsCharts33
Bitcoin PurchaseCharts34
Roles in Bitcoin NetworkCharts35
Things happened because of bitcoinCharts36
Real world/Offline interactionYou can buy and Purchase with BTC!!!Charts37
Offline Bitcoin meetups in USACharts38
Companies and Venture CapitalCharts39
‹#›
Bitcoin Software DownloadGraphs41
Bitcoin PenetrationGraphs42
Downloads vs Penetrationvs Internet AccessGraphs43
Global Search Traffic44 Graphs
Trading Volume45 Graphs
Trading Volume46 Graphs
Bitcoin Volatility247
Is everything positive ? NO Bitcoin can topple governments, destabilizeeconomies, and create uncontrollable globalbazaars...
Upcoming SlideShare
Loading in …5
×

Bitcoin & Bitcoin Mining

2,007 views

Published on

Bitcoin & Bitcoin Mining

  1. 1. BitcoinandBitcoin MiningIntroductionLab ofProfessor Hidetoshi ShimodairaZehady Abdullah KhanBachelor 4th year,Mathematical Science Course,Department of Information andComputer Sciences,School Of Engineering Science,Osaka University.12013-06-12
  2. 2. ContentsIntroduction of Bitcoin.What is Bitcoin Mining?Different Mining Methods.Pool-Hopping Problem.Introduction of Hopping-Proof Methods.2According to mainly two papers:1. Bitcoin: A peer-to-peer electronic cash systemS. Nakamoto, Tech Report, 20092. Analysis of Bitcoin Pooled Mining Reward SystemsMeni Rosenfeld - Distributed, Parallel, and Cluster Computing,2011
  3. 3. BitcoinBitcoinDigitalCurrencyPublic KeyCryptographyInternetSecurityCryptographyFinancialTransactionE-CashComplex NetworkIntro3
  4. 4. What is Bitcoin? A digital currency Unit: BTC (1 BTC = 110 USD). Buy or sell goods. Differences Decentralized and Distributed. Low fee & Fast Transaction. Anonymous: Address <=> Address transaction. Value increase (Only 21,000,000 Bitcoin) How do you get and use bitcoin? Bitcoin exchanges to buy and sell bitcoin. Bitcoin wallets to use bitcoin to receive or send bitcoin.4
  5. 5. How Bitcoin looks like? Not a physical object like gold or paper-money. A chain of digital signatures in a block-chain. Block header Transactions Block Reward(B) 25 bitcoin per valid block Halves every 4 year How do you count your bitcoin? Bitcoin wallet collects/remembers all the transactions associated withyou.5
  6. 6. Block: Human Readable format6
  7. 7. Block Confirmation: Proof of Work Current target(Tcur): “Bits” field Maximum target(Tmax):0x00000000FFFF0000000000000000000000000000000000000000000000000000 Condition of Block confirmation Hash of block header Tcur Block Difficulty(D): (2016 Blocks / every 2 week) Which hash will validate the block ? A Hash validating a block is a Rare Event SHA256 chooses any 256-bit number from 0 ~ 2^2567£Nonce ChangeA completelydifferent hash of theblock headerD =TmaxTcurSHA 256CryptographicHash FunctionBlock HeaderHash of Block header(256 bit Number)
  8. 8. Block Validation Probability 0x00000000FFFF0000000000000000000000000000000000000000000000000000The offset for difficulty 1 is and for difficulty D is The expected number of hashes we need to calculate to find ablock with difficulty D is Every hash has a probability of to validate a block.8208 bits16bitsTmax1232D(216-1)2208 (216-1)2208D2256(216-1)2208D=2256D(216-1)2208=248D(216-1)» 232D
  9. 9. Bitcoin Mining Intro If your hash rate is h and you mine for time , on average thenumber of found blocks is D = Difficulty, h = miner’s hashrate Exp- Ananda buys a mining computer with h = 1Ghash/s = 10^9hash/s . If he mines for a day(86,400 s) when D = 1690906 and B=50BTCFound Blocks = ht / ( 2^32 * D) = 0.0119 blocks = 0.0119 * B = 0.595BTC Classification of mining Solo Mining: Mining alone. Pooled Mining: Mining with other miners in a mining pool.9N =th232Dt
  10. 10. Solo Mining as a Poisson Process Number of trial is depends on miner’s hash rate h p: Probability of success(very small). n: Number of blocks found by a miner mining for time t with hash rate h results in on average blocks. n follows the Poisson distribution P0(λ) where λis the parametercalled intensity. P: Payout P= N x 1B = N x 25 x 11500¥ (1B = 1block = 25 BTC) Exp: Ananda has V[P]=0.0119B2 , σ = 5.454B, About 3 months to find a block in solo mining. The process is completely random and memoryless. May wait on average 3 more months.10l =th232DE[P] = lB =htB232D, V[P] = lB2=htB2232D, s = V[P]th232D
  11. 11. Pooled Mining Joint effort & reward distribution. H: Total hash rate of all miners. Single miner’s hash rate h = qH (0<q<1) E[Pp]: Total average payout of the pool E[Ps]: Single miner’s payout in pooled mining V[Ps]: Single miner’s variance in pooled mining11E[Pp ]=HtB232DE[Ps ]= qHtB232D=hHHtB232D=htB232D= l = E[P]V[Ps ]= q2HtB232D= qhtB232D= ql < l =V[p]
  12. 12. Pooled Mining f: Fee/Block, B = Block reward. Operator’s fee for a block = fB. Actual Reward for the pool miners = B – fB = (1-f)B. In a pool Each miner submits shares into the pool. Share: Hash of a block header calculated by a miner which isless than Tcur assuming D=1 (e.g. Tcur = Tmax). Each hash has a probability of to be a share in the pool. Each share has a probability p = to validate a block. For a single share, a miner’sExpected payout = Expected contribution to total reward = pB1212321D
  13. 13. Pooled Mining Reward System A pool has the potential to improve the variance of a miner. Dividing a reward in a fair way is difficult.Existing pool reward systems13PooledMiningSimpleRewardSystemsProportionalPay-per-shareScore-basedSystemsSlush’sMethodGeometricMethodPay-per-last-N-shares
  14. 14. Proportional Pool14
  15. 15. Proportional Pool (1-f)B is distributed in proportion to the number of shares in aRound. Round: Round is the time between two success (2 blocks). n: Number of shares submitted by a miner during a round. N: Total number of shares during the round. Miner’s payout = Assumption: Fixed number of miners in a proportional system. N follows a negative binomial distribution with success ratep=1/D.15nN1- f( )B#trial = #success+ # failureP(N) =#success+ # failure-1#success -1æèçöø÷ p#success-1(1- p)# failurep
  16. 16. Proportional Pool: Expected Value &Variance After the success in the previous round, in the next round, wehave N-1 failed shares before the final successful share.16#success = 2 # failure = (N -1)P(N) =2 +(N -1)-12 -1æèçöø÷ p2-1(1- p)N-1p =N1æèçöø÷ p2-1(1- p)N-1p= Np2(1- p)N-1Reward for a share, w =BN(ignoring fees)Expected PayoutE[w]= E[BN]=BNNp2(1- p)N-1= p2BN=1¥å (1- p)K= pBK=0¥å
  17. 17. Proportional Pool: Expected Value &Variance After the success in the previous round, in the next round, wehave N-1 shares before the final success share. Exp : if D = 1.5 x 106, Variance per share of a miner in a pool is 1.13 x 105 timesless than the variance in solo mining.17
  18. 18. Pool-Hopping Problem18 Pool-Hopping: Some miners leave pool early to increasetheir profit but that decrease the profit of continuous miners. N: Total Number of shares follows a geometric distributionwith parameter p. Given that, I shares already submitted, then N > I.P(N) = p(1- p)N-1P(N | N > I) =0 N £ Ip(1- p)N-I-1N > IìíïîïE[w | N > I] =p(1- p)N-I-1BNN=I+1¥å (w =BN)If I is small,e.g. shares submitted at the very start,E[w | N > I] » -pBln p = pBln D > pB
  19. 19. Simplification…19
  20. 20. Pool-hopping Amplification factor20 Represents the amplification factor when xD = (pI )(1/p)=Ishares have already been submitted. Monotonically decreasing function. A pool hopper will mine if x < x0 and mine solo when x >x0. The payout of the honest miners will be less thanexpected because of hopping by pool hoppers.f(x):= exp(x)E1(x)x » 0, f (x) » -ln x -g ,where g is Euler gamma constantx » ¥, f (x) »1x +1f (x) =1 represents solo mining for x0 = 0.4348182 » 43.5%
  21. 21. Pay-per-share Pool21
  22. 22. Pay-per-share pool(PPS) A hopping-proof method. Reward is given per share. When a participant submits a share, he is immediatelyrewarded with (1-f)pB independent of found blocks . Operator keeps all the rewards for found blocks. PPS is a deterministic value known in advance. Properties: Offers zero variance in the reward per share. No waiting time. No losses due to pool-hopping. But operator is taking the risk What if no blocks are found? Chance of bankruptcy.22
  23. 23. Marcov chain Modeling in PPS pool When will the PPS pool go bankrupt? Goal: Estimate the financial reserves that the pool operatorshould keep to prevent pool bankruptcy. Pool operator’s balance can be modeled as the Markovchain where each submitted share corresponds to a step.23Xt+1 - Xt =-(1- f )pB + B w.p. p-(1- f )pB w.p. 1-pìíïîïE[Xt - Xt-1]= {-(1- f )pB+ B}p+{-(1- f )pB}(1- p) = fpBE[(Xt - Xt-1)2]= -p2B2+ pB2+ f 2p2B2V[Xt - Xt-1]= pB2- p2B2» pB2
  24. 24. Marcov chain Modeling in PPS pool(continued) By the central limit theorem, Long term behavior of thestochastic process is equivalent to the following form with thesame expectation fpB and variance pB2. Scaling the initial condition by a factor of , we get thefollowing equivalence.24pBXt+1 - Xt =+ pB w.p.(1+f p)2- pB w.p.(1-f p)2ìíïïîïïXt+1 - Xt =+1 w.p.(1+f p)2-1 w.p.(1-f p)2ìíïïîïï
  25. 25. Bankruptcy Recurrence Equation an: Probability to ever reach 0 (represents bankruptcy). Given: We start in state n and denoting By conditioning on the first step we can get recurrence eqn. The characteristic polynomial of this eqn. is General solution: Boundary Conditions: , we have Thus,25q = (1+ f p)/ 2an = qan+1 +(1-q)an-1ql2-l +(1-q)a0 =1,a¥ = 0an = A+ B((1-q)/ q)nA = 0,B =1an =1-qqæèçöø÷n=1- f p1+ f pæèççöø÷÷n» e-2 fn p
  26. 26. Safe reserve for a PPS pool R: Starting reserve of the pool operator. δ: Probability that the pool will ever go bankrupt. To maintain a bankruptcy probability at most , pool shouldreserve at least Exp1: B = 50 BTC,δ=1/1000,f = 5% , R=3454 BTC Exp2: If operator fixes f=1%,he has R = 500BTC,then Probability of bankruptcy δ= 81.9%26d = a RpB» exp -2 fR ppBæèççöø÷÷ = exp-2 fRBæèçöø÷R =Bln(1/d)2 f
  27. 27. Hopping Immunity Theorem It’s impossible to stop hopping if you pay rewards tounsuccessful shares. Theorem: Suppose, difficulty D and block reward B are fixed. Let a reward method distribute (1-f)B among shares inthe round according to a deterministic function of theround length and the share index.27Expected Reward per share at thetime of submission is always (1-f)pBThe entire reward is always given to thelast share submitted .
  28. 28. Methods not discussed PPS is not that good. Hopping-proof methods. First attempt done in Slush’s pool using exponentialscore function to give scores to the miners. Not completely hopping-proof. Other Score based methods Geometric method. Pay-per-last-N-shares. Some other advanced method.28
  29. 29. Things I want to research Statistical analysis of pooled mining. Statistical analysis of transaction graphs. Integrate or Develop better mining pools.29
  30. 30. Bibliography Bitcoin: A Peer-to-Peer Electronic Cash System- S. Nakamoto, Tech Report, 2009 Analysis of Bitcoin Pooled Mining Reward Systems- Meni Rosenfeld - Distributed, Parallel, and Cluster Computing,2011 On Bitcoin and Red Balloons- M. Babaioff, S. Dobzinski, S. Oren, and A. Zohar, SIGEcom(Special InterestGroup on ecommerce) Exchanges, 10(3), 2011 Quantitative Analysis of the Full Bitcoin Transaction Graph- D. Ron and A. Shamir, Financial Cryptography 2013 Bitter to Better — How to Make Bitcoin a Better Currency- S. Barber, X. Boyen, E. Shi, and E. Uzun, Financial Cryptography 2012 Cryptographic hash-function basics: Definitions, implications, andseparations for preimage resistance, second-preimage resistance,and collision resistance- P Rogaway, T Shrimpton - Fast Software Encryption, 2004 - Springer30
  31. 31. The End31
  32. 32. Bitcoin Global NodesCharts32
  33. 33. Bitcoin DemographicsCharts33
  34. 34. Bitcoin PurchaseCharts34
  35. 35. Roles in Bitcoin NetworkCharts35
  36. 36. Things happened because of bitcoinCharts36
  37. 37. Real world/Offline interactionYou can buy and Purchase with BTC!!!Charts37
  38. 38. Offline Bitcoin meetups in USACharts38
  39. 39. Companies and Venture CapitalCharts39
  40. 40. ‹#›
  41. 41. Bitcoin Software DownloadGraphs41
  42. 42. Bitcoin PenetrationGraphs42
  43. 43. Downloads vs Penetrationvs Internet AccessGraphs43
  44. 44. Global Search Traffic44 Graphs
  45. 45. Trading Volume45 Graphs
  46. 46. Trading Volume46 Graphs
  47. 47. Bitcoin Volatility247
  48. 48. Is everything positive ? NO Bitcoin can topple governments, destabilizeeconomies, and create uncontrollable globalbazaars for contraband. Bitcoins will facilitate transactions for criminals, online poker players, tax-evaders, pornographers, drug dealers, and other unsavory types tired of carrying around aVermeer. Bitcoin is just like knife or hammer. You can kill oryou can use it the most efficient,profitable way !!!!48

×