Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##Deepbit hoppers v prop fulltimers - how much do hoppers take away?
- ##
- ##Note that this can be done far more simply and efficienctly, but this simulation has the advantage
- ##of being easily followed by a novice to simulations
- B<-50;maxRounds<-10000;loop<-50;hop<-0.435
- fractionOfRoundsHopped<-145/179.5
- hopvfulltime.mat<-matrix(0,loop,13);D<-10^6
- for(i in 1:loop){
- totalRoundShares<-1
- while(signif(mean(totalRoundShares),digits=3)!=signif(D,digits=3)||
- signif(sd(totalRoundShares),digits=3)!=signif(D,digits=3)){
- totalRoundShares<-rgeom(maxRounds,1/D)+1
- }
- tRS.le43<-subset(totalRoundShares,totalRoundShares-hop*D<=0)
- tRS.gt43<-subset(totalRoundShares,totalRoundShares-hop*D>0)
- #uncomment the line labelled 1. and comment out the one below it
- #if you want to determine how earnings change as a
- #function of hashrate
- #1.###hopperVpoolRatio<-10^((-i)/loop)
- hopperVpoolRatio<-(4200-3700)/4200* fractionOfRoundsHopped
- hopper.shares<-(sum(tRS.le43)+sum(0.435*D*tRS.gt43/tRS.gt43))*hopperVpoolRatio/maxRounds
- fulltimer.shares<-mean(totalRoundShares)-hopper.shares
- hopper.prop<-hopper.shares/(hopper.shares+fulltimer.shares)
- fulltimer.prop<-fulltimer.shares/(hopper.shares+fulltimer.shares)
- hopper.rewards<-(sum(tRS.le43/tRS.le43)+sum(0.435*D/tRS.gt43))*hopperVpoolRatio*B/maxRounds
- fulltimer.rewards<-B-hopper.rewards
- hopper.due<-hopper.prop*B
- fulltimer.due<-B-hopper.due
- hopper.round.efficiency<-hopper.rewards/B
- fulltimer.round.efficiency<-fulltimer.rewards/B
- hopper.share.efficiency<-hopper.rewards/hopper.shares/(B/D)*100
- fulltimer.share.efficiency<-fulltimer.rewards/fulltimer.shares/(B/D)*100
- hopvfulltime.mat[i,1]<-1/(1-hopperVpoolRatio)
- hopvfulltime.mat[i,2]<-hopper.shares
- hopvfulltime.mat[i,3]<-fulltimer.shares
- hopvfulltime.mat[i,4]<-hopper.prop
- hopvfulltime.mat[i,5]<-fulltimer.prop
- hopvfulltime.mat[i,6]<-hopper.rewards
- hopvfulltime.mat[i,7]<-fulltimer.rewards
- hopvfulltime.mat[i,8]<-hopper.round.efficiency
- hopvfulltime.mat[i,9]<-fulltimer.round.efficiency
- hopvfulltime.mat[i,10]<-hopper.due
- hopvfulltime.mat[i,11]<-fulltimer.due
- hopvfulltime.mat[i,12]<-hopper.share.efficiency
- hopvfulltime.mat[i,13]<-fulltimer.share.efficiency
- print(i)
- }
- mean(hopvfulltime.mat[,12])
- mean(hopvfulltime.mat[,13])
Advertisement
Add Comment
Please, Sign In to add comment