Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bitcoin and Bitcoin Mining Introduction Lab of Professor Hidetoshi Shimodaira Zehady Abdullah Khan Bachelor 4 th year, Mathematical Science Course, Department.

Similar presentations


Presentation on theme: "Bitcoin and Bitcoin Mining Introduction Lab of Professor Hidetoshi Shimodaira Zehady Abdullah Khan Bachelor 4 th year, Mathematical Science Course, Department."— Presentation transcript:

1 Bitcoin and Bitcoin Mining Introduction Lab of Professor Hidetoshi Shimodaira Zehady Abdullah Khan Bachelor 4 th year, Mathematical Science Course, Department of Information and Computer Sciences, School Of Engineering Science, Osaka University. 1 2013-06-12

2 Contents Introduction of Bitcoin.What is Bitcoin Mining?Different Mining Methods.Pool-Hopping Problem.Introduction of Hopping-Proof Methods. 2 According to mainly two papers: 1. Bitcoin: A peer-to-peer electronic cash system S. Nakamoto, Tech Report, 2009 2. Analysis of Bitcoin Pooled Mining Reward Systems Meni Rosenfeld - Distributed, Parallel, and Cluster Computing,2011

3 Bitcoin Digital Currency Public Key Cryptograp hy Internet Security Cryptography Financial Transaction E-Cash Complex Network Intro 3

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 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 with you. 5

6 Block: Human Readable format 6

7 Block Confirmation: Proof of Work  Current target( T cur ): “Bits” field  Maximum target( T max ): 0x00000000FFFF0000000000000000000000000000000000000000000000000000  Condition of Block confirmation  Hash of block header T cur  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^256 7 Nonce Change A completely different hash of the block header SHA 256 Cryptographic Hash Function SHA 256 Cryptographic Hash Function Block Header Hash of Block header (256 bit Number) Hash of Block header (256 bit Number)

8 Block Validation Probability  0x00000000FFFF0000000000000000000000000000000000000000000000000000 The offset for difficulty 1 is and for difficulty D is  The expected number of hashes we need to calculate to find a block with difficulty D is  Every hash has a probability of to validate a block. 8 208 bits 16bits T max

9 Bitcoin Mining Intro  If your hash rate is h and you mine for time, on average the number of found blocks is  D = Difficulty, h = miner’s hashrate  Exp- Ananda buys a mining computer with h = 1Ghash/s = 10^9 hash/s. If he mines for a day( 86,400 s ) when D = 1690906 and B= 50BTC Found Blocks = ht / ( 2^32 * D) = 0.0119 blocks = 0.0119 * B = 0.595 BTC  Classification of mining  Solo Mining: Mining alone.  Pooled Mining: Mining with other miners in a mining pool. 9

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 P 0 (λ) where λis the parameter called intensity.  P: Payout P= N x 1B = N x 25 x 11500¥ (1B = 1block = 25 BTC)  Exp: Ananda has V[P]=0.0119B 2, σ = 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. 10

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[P p ] : Total average payout of the pool  E[P s ] : Single miner’s payout in pooled mining  V[P s ] : Single miner’s variance in pooled mining 11

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 is less than T cur assuming D=1 (e.g. T cur = T max ).  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’s Expected payout = Expected contribution to total reward = pB 12

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 systems 13 Pooled Mining Simple Reward Systems Proportional Pay-per- share Score-based Systems Slush’s Method Geometric Method Pay-per-last- N-shares

14 Proportional Pool 14

15 Proportional Pool  (1-f)B is distributed in proportion to the number of shares in a Round.  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 rate p=1/D. 15

16 Proportional Pool: Expected Value & Variance  After the success in the previous round, in the next round, we have N-1 failed shares before the final successful share. 16

17 Proportional Pool: Expected Value & Variance  After the success in the previous round, in the next round, we have N-1 shares before the final success share.  Exp : if D = 1.5 x 10 6, Variance per share of a miner in a pool is 1.13 x 10 5 times less than the variance in solo mining. 17

18 Pool-Hopping Problem 18  Pool-Hopping: Some miners leave pool early to increase their profit but that decrease the profit of continuous miners.  N: Total Number of shares follows a geometric distribution with parameter p.  Given that, I shares already submitted, then N > I.

19 Simplification… 19

20 Pool-hopping Amplification factor 20   Represents the amplification factor when xD = (p I )(1/p)= I shares have already been submitted.  Monotonically decreasing function.  A pool hopper will mine if x x 0.  The payout of the honest miners will be less than expected because of hopping by pool hoppers.

21 Pay-per-share Pool 21

22 Pay-per-share pool(PPS)  A hopping-proof method.  Reward is given per share.  When a participant submits a share, he is immediately rewarded 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 Marcov chain Modeling in PPS pool  When will the PPS pool go bankrupt?  Goal: Estimate the financial reserves that the pool operator should keep to prevent pool bankruptcy.  Pool operator’s balance can be modeled as the Markov chain where each submitted share corresponds to a step. 23

24 Marcov chain Modeling in PPS pool (continued)  By the central limit theorem, Long term behavior of the stochastic process is equivalent to the following form with the same expectation fpB and variance pB 2.  Scaling the initial condition by a factor of, we get the following equivalence. 24

25 Bankruptcy Recurrence Equation  a n : 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, 25

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 should reserve 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% 26

27 Hopping Immunity Theorem  It’s impossible to stop hopping if you pay rewards to unsuccessful shares.  Theorem:  Suppose, difficulty D and block reward B are fixed.  Let a reward method distribute (1-f)B among shares in the round according to a deterministic function of the round length and the share index. 27 Expected Reward per share at the time of submission is always (1-f)pB The entire reward is always given to the last share submitted. The entire reward is always given to the last share submitted.

28 Methods not discussed  PPS is not that good.  Hopping-proof methods.  First attempt done in Slush’s pool using exponential score 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 Things I want to research  Statistical analysis of pooled mining.  Statistical analysis of transaction graphs.  Integrate or Develop better mining pools. 29

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 Interest Group 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, and separations for preimage resistance, second-preimage resistance, and collision resistance - P Rogaway, T Shrimpton - Fast Software Encryption, 2004 - Springer 30

31 The End 31

32 Bitcoin Global Nodes Charts 32

33 Bitcoin Demographics Charts 33

34 Bitcoin Purchase Charts 34

35 Roles in Bitcoin Network Charts 35

36 Things happened because of bitcoin Charts 36

37 Real world/Offline interaction You can buy and Purchase with BTC!!! Charts 37

38 Offline Bitcoin meetups in USA Charts 38

39 Companies and Venture Capital Charts 39

40 Bitcoin Client Software(Wallet) 40

41 Bitcoin Software Download Graphs 41

42 Bitcoin Penetration Graphs 42

43 Downloads vs Penetration vs Internet Access Graphs 43

44 Global Search Traffic 44 Graphs

45 Trading Volume 45 Graphs

46 Trading Volume 46 Graphs

47 Bitcoin Volatility 2 47

48 Is everything positive ? NO  Bitcoin can topple governments, destabilize economies, and create uncontrollable global bazaars for contraband.  Bitcoins will facilitate transactions for  criminals,  online poker players,  tax-evaders,  pornographers,  drug dealers,  and other unsavory types tired of carrying around a Vermeer.  Bitcoin is just like knife or hammer. You can kill or you can use it the most efficient,profitable way !!!! 48


Download ppt "Bitcoin and Bitcoin Mining Introduction Lab of Professor Hidetoshi Shimodaira Zehady Abdullah Khan Bachelor 4 th year, Mathematical Science Course, Department."

Similar presentations


Ads by Google