cosmosquad-labs / squad

Apache License 2.0
6 stars 3 forks source link

Checking Problems when setting a high MaxEntries of staking.params #5

Closed dongsam closed 2 years ago

dongsam commented 2 years ago

For LiquidStaking module, we need to generate a lot of unbonding and redelegation in one moulde account, so we need to examine whether increasing staking.params.MaxEntries is a problem.

dongsam commented 2 years ago

When liquid unstaking, we calling custom unbond function LiquidUnbond without max entries checking https://github.com/cosmosquad-labs/squad/blob/3fa541664b71ae8111908b0258f95d9c5349bfbc/x/liquidstaking/keeper/liquidstaking.go#L201-L228

and since the max_entries is only checked for delegatorAddr, validatorSrcAddr and validatorDstAddr pairs, rebalancing is not expected to occur often enough for the pair to exceed the default max_entries of 7.