ore_api/state/treasury.rs
1use serde::{Deserialize, Serialize};
2use steel::*;
3
4use super::OreAccount;
5
6/// Treasury is a singleton account which is the mint authority for the ORE token and the authority of
7/// the program's global token account.
8#[repr(C)]
9#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable, Serialize, Deserialize)]
10pub struct Treasury {
11 // The amount of SOL collected for buy-bury operations.
12 pub balance: u64,
13
14 /// Buffer a (placeholder)
15 pub buffer_a: u64,
16
17 /// The amount of ORE in the motherlode rewards pool.
18 pub motherlode: u64,
19
20 /// The cumulative ORE distributed to miners, divided by the total unclaimed ORE at the time of distribution.
21 pub miner_rewards_factor: Numeric,
22
23 /// The cumulative ORE distributed to stakers, divided by the total stake at the time of distribution.
24 pub stake_rewards_factor: Numeric,
25
26 /// Buffer b (placeholder)
27 pub buffer_b: u64,
28
29 /// The current total amount of refined ORE mining rewards.
30 pub total_refined: u64,
31
32 /// The current total amount of ORE staking deposits.
33 pub total_staked: u64,
34
35 /// The current total amount of unclaimed ORE mining rewards.
36 pub total_unclaimed: u64,
37}
38
39account!(OreAccount, Treasury);