Author

Topic: A little Help need with the staking pool (Read 129 times)

full member
Activity: 168
Merit: 100
January 13, 2018, 04:47:07 PM
#3
Hello i am looking to open a staking pool but there is one thing i dont get it

If there are 10000000abc coin and a for sure some would have deposit 1000abc some would have 10abc ...
so when ever i get stake how will i  decide how much balance i have to put in all those accounts who deposit in the pool , how will i know the % of abc coin holder ,

Thank you anyone who help me out

I would say you would run a while/wend statement on all users balances and get the percentage of their balance compared to the total balance. Then, you would just distribute the staking rewards based off of that percentage. For example. If the total balance is 1,000 coins and a user has 100 coins, his percentage is 10%. So if the staking rewards were 10 coins, that user gets 1 coin. Hope this helps.
i am talking how can i get each persons % easily ,
legendary
Activity: 1568
Merit: 1041
1GhxHtabWhEpdb7e7oEJ2vd542n33BwTHR
January 12, 2018, 06:42:05 AM
#2
Hello i am looking to open a staking pool but there is one thing i dont get it

If there are 10000000abc coin and a for sure some would have deposit 1000abc some would have 10abc ...
so when ever i get stake how will i  decide how much balance i have to put in all those accounts who deposit in the pool , how will i know the % of abc coin holder ,

Thank you anyone who help me out

I would say you would run a while/wend statement on all users balances and get the percentage of their balance compared to the total balance. Then, you would just distribute the staking rewards based off of that percentage. For example. If the total balance is 1,000 coins and a user has 100 coins, his percentage is 10%. So if the staking rewards were 10 coins, that user gets 1 coin. Hope this helps.
full member
Activity: 168
Merit: 100
January 12, 2018, 05:21:03 AM
#1
Hello i am looking to open a staking pool but there is one thing i dont get it

If there are 10000000abc coin and a for sure some would have deposit 1000abc some would have 10abc ...
so when ever i get stake how will i  decide how much balance i have to put in all those accounts who deposit in the pool , how will i know the % of abc coin holder ,

Thank you anyone who help me out
Jump to: