bitcoin and bitcoin mining introduction lab of professor hidetoshi shimodaira zehady abdullah khan...
Post on 03-Jan-2016
217 Views
Preview:
TRANSCRIPT
Bitcoinand
Bitcoin MiningIntroduction
Lab of Professor Hidetoshi Shimodaira
Zehady Abdullah KhanBachelor 4th year,Mathematical Science Course,Department of Information and Computer Sciences,School Of Engineering Science,Osaka University.
1
2013-06-12
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, 20092. Analysis of Bitcoin Pooled Mining Reward Systems Meni Rosenfeld - Distributed, Parallel, and Cluster Computing,2011
Bitcoin
Bitcoin
Digital Currenc
y
Public Key Cryptogra
phy
Internet Security
Cryptography
Financial Transaction
E-Cash
Complex Network
Intro3
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
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
Block: Human Readable format
6
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^256
7
Nonce ChangeA completely
different hash of theblock header
SHA 256 CryptographicHash Function
Block Header
Hash of Block header
(256 bit Number)
Block Validation Probability 0x00000000FFFF00000000000000000000000000000000000000000000
00000000
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 bits16bits
Tmax
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
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 parameter
called 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.
10
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 mining
11
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 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’s Expected payout = Expected contribution to total reward = pB
12
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-basedSystems
Slush’s Method
Geometric Method
Pay-per-last-N-shares
Proportional Pool
14
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
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
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 106, Variance per share of a miner in a pool is 1.13 x 105
times less than the variance in solo mining.
17
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.
Simplification…
19
Pool-hopping Amplification factor
20
Represents the amplification factor when xD = (pI )
(1/p)=I shares 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 than expected because of hopping by pool hoppers.
Pay-per-share Pool
21
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
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
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 pB2.
Scaling the initial condition by a factor of , we get the following equivalence.
24
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,
25
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
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 .
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
Things I want to research Statistical analysis of pooled mining. Statistical analysis of transaction graphs. Integrate or Develop better mining pools.
29
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
The End
31
Bitcoin Global Nodes
Charts32
Bitcoin Demographics
Charts33
Bitcoin Purchase
Charts34
Roles in Bitcoin Network
Charts35
Things happened because of bitcoin
Charts36
Real world/Offline interactionYou can buy and Purchase with BTC!!!
Charts37
Offline Bitcoin meetups in USA
Charts38
Companies and Venture Capital
Charts39
Bitcoin Client Software(Wallet)
40
Bitcoin Software Download
Graphs41
Bitcoin Penetration
Graphs42
Downloads vs Penetration
vs Internet Access
Graphs43
Global Search Traffic
44 Graphs
Trading Volume
45 Graphs
Trading Volume
46 Graphs
Bitcoin Volatility
247
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
top related