Description
The FarmingPool contract does not have a way to query the total number of active stakes across all users. While individual stakes are queryable, there is no aggregate count.
Current behavior
No active stake count getter.
Expected behavior
Maintain a running count:
fn active_stake_count(env: &Env) -> u32 {
env.storage().instance().get(&DataKey::ActiveStakeCount).unwrap_or(0)
}
Increment on first stake, decrement when stake is fully removed.
Why this matters
Protocol analytics need active stake counts for adoption metrics.
Labels
enhancement, farming-pool, good first issue
Description
The FarmingPool contract does not have a way to query the total number of active stakes across all users. While individual stakes are queryable, there is no aggregate count.
Current behavior
No active stake count getter.
Expected behavior
Maintain a running count:
Increment on first stake, decrement when stake is fully removed.
Why this matters
Protocol analytics need active stake counts for adoption metrics.
Labels
enhancement, farming-pool, good first issue