diff --git a/cli/src/main.rs b/cli/src/main.rs index 5d0114c..5f7437d 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -578,12 +578,25 @@ async fn log_miner( println!(" authority: {}", authority); println!(" deployed: {:?}", miner.deployed); println!(" cumulative: {:?}", miner.cumulative); - println!(" rewards_sol: {}", miner.rewards_sol); - println!(" rewards_ore: {}", miner.rewards_ore); + println!(" rewards_sol: {} SOL", lamports_to_sol(miner.rewards_sol)); + println!( + " rewards_ore: {} ORE", + amount_to_ui_amount(miner.rewards_ore, TOKEN_DECIMALS) + ); + println!( + " refined_ore: {} ORE", + amount_to_ui_amount(miner.refined_ore, TOKEN_DECIMALS) + ); println!(" round_id: {}", miner.round_id); println!(" checkpoint_id: {}", miner.checkpoint_id); - println!(" lifetime_rewards_sol: {}", miner.lifetime_rewards_sol); - println!(" lifetime_rewards_ore: {}", miner.lifetime_rewards_ore); + println!( + " lifetime_rewards_sol: {} SOL", + lamports_to_sol(miner.lifetime_rewards_sol) + ); + println!( + " lifetime_rewards_ore: {} ORE", + amount_to_ui_amount(miner.lifetime_rewards_ore, TOKEN_DECIMALS) + ); Ok(()) } diff --git a/program/src/bury.rs b/program/src/bury.rs index 517e9c2..2bc6700 100644 --- a/program/src/bury.rs +++ b/program/src/bury.rs @@ -95,7 +95,7 @@ pub fn process_bury(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult // Share some ORE with stakers. let mut shared_amount = 0; if treasury.total_staked > 0 { - shared_amount = ONE_ORE / 10_000; // TODO: calculate shared amount + shared_amount = total_ore / 10; // Share 10% of buyback ORE with stakers treasury.stake_rewards_factor += Numeric::from_fraction(shared_amount, treasury.total_staked); }