pub struct SimulationReport {Show 16 fields
pub interval: i64,
pub users: Option<Vec<User>>,
pub profit_loss: Decimal,
pub trades: u64,
pub successful_trades: u64,
pub failed_trades: u64,
pub market_volatility: Decimal,
pub liquidity: Decimal,
pub adoption_rate: Decimal,
pub total_burned: Decimal,
pub burn_rate: Decimal,
pub inflation_rate: Decimal,
pub user_retention: Decimal,
pub network_activity: u64,
pub token_price: Decimal,
pub total_new_tokens: Decimal,
}
Expand description
Report containing the results of a simulation.
Fields§
§interval: i64
Timestamp of the simulation interval.
users: Option<Vec<User>>
List of users and their balances, behaviors, etc. Only available in the final report.
profit_loss: Decimal
Profit or loss for the interval. Positive value indicates profit, negative value indicates loss.
trades: u64
Number of trades made in the interval. This includes both successful and failed trades.
successful_trades: u64
Number of successful trades made in the interval. A trade is considered successful if the user has a positive balance.
failed_trades: u64
Number of failed trades made in the interval. A trade is considered failed if the user has a zero balance.
market_volatility: Decimal
Market volatility during the simulation. This is the standard deviation of token prices.
liquidity: Decimal
Liquidity of the token during the simulation. Liquidity is the number of trades per second.
adoption_rate: Decimal
Adoption rate of the token. Adoption rate is the percentage of users who have a positive balance.
total_burned: Decimal
Total number of tokens burned during the simulation.
burn_rate: Decimal
Burn rate of the token. Burn rate is the number of tokens burned per user.
inflation_rate: Decimal
Inflation rate of the token. Inflation rate is the number of new tokens created per user.
user_retention: Decimal
User retention rate. User retention rate is the percentage of users who have a positive balance.
network_activity: u64
Network activity (e.g., transactions per second). This is the number of transactions made in the interval.
token_price: Decimal
Actual token price during the simulation. This is the price of the token at the end of the simulation.
total_new_tokens: Decimal
Total number of new tokens created during the simulation.
Implementations§
Source§impl SimulationReport
impl SimulationReport
Sourcepub fn calculate_liquidity(
&self,
trades: Decimal,
interval_duration: Decimal,
decimals: u32,
) -> Decimal
pub fn calculate_liquidity( &self, trades: Decimal, interval_duration: Decimal, decimals: u32, ) -> Decimal
Calculate the liquidity of the token. Liquidity is the number of trades per second.
§Arguments
trades
- Number of trades made in the interval.interval_duration
- Duration of the interval in seconds.decimals
- Number of decimal places to round to.
§Returns
The liquidity of the token as trades per second.