Skip to content

Instantly share code, notes, and snippets.

Created Apr 22, 2021
What would you like to do?
(* return calculations as a function of n nodes, rough calculations *)
fr=(23/25)(1/25);(*average fraction of blocks produced, assuming 100% success rate*)
l=(1152*75*fr); (* num blocks produced by the SPB in a day. *)
m=(1152*75*fr); (* number of blocks SPB expected to produce *)
V=10000000+n*10000; (* votes and stake of the FullNodePool SPB node *)
tvotes=105745810; (*total votes 4/20/2021, w/ ~1450 active full nodes*)
W=tvotes+(n-1450)*10000; (* votes and stake of top 100 SPB nodes, subtracting stake for 1450 nodes to prevent counting it twice *)
X=1152*75; (* total number of blocks produced by all SPBs in a cycle*)
R=0.951293759512937595; (* fixed Vite per block pay rate *)
Q=((l/m)*(V/W)*X*R*0.5+l*R*0.5) (* total rewards *)];
extra[x_]:=If[x<8000,x,((x-8000)8000)/x+8000]; (* bonus rewards from latest ViteLabs incentive program *)
p1=Plot[{totalrewardspernode[n],sbprewardspernode[n]},{n,1,5000},PlotRange->{0,35},PlotTheme->"Detailed", PlotLabel->"Estimated Full Node Daily Rewards",FrameLabel->{"n (# of nodes)","Vite per day"},LabelStyle->{FontSize->14},ImageSize->Large,PlotLegends->{"total rewards","\"SBP only\" rewards"}]
p2=Plot[{APR[n],APRbase[n],APY[n]},{n,1,4000},PlotRange->{0,100},PlotTheme->"Detailed", PlotLabel->"Estimated Full Node Annualized Returns",FrameLabel->{"n (# of nodes)","Annualized Returns (%)"},LabelStyle->{FontSize->14},ImageSize->Large,PlotLegends->{"APR","APR (\"SBP only\")","APY (w/ compounding)"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment