make stake harder
Staking should be permissionless, and the staking logic does not grow in complexity with increasing number of stakers (since there is no iterating over stakers during transactions thanks to the concept of StakeUnits and PoolUnits).
However, adding state to our statechain for each new staker may cause runaway state growth and be vulnerable to low-value stakers (think DoS).
We can cap maximum stakers for a pool (1000-10000) - based on benchmarking, or we can add economic incentives to filter out low-value stakers when a pool is approaching its limit.
We simply assert a minStakeAmt
that has to be higher than the trailing average of the pool above a threshold.
These figures can be adjusted by the validators at any time (and should be set in config files, with an accompanying "update stake limit" SET command.
Add the following validation:
stakerLimit = 100; //Global variable
if (stakerCount <= StakerLimit){
minStakerAmt = 0.0001 // Lowest BinanceChain transfer amount - first 100 stakers there are no limits
} else {
minStakeAmt = aveStake * ((stakerCount/stakerLimit) + 0.1 // Increases minStakeAmt by 10% every 100 stakers
}