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 /// The amount of ORE in the motherlode rewards pool.
15 pub motherlode: u64,
16
17 /// The cumulative ORE distributed to miners, divided by the total unclaimed ORE at the time of distribution.
18 pub miner_rewards_factor: Numeric,
19
20 /// The cumulative ORE distributed to stakers, divided by the total stake at the time of distribution.
21 pub stake_rewards_factor: Numeric,
22
23 /// The current total amount of ORE staking deposits.
24 pub total_staked: u64,
25
26 /// The current total amount of unclaimed ORE mining rewards.
27 pub total_unclaimed: u64,
28
29 /// The current total amount of refined ORE mining rewards.
30 pub total_refined: u64,
31}
32
33account!(OreAccount, Treasury);