anya_core/tokenomics/
models.rs

1// Tokenomics models for Anya Core
2use serde::{Deserialize, Serialize};
3
4/// Token distribution model
5#[derive(Clone, Debug, Serialize, Deserialize)]
6pub struct TokenDistribution {
7    /// Percentage allocated to staking rewards
8    pub staking_allocation: f64,
9    /// Percentage allocated to ecosystem growth
10    pub ecosystem_allocation: f64,
11    /// Percentage allocated to protocol treasury
12    pub treasury_allocation: f64,
13    /// Percentage allocated to team and early contributors
14    pub team_allocation: f64,
15}
16
17impl Default for TokenDistribution {
18    fn default() -> Self {
19        Self {
20            staking_allocation: 0.40,
21            ecosystem_allocation: 0.30,
22            treasury_allocation: 0.20,
23            team_allocation: 0.10,
24        }
25    }
26}
27
28/// Staking tier information
29#[derive(Clone, Debug, Serialize, Deserialize)]
30pub struct StakingTier {
31    /// Name of the tier
32    pub name: String,
33    /// Minimum stake amount required for this tier
34    pub minimum_stake: u64,
35    /// Reward multiplier for this tier
36    pub reward_multiplier: f64,
37}
38
39/// Represents an economic event in the system
40#[derive(Clone, Debug, Serialize, Deserialize)]
41pub struct EconomicEvent {
42    /// Timestamp of the event
43    pub timestamp: u64,
44    /// Type of event
45    pub event_type: EconomicEventType,
46    /// Amount of tokens involved
47    pub amount: u64,
48    /// Associated account/address
49    pub account: String,
50}
51
52/// Types of economic events in the system
53#[derive(Clone, Debug, Serialize, Deserialize)]
54pub enum EconomicEventType {
55    /// Staking tokens
56    Stake,
57    /// Unstaking tokens
58    Unstake,
59    /// Reward distribution
60    Reward,
61    /// Fee payment
62    Fee,
63    /// Burning tokens
64    Burn,
65    /// Minting new tokens
66    Mint,
67}