File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,14 @@ message EpochStats {
5353 repeated UserWithStats stats = 2 ;
5454}
5555
56- // GlobalStats stores global stats
56+ // GlobalStats stores global stats for the rolling window (default 30d).
5757message GlobalStats {
5858 // Notional USDC traded in quantums
5959 uint64 notional_traded = 1 ;
6060}
6161
62- // UserStats stores stats for a User
62+ // UserStats stores stats for a User. This is the sum of all stats for a user in the
63+ // rolling window (default 30d).
6364message UserStats {
6465 // Taker USDC in quantums
6566 uint64 taker_notional = 1 ;
Original file line number Diff line number Diff line change @@ -282,6 +282,7 @@ func (k Keeper) ExpireOldStats(ctx sdk.Context) {
282282 stats := k .GetUserStats (ctx , removedStats .User )
283283 stats .TakerNotional -= removedStats .Stats .TakerNotional
284284 stats .MakerNotional -= removedStats .Stats .MakerNotional
285+ stats .AffiliateRevenueGeneratedQuantums -= removedStats .Stats .AffiliateRevenueGeneratedQuantums
285286 k .SetUserStats (ctx , removedStats .User , stats )
286287
287288 // Just remove TakerNotional to avoid double counting
You can’t perform that action at this time.
0 commit comments