ore_api/state/
treasury.rs

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