UserStats account tracks aggregate statistics and settings across all sub-accounts for a given authority. It includes trading volume, referral information, and fuel rewards.
Account Structure
The wallet address that owns these stats
The referrer’s wallet address (if this user was referred)
Detailed fee statistics for the user
Timestamp when the next fee epoch begins
Rolling 30-day maker volume
Rolling 30-day taker volume
Rolling 30-day filler volume
Timestamp of last maker volume update
Timestamp of last taker volume update
Timestamp of last filler volume update
Amount of quote asset staked in the insurance fund
Current number of active sub-accounts
Total number of sub-accounts ever created
Status flags for referrer/referral relationships
Whether to disable updating perp bid/ask TWAP
Bitmap of paused operations for this user
Status of fuel overflow mechanism
Fuel points earned from insurance fund staking
Fuel points earned from deposits
Fuel points earned from borrows
Fuel points earned from positions
Fuel points earned from taker trades
Fuel points earned from maker trades
Amount of governance token staked in the insurance fund
Timestamp of the last fuel insurance fund bonus update
Usage
Helper Methods
TheUserStats struct implements helper methods:
is_referrer()- Returns true if the user is a referreris_referred()- Returns true if the user was referred by someone