collateral

This commit is contained in:
Hardhat Chad
2025-06-24 14:37:16 -05:00
parent 8d77aca7c0
commit fdeb2cf82a
13 changed files with 65 additions and 47 deletions

View File

@@ -195,7 +195,7 @@ pub struct DepositEvent {
pub amount: u64,
/// The total amount of ORE this user has deposited as collateral.
pub capacity: u64,
pub collateral: u64,
/// The timestamp of the event.
pub ts: i64,
@@ -217,7 +217,7 @@ pub struct WithdrawEvent {
pub amount: u64,
/// The total amount of ORE this user has deposited as collateral.
pub capacity: u64,
pub collateral: u64,
/// The timestamp of the event.
pub ts: i64,

View File

@@ -26,7 +26,10 @@ pub struct Block {
pub start_slot: u64,
/// The total number of hashes submitted to the block.
pub total_hashes: u64,
pub total_committed: u64,
/// The total number of hashes deployed to the block.
pub total_deployed: u64,
/// The total amount of rewards paid out to miners.
pub total_rewards: u64,

View File

@@ -16,10 +16,13 @@ pub struct Miner {
/// The hash of the last block this miner mined in.
pub hash: [u8; 32],
/// The total number of hashes this miner has submitted.
pub total_hashes: u64,
/// The total number of hashes this miner has committed to the block.
pub total_committed: u64,
/// The amount of ORE this miner has mined.
/// The total number of hashes this miner has deployed to the block.
pub total_deployed: u64,
/// The total amount of ORE this miner has mined across all blocks.
pub total_rewards: u64,
}

View File

@@ -7,15 +7,15 @@ use super::OreAccount;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Permit {
/// The amount of hash tokens this miner has committed to the block.
pub amount: u64,
/// The authority of the miner account.
pub authority: Pubkey,
/// The ID of the block this permit is for.
pub block_id: u64,
/// The amount of hash tokens this miner has committed to the block.
pub commitment: u64,
/// The executor of the permit.
pub executor: Pubkey,

View File

@@ -13,11 +13,11 @@ pub struct Stake {
/// The ID of the block this collateral is associated with.
pub block_id: u64,
/// The amount of ORE this miner can commit to the block.
pub capacity: u64,
/// The amount of ORE this miner has deposited as collateral for trading.
pub collateral: u64,
/// The amount of ORE this miner has committed to the block.
pub utilization: u64,
/// The amount of ORE this miner has spent on hashpower in this market.
pub spend: u64,
}
impl Stake {