Description
The FarmingPool contract does not have a way to query the total amount of credits banked across all users. While individual user credits are queryable, there is no aggregate.
Current behavior
No banked credits aggregate.
Expected behavior
Maintain a running total:
fn total_banked_credits(env: &Env) -> i128 {
env.storage().instance().get(&DataKey::TotalBankedCredits).unwrap_or(0)
}
Update during checkpoints and withdrawals.
Why this matters
Protocol analytics need total banked credits for reward distribution calculations.
Labels
enhancement, farming-pool, help wanted
Description
The FarmingPool contract does not have a way to query the total amount of credits banked across all users. While individual user credits are queryable, there is no aggregate.
Current behavior
No banked credits aggregate.
Expected behavior
Maintain a running total:
Update during checkpoints and withdrawals.
Why this matters
Protocol analytics need total banked credits for reward distribution calculations.
Labels
enhancement, farming-pool, help wanted