Skip to main content

ore_api/state/
treasury.rs

1use serde::{Deserialize, Serialize};
2use steel::*;
3
4use crate::state::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 ORE in the motherlode rewards pool.
12    pub motherlode: u64,
13
14    /// The cumulative ORE distributed to miners, divided by the total unclaimed ORE at the time of distribution.
15    /// TODO: rename to rewards_factor
16    pub miner_rewards_factor: Numeric,
17
18    /// The current total amount of refined ORE mining rewards.
19    pub total_refined: u64,
20
21    /// The current total amount of unrefined ORE mining rewards.
22    /// TODO rename to total_unrefined
23    pub total_unclaimed: u64,
24}
25
26account!(OreAccount, Treasury);