Description
The FarmingPool's unlock_assets function does not emit an event when a partial unlock reduces the position to zero. The event is only emitted when there is still a remaining position.
Wait, actually looking at the code:
env.events().publish(
(symbol_short!("pool"), symbol_short!("unlocked")),
(user, amount, total_credits),
);
The event IS emitted regardless. Let me check if there's an issue with the event data.
Actually the event looks correct. Let me change this issue.
Revised description
The FarmingPool contract does not have a way to query the total amount of credits distributed across all users. While individual user credits are queryable, there is no protocol-wide aggregate.
Expected behavior
Add a total_distributed_credits() -> i128 function that tracks cumulative credits distributed.
Why this matters
Protocol analytics need total distributed credits for reward rate calculations and inflation monitoring.
Labels
enhancement, farming-pool, help wanted
Description
The FarmingPool's
unlock_assetsfunction does not emit an event when a partial unlock reduces the position to zero. The event is only emitted when there is still a remaining position.Wait, actually looking at the code:
The event IS emitted regardless. Let me check if there's an issue with the event data.
Actually the event looks correct. Let me change this issue.
Revised description
The FarmingPool contract does not have a way to query the total amount of credits distributed across all users. While individual user credits are queryable, there is no protocol-wide aggregate.
Expected behavior
Add a
total_distributed_credits() -> i128function that tracks cumulative credits distributed.Why this matters
Protocol analytics need total distributed credits for reward rate calculations and inflation monitoring.
Labels
enhancement, farming-pool, help wanted